/* Poetica Art Gallery - Clean, Modern Design */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    /* Always show vertical scrollbar to prevent horizontal jumping */
}

:root {
    /* Theme Colors - Hope, Light, Grace */
    --color-primary: #fefcf5;
    --color-secondary: #f5f0e6;
    --color-accent: #d4a574;
    --color-text: #4a3728;
    --color-text-light: #8b7355;
    --color-white: #ffffff;
    --color-shadow: rgba(74, 55, 40, 0.12);
    --color-shadow-light: rgba(74, 55, 40, 0.06);
    --color-overlay: rgba(52, 44, 33, 0.589);
    --color-grace: #fff8f0;
    --color-hope: #fefcf8;
    --color-gold: #e6c875;
    --color-gold-light: #f5e6a8;
    --color-cream: #fff5e6;
    --color-warm-yellow: #f9e79f;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    /* Layout */
    --nav-height: 80px;
    --container-max-width: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* Gradients */
    --gradient-hero: linear-gradient(135deg,
            #f5e6a8 0%,
            #f9e79f 20%,
            #e6c875 40%,
            #d4a574 60%,
            #f5e6a8 80%,
            #fff8f0 100%);
    --gradient-price: linear-gradient(135deg, var(--color-accent), var(--color-gold));
    --gradient-sold: linear-gradient(135deg, #e8e8e8, #c0c0c0);
}

html {
    overflow-y: scroll;
    /* Always show scrollbar space to prevent jumping */
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-secondary);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 500;
    font-style: italic;
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition-fast);
    margin: 0;
    letter-spacing: 0.5px;
}

.nav-logo h1:hover {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
}

.nav-link {
    text-decoration: none;
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
    font-size: 1rem;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    opacity: 0.7;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Desktop navigation - ensure links are always visible */
.nav-menu li {
    opacity: 1;
    transform: translateX(0);
}

/* Hamburger Menu */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-sm);
    position: relative;
}

.nav-hamburger:hover {
    opacity: 0.8;
    background-color: var(--color-secondary);
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
    margin: 2px 0;
}

.nav-hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.nav-hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Main Content */
.main {
    padding-top: var(--nav-height);
}

.section {
    display: none;
    /* nicochange idk if needed? */
    min-height: calc(100vh - var(--nav-height));
}

.section.active {
    display: block;
}

/* Hero Section */
.hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    max-width: 600px;
    padding: 0 var(--spacing-lg);
    text-shadow: 0 2px 8px rgba(74, 55, 40, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: var(--font-weight-light);
    margin-bottom: var(--spacing-md);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: var(--font-weight-normal);
    opacity: 0.9;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 1200px 800px at 25% 40%, rgba(249, 231, 159, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 1000px 600px at 75% 60%, rgba(230, 200, 117, 0.5) 0%, transparent 65%),
        radial-gradient(ellipse 800px 500px at 50% 80%, rgba(245, 230, 168, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse 600px 400px at 30% 20%, rgba(255, 248, 240, 0.3) 0%, transparent 55%),
        var(--gradient-hero);
    z-index: 1;
}

/* Featured Section */
.featured-section {
    padding: var(--spacing-xxl) 0;
    background: var(--color-primary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-light);
    margin-bottom: var(--spacing-sm);
    text-align: left;
    color: var(--color-text);
}

/* Unified grid system - consistent card sizing */
.featured-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xxl);
    justify-items: start;
}

/* Card styling - no max-width to allow natural grid behavior */
.featured-grid .project-card,
.gallery-grid .project-card {
    width: 100%;
}

/* On larger screens, use slightly wider minimum card size */
@media (min-width: 1200px) {

    .featured-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Gallery Sections */
.section--gallery,
.section--poems,
.section--about,
.section--order {
    padding: var(--spacing-md) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.section-filters {
    display: flex;
    gap: var(--spacing-sm);
}

.filter-dropdown {
    padding: var(--spacing-xs) var(--spacing-md);
    border: 2px solid var(--color-secondary);
    background: var(--color-white);
    color: var(--color-text);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition-fast);
    min-width: 160px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a3728' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: var(--spacing-xl);
}

.filter-dropdown:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.filter-dropdown:hover {
    border-color: var(--color-accent);
}

.filter-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    border: 1px solid var(--color-accent);
    background: var(--color-white);
    color: var(--color-text);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

/* Project Cards */
.project-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--color-white);
    box-shadow: 0 4px 20px var(--color-shadow-light);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--color-shadow);
}

.project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-card-image {
    transform: scale(1.05);
}

.project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-overlay);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.project-card-description {
    color: var(--color-white);
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
    transform: translateY(20px);
    transition: var(--transition);
}

.project-card:hover .project-card-description {
    transform: translateY(0);
}

.project-card-price {
    position: absolute;
    bottom: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--gradient-price);
    color: var(--color-white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-weight: var(--font-weight-semibold);
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.project-card-price.sold {
    background: var(--gradient-sold);
    color: var(--color-text);
}

/* No Results Message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-light);
    font-style: italic;
}

.no-results p {
    font-size: 1.1rem;
    margin: 0;
    font-style: italic;
}

/* Search No Results Message */
.search-no-results {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-light);
    font-style: italic;
}

/* Poems Grid */
.poems-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.poems-search {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.poems-search-input {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--color-secondary);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-family);
    background: var(--color-white);
    transition: var(--transition);
    min-width: 200px;
}

.poems-search-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(196, 152, 109, 0.2);
}

.poems-search-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.poems-search-btn:hover {
    background: #a67c52;
}

.poem-box {
    background: var(--color-hope);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: 0 4px 20px var(--color-shadow);
    transition: var(--transition);
    width: 100%;
    border: 2px solid var(--color-secondary);
}

.poem-box.hidden {
    display: none;
}

/* .poem-box:hover {
    box-shadow: 0 8px 30px var(--color-shadow);
} */

.poem-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-lg);
    color: var(--color-text);
    text-align: center;
}

.poem-content {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.4rem;
    line-height: 1.7;
    color: var(--color-text);
    white-space: pre-line;
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-style: italic;
}

.poem-date {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-style: italic;
}

/* Daily Poem Section */
.daily-poem-section {
    padding: var(--spacing-xxl) 0;
    background: var(--color-secondary);
}

.daily-poem-section .section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

#daily-poem {
    max-width: 600px;
    margin: 0 auto;
}

#daily-poem .poem-box {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: 0 4px 20px var(--color-shadow-light);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xxl);
    align-items: start;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

.about-bio {
    margin-bottom: var(--spacing-sm);
}

.artist-portrait {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px var(--color-shadow);
}

/* Order Section */
.order-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xxl);
    align-items: start;
}

.order-info {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

.order-info p {
    margin-bottom: var(--spacing-lg);
}

.order-email {
    padding: var(--spacing-md);
    background: var(--color-secondary);
    border-radius: var(--border-radius-sm);
    font-size: 1.1rem;
}

.email-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
}

.email-link:hover {
    text-decoration: underline;
}

.gallery-exhibition {
    padding: var(--spacing-lg);
    border: 2px solid var(--color-secondary);
    border-radius: var(--border-radius);
}

.gallery-exhibition h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--color-accent);
    font-size: 1.3rem;
}

.gallery-exhibition p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
    color: var(--color-text-light);
}

.gallery-exhibition p:last-child {
    margin-bottom: 0;
}

/* Responsive Order Section */
@media (max-width: 768px) {
    .order-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Modal - Full Screen Image Only */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
}

.modal-full-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    cursor: grab;
}

.modal-full-image:active {
    cursor: grabbing;
}

/* Loading */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-circle {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-secondary);
    border-top: 3px solid var(--color-text);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Item Detail Pages */
.item-detail {
    display: none;
    /* min-height: 100vh; */
    /* padding-top: var(--nav-height); */
}

.item-detail.active {
    display: block;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
    min-height: calc(100vh - var(--nav-height));
    padding: 0;
}

.detail-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-secondary);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition);
    height: 70vh;
    max-height: 70vh;
    aspect-ratio: 1;
}

.detail-image:hover {
    transform: scale(1.02);
}

.detail-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 8px 30px var(--color-shadow);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* padding: var(--spacing-lg);
    gap: var(--spacing-lg); */
    height: 70vh;
    max-height: 70vh;
    overflow-y: auto;
}

.detail-info-top {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.detail-info-bottom {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.detail-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
}

.detail-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

.detail-price {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-white);
    background: var(--gradient-hero);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 10px var(--color-shadow-light);
    min-height: 48px;
    flex: 1;
}

.detail-price.sold {
    background: var(--gradient-sold);
    color: var(--color-text);
}

.detail-date {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
}

.back-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-accent);
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--color-white);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
    flex: 1;
}

.back-button:hover {
    background: #a67c52;
    transform: translateX(-2px);
}

/* Responsive Design */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        right: 0;
        width: 80%;
        height: calc(100vh - var(--nav-height));
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: var(--spacing-sm);
        padding-top: var(--spacing-sm);
        padding-bottom: var(--spacing-sm);
        transition: transform 0.3s ease;
        z-index: 999;
        box-shadow: -4px 0 20px var(--color-shadow);
        overflow-y: auto;
        transform: translateX(100%);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li {
        width: 80%;
        text-align: center;
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
        margin-bottom: var(--spacing-md);
        will-change: opacity, transform;
    }

    .nav-menu li.menu-item-visible {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu li.menu-item-hidden {
        opacity: 0;
        transform: translateX(20px);
    }

    .nav-link {
        font-size: 1.2rem;
        padding: var(--spacing-md) var(--spacing-lg);
        font-weight: var(--font-weight-semibold);
        width: 100%;
        display: block;
        border-radius: var(--border-radius-md);
        transition: all 0.2s ease;
    }

    .nav-link:hover,
    .nav-link:focus,
    .nav-link.active {
        background-color: var(--color-secondary);
        color: var(--color-text);
        opacity: 1;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }

    .section-filters {
        width: 100%;
    }

    .filter-dropdown {
        width: 100%;
        min-width: auto;
    }

    .featured-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }

    .featured-grid .project-card,
    .gallery-grid .project-card {
        width: 100%;
        max-width: none;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .modal-content {
        width: 95vw;
        height: 95vh;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-info {
        flex: 0 0 auto;
        padding: var(--spacing-lg);
    }

    .detail-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        min-height: calc(100vh - var(--nav-height));
        padding: var(--spacing-lg) 0;
    }

    .detail-image {
        order: -1;
        width: min(80vw, 50vh);
        height: min(80vw, 50vh);
        margin: 0 auto;
        aspect-ratio: 1;
    }

    .detail-main-image {
        max-height: 100%;
    }

    .detail-info {
        padding: 0 var(--spacing-md);
        order: 1;
        height: auto;
        max-height: none;
        overflow-y: visible;
        flex: 1;
        justify-content: flex-start;
    }

    .detail-info-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }

    .detail-title {
        font-size: 2rem;
    }

    .detail-price {
        font-size: 1.25rem;
    }

    .back-button {
        justify-content: center;
    }

    .order-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .featured-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Responsive poems search */
    .poems-search {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
    }

    .poems-search-input {
        min-width: auto;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }

    .section-filters {
        width: 100%;
    }

    .filter-dropdown {
        width: 100%;
        min-width: auto;
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-lg);
        padding-right: var(--spacing-xxl);
    }

    .filter-dropdown option {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 1rem;
    }

    .detail-title {
        font-size: 1.75rem;
    }

    .detail-price {
        font-size: 1.1rem;
    }

    .detail-image {
        padding: var(--spacing-xs);
    }

    .modal-full-image {
        /* On mobile, allow natural scrolling/zooming behavior */
        width: auto;
        height: auto;
        min-width: 100%;
        object-fit: cover;
    }

    .section--gallery,
    .section--poems,
    .section--about {
        padding: var(--spacing-md) 0;
    }
}