/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Content Protection Styles */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Allow text selection for specific elements (menu, buttons, etc.) */
.menu-toggle,
.nav-link,
.submenu-link,
.view-btn,
.expand-notes-btn,
.collapse-notes-btn,
button,
input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Prevent image dragging */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: auto;
}

/* Image protection overlay */
.image-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: transparent;
}

body {
    font-family: 'Old English Text MT', 'UnifrakturMaguntia', 'Blackletter', cursive;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 20px; /* Further reduced from 0.8rem to 0.5rem */
    flex-direction: row-reverse;
    position: relative;
}

.header-container {
    position: relative;
}

.logo {
    font-family: 'Old English Text MT', 'UnifrakturMaguntia', 'Blackletter', cursive;
    font-size: 4.5rem; /* Slightly reduced from 5.0rem for more compact header */
    font-weight: 700;
    color: #169B62;
    text-decoration: none;
    text-align: center;
    flex: 1;
}

/* Menu Toggle Button */
.menu-toggle {
    font-family: 'Copperplate Gothic Bold', 'Copperplate', serif;
    font-size: 0.8rem; /* Reduced by 20% from 1rem */
    font-weight: bold;
    color: #169B62;
    background-color: transparent;
    border: 2px solid #169B62;
    padding: 0.4rem 0.8rem; /* Further reduced padding */
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    left: 20px; /* Position absolutely on the left */
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle:hover {
    background-color: #169B62;
    color: #fff;
}

.menu-toggle.active {
    background-color: #169B62;
    color: #fff;
}

/* Navigation Menu */
.nav {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 1rem 0;
    margin-top: 1rem;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    text-decoration: none;
    color: #555;
    font-family: 'Copperplate Gothic Bold', 'Copperplate', serif;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: #169B62;
    background-color: #f8f9fa;
}

/* Submenu Styles */
.has-submenu .nav-link::after {
    content: ' ▼';
    font-size: 0.7rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.has-submenu.submenu-active .nav-link::after {
    transform: rotate(180deg);
}

.submenu {
    display: none;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin: 0.5rem 0.5rem 0.5rem 3.5rem;
    overflow: hidden;
}

.has-submenu.submenu-active .submenu {
    display: block;
}

.submenu-link {
    display: block;
    text-decoration: none;
    color: #555;
    font-family: 'Copperplate Gothic Bold', 'Copperplate', serif;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submenu-link:hover {
    color: #169B62;
    background-color: #fff;
    border-left-color: #169B62;
}

.submenu-link.active {
    color: #169B62;
    font-weight: 600;
    background-color: #fff;
    border-left-color: #169B62;
}

/* Main Content */
.main {
    margin-top: 80px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #169B62 0%, #0d6b3f 100%);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px; /* Ensure adequate height for vertical centering */
}

.hero .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 2rem 20px; /* Add some padding back for breathing room */
}

.hero-title {
    font-family: 'Old English Text MT', 'UnifrakturMaguntia', 'Blackletter', cursive;
    font-size: 2.2rem; /* Reduced to be smaller than header */
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Section Titles */
.section-title {
    font-family: 'Old English Text MT', 'UnifrakturMaguntia', 'Blackletter', cursive;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: #169B62;
}

/* Gallery Section */
.gallery {
    padding: 4rem 0;
    background-color: #fff;
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Collection Grid for Main Gallery */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.collection-item {
    text-decoration: none;
    color: inherit;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.collection-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.collection-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background-color: #f8f9fa;
}

.collection-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.collection-item:hover .collection-image {
    transform: scale(1.05);
}

.collection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.collection-item:hover .collection-overlay {
    opacity: 1;
}

.collection-link-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 12px 24px;
    border: 2px solid #fff;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.collection-item:hover .collection-link-text {
    background-color: #fff;
    color: #169B62;
}

.collection-info {
    padding: 2rem;
    text-align: center;
}

.collection-title {
    font-family: 'Old English Text MT', 'UnifrakturMaguntia', 'Blackletter', cursive;
    font-size: 1.6rem;
    font-weight: 600;
    color: #169B62;
    margin-bottom: 0.5rem;
}

.collection-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* Center Miscellaneous Collection */
.miscellaneous-centered {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 400px;
}

.art-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.art-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.art-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.art-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.art-item:hover .art-image {
    transform: scale(1.05);
}

.art-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.art-item:hover .art-overlay {
    opacity: 1;
}

.view-btn {
    background-color: #fff;
    color: #169B62;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background-color: #169B62;
    color: #fff;
    transform: translateY(-2px);
}

.art-info {
    padding: 1.5rem;
}

.art-title {
    font-family: 'Old English Text MT', 'UnifrakturMaguntia', 'Blackletter', cursive;
    font-size: 1.3rem;
    font-weight: 600;
    color: #169B62;
    margin-bottom: 0.5rem;
}

.art-medium {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Empty Gallery Styles */
.empty-gallery {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.empty-message {
    font-size: 1.3rem;
    color: #999;
    font-style: italic;
}

/* About Section */
.about {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.8;
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background-color: #fff;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.contact-info {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: #169B62;
    color: #fff;
    padding: 2rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.footer-left {
    margin: 0;
    opacity: 0.8;
    text-align: center;
    grid-column: 2;
}

.footer-right {
    margin: 0;
    font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    color: #fff;
    text-align: right;
    white-space: nowrap;
    grid-column: 3;
    justify-self: end;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer a {
    opacity: 1;
    transition: opacity 0.3s ease;
    font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    color: #00BFFF;
    font-weight: 600;
    text-decoration: underline;
}

.footer a:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        position: relative;
    }
    
    .footer-right {
        position: relative;
        right: auto;
        text-align: center;
        margin-top: 0.5rem;
    }
    .nav {
        right: 0;
        left: 0;
        max-width: 100%;
        margin: 1rem;
    }
    
    .menu-toggle {
        font-size: 0.6rem; /* Much smaller font for mobile */
        padding: 0.2rem 0.4rem; /* Significantly reduced padding - 50% smaller */
        width: auto; /* Allow button to size to content */
        min-width: auto; /* Remove any minimum width constraints */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .art-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .collection-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .collection-info {
        padding: 1.5rem;
    }
    
    .collection-title {
        font-size: 1.4rem;
    }
    
    .main {
        margin-top: 120px;
    }
    
    /* Mobile logo styling - keep left aligned but increase font size */
    .logo {
        text-align: left;
        flex: none;
        font-size: 2.4rem; /* Keep original mobile size */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        min-height: 150px; /* Smaller height for mobile */
    }
    
    .hero .container {
        padding: 1.5rem 15px; /* Smaller padding for mobile */
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .gallery, .about, .contact {
        padding: 3rem 0;
    }
    
    .art-info {
        padding: 1rem;
    }
    
    .art-title {
        font-size: 1.1rem;
    }
    
    .collection-grid {
        gap: 1.5rem;
    }
    
    .collection-info {
        padding: 1rem;
    }
    
    .collection-title {
        font-size: 1.2rem;
    }
    
    .collection-description {
        font-size: 0.9rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .art-item {
        border: 2px solid #000;
    }
    
    .nav-link::after {
        background-color: #000;
    }
}

/* Focus styles for keyboard navigation */
.nav-link:focus,
.view-btn:focus {
    outline: 2px solid #169B62;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .art-overlay,
    .view-btn {
        display: none;
    }
    
    .art-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .art-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}