/* ============================================
   StolenMadWolf Creative - Medieval Theme Styles
   ============================================ */

/* CSS Variables - Medieval Theme */
:root {
    --primary-color: #d4af37;
    --primary-dark: #b8941f;
    --primary-light: #f4d03f;
    --accent-gold: #d4af37;
    --accent-copper: #b87333;
    --accent-red: #8b0000;
    --text-primary: #f5e6d3;
    --text-secondary: #d4c5a9;
    --text-light: #b8a082;
    --bg-primary: #1a1612;
    --bg-secondary: #2d2418;
    --bg-dark: #0f0d0a;
    --bg-card: #3d3325;
    --bg-parchment: #f4e8d0;
    --border-color: #6b5d47;
    --border-gold: #d4af37;
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 8px 0 rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 16px 0 rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 12px 24px 0 rgba(0, 0, 0, 0.8);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #8b6914 0%, #d4af37 100%);
    --gradient-secondary: linear-gradient(135deg, #2d2418 0%, #3d3325 100%);
    --gradient-parchment: linear-gradient(to bottom, #f4e8d0 0%, #e8d5b7 100%);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Cinzel', 'Times New Roman', serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 105, 20, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(184, 115, 51, 0.1) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grain' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='25' cy='25' r='1' fill='%23000000' opacity='0.1'/%3E%3Ccircle cx='75' cy='75' r='1' fill='%23000000' opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23grain)'/%3E%3C/svg%3E");
    line-height: 1.8;
    overflow-x: hidden;
}

/* Touch-friendly: reduce tap highlight on interactive elements */
a, button, .nav-link, .btn, .story-card-clickable, .art-item {
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
    tap-highlight-color: rgba(212, 175, 55, 0.2);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding-top: env(safe-area-inset-top, 0);
    background: rgba(26, 22, 18, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(212, 175, 55, 0.2);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 2px solid var(--border-gold);
    border-image: linear-gradient(90deg, transparent, var(--border-gold), transparent) 1;
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.5);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   Hero Section - Animated
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 70px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 20%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 80%, rgba(184, 115, 51, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse 50% 60% at 20% 70%, rgba(139, 105, 20, 0.1) 0%, transparent 45%),
        var(--bg-primary);
    animation: heroGradientShift 12s ease-in-out infinite alternate;
}

@keyframes heroGradientShift {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.95; transform: scale(1.05); }
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: heroGlowPulse 8s ease-in-out infinite;
}

.hero-glow-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.hero-glow-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-copper);
    bottom: 20%;
    right: 15%;
    animation-delay: -3s;
}

.hero-glow-3 {
    width: 200px;
    height: 200px;
    background: var(--primary-dark);
    top: 50%;
    left: 50%;
    margin-left: -100px;
    margin-top: -100px;
    animation-delay: -6s;
}

@keyframes heroGlowPulse {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L30 60M0 30L60 30' stroke='%23d4af37' stroke-width='0.15' opacity='0.08' fill='none'/%3E%3C/svg%3E");
    animation: heroPatternMove 20s linear infinite;
}

@keyframes heroPatternMove {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-ornament {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
    margin: 0 auto;
    border-radius: 2px;
    opacity: 0;
    animation: heroLineReveal 1s ease-out 0.3s forwards;
}

.hero-ornament-bottom {
    animation-delay: 1.4s;
    margin-top: 2rem;
}

.hero-title {
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    animation: heroTitleReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.hero-title-main {
    display: block;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.2);
}

.hero-title-accent {
    display: block;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.5);
    animation: heroAccentShine 3s ease-in-out 1.5s infinite;
}

@keyframes heroAccentShine {
    0%, 100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.5); }
    50% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.8), 0 0 60px rgba(212, 175, 55, 0.4); }
}

@keyframes heroTitleReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroLineReveal {
    to { opacity: 0.9; }
}

.hero-divider {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
    margin: 1rem auto 1.25rem;
    border-radius: 1px;
    animation: heroDividerExpand 1s ease-out 0.9s forwards;
}

@keyframes heroDividerExpand {
    to { width: 120px; }
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: heroTaglineReveal 0.8s ease-out 1s forwards;
}

@keyframes heroTaglineReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-cta {
    opacity: 0;
    transform: translateY(15px);
    animation: heroCtaReveal 0.6s ease-out 1.2s forwards;
}

@keyframes heroCtaReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-cta:hover {
    animation: heroCtaPulse 1.5s ease-in-out infinite;
}

@keyframes heroCtaPulse {
    0%, 100% { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 0 25px rgba(212, 175, 55, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: heroScrollReveal 0.8s ease-out 1.8s forwards;
}

.hero-scroll-text {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-light);
}

.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--border-gold), transparent);
    border-radius: 1px;
    animation: heroScrollBounce 2s ease-in-out infinite;
    animation-delay: 2.5s;
}

@keyframes heroScrollReveal {
    to { opacity: 0.7; }
}

@keyframes heroScrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50% { transform: translateY(8px); opacity: 0.4; }
}

/* Hero - reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-gradient,
    .hero-glow,
    .hero-pattern,
    .hero-title-accent,
    .hero-cta:hover {
        animation: none;
    }
    .hero-title,
    .hero-tagline,
    .hero-cta,
    .hero-ornament,
    .hero-divider,
    .hero-scroll {
        animation-duration: 0.01ms;
        animation-fill-mode: both;
    }
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

/* Image Gallery Section */
.image-gallery-section {
    margin-top: 70px;
    padding: 0;
    background: var(--bg-dark);
    overflow: hidden;
}

.gallery-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.gallery-track {
    display: flex;
    gap: 1rem;
    padding: 2rem 0;
    animation: scroll 40s linear infinite;
    will-change: transform;
}

.gallery-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 0.5rem));
    }
}

.gallery-item {
    flex: 0 0 400px;
    height: 300px;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    text-decoration: none;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-image: linear-gradient(135deg, var(--border-gold), var(--border-color)) 1;
    transition: var(--transition);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
    border-color: var(--border-gold);
}

.gallery-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gradient-secondary);
    color: var(--text-primary);
}

.gallery-image-placeholder svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.gallery-image-placeholder p {
    font-size: 1.125rem;
    font-weight: 500;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.gallery-overlay p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Home Content Section */
.home-content {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.section-title {
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.3);
    letter-spacing: 2px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.section-header .section-description {
    margin-top: 0;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.content-section {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 3px solid var(--border-color);
    border-image: linear-gradient(135deg, var(--border-gold), var(--border-color), var(--border-gold)) 1;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: var(--transition);
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 0.5rem;
}

.content-section:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.2);
    border-color: var(--border-gold);
}

.content-icon {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.15);
    border: 2px solid var(--border-gold);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3), 0 0 10px rgba(212, 175, 55, 0.2);
}

.content-icon svg {
    width: 30px;
    height: 30px;
}

.content-section h3 {
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 175, 55, 0.2);
    letter-spacing: 1px;
}

.content-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

/* Social Section */
.social-section {
    text-align: center;
    padding: 3rem 0;
    background: var(--bg-secondary);
    border-radius: 1rem;
    margin-top: 3rem;
}

.social-section h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    min-width: 120px;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: var(--bg-dark);
}

.social-link svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.social-link span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.social-link:hover span {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: #1a1612;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.4);
    border-color: var(--primary-light);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.2);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(139, 105, 20, 0.1) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grain' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='25' cy='25' r='1' fill='%23000000' opacity='0.1'/%3E%3Ccircle cx='75' cy='75' r='1' fill='%23000000' opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23grain)'/%3E%3C/svg%3E");
    color: white;
    padding: 4rem 0 2rem;
    border-top: 2px solid var(--border-gold);
    border-image: linear-gradient(90deg, transparent, var(--border-gold), transparent) 1;
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.5);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section {
    min-width: 0;
}

.footer .logo {
    max-width: 100%;
}

.footer .logo a {
    display: block;
    font-size: 1.35rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer .logo span {
    display: block;
}

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-social li {
    margin-bottom: 0;
}

.footer-social li a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    padding-left: 0.75rem;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--border-gold);
    border-radius: 0.375rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.footer-social li a:hover {
    background: rgba(212, 175, 55, 0.25);
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding-left: 0.75rem;
}

.footer-social li a svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    fill: currentColor;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Animations */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* Stories Page Styles */
.stories-page {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-primary);
}

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

.story-card {
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-image: linear-gradient(135deg, var(--border-gold), var(--border-color)) 1;
    border-radius: 0.5rem;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 0.5rem;
}

.story-card .story-cover-image {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 0.5rem !important;
    margin-bottom: 1rem !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.story-card-clickable {
    cursor: pointer;
}

.story-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.story-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.story-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.story-link {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.story-link:hover {
    background: var(--primary-dark);
}

/* Blogs: vertical list, full width cards */
.blog-list {
    grid-template-columns: 1fr;
    max-width: 100%;
}
.blog-list .story-card {
    width: 100%;
    max-width: 100%;
}
.blog-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: -0.5rem 0 1rem 0;
    opacity: 0.9;
}

/* Chapter Viewer */
.chapter-viewer {
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-image: linear-gradient(135deg, var(--border-gold), var(--border-color), var(--border-gold)) 1;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.chapter-viewer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 0.5rem;
}

.chapter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chapter-controls h2 {
    color: var(--text-primary);
}

.pdf-viewer {
    width: 100%;
    min-height: 600px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
}

/* PDF viewer container (custom viewer with page-turn) */
.pdf-viewer-container {
    position: relative;
    width: 100%;
    min-height: 600px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: #1a1a1a;
    overflow: hidden;
}

.pdf-viewer-fallback {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.pdf-viewer-fallback a {
    margin-top: 1rem;
}

.pdf-viewer-stage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
    min-height: 560px;
}

.pdf-page-flip-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pdf-page {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 2px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    transition: transform 0.5s ease-in-out;
}

.pdf-page-current {
    position: relative;
    z-index: 0;
}

.pdf-page-flipping {
    display: none;
    z-index: 1;
    transform-origin: left center;
}

.pdf-page-flipping.flip-next {
    transform: translateX(-50%) rotateY(0deg);
}

.pdf-page-flipping.flip-next.flip-active {
    transform: translateX(-50%) rotateY(-180deg);
}

.pdf-page-flipping.flip-prev {
    transform: translateX(-50%) rotateY(0deg);
}

.pdf-page-flipping.flip-prev.flip-active {
    transform: translateX(-50%) rotateY(180deg);
}

.pdf-page canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.pdf-viewer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.pdf-page-indicator {
    color: var(--text-primary);
    font-size: 0.95rem;
    min-width: 120px;
    text-align: center;
}

.pdf-nav-btn {
    min-width: 100px;
}

.lightbox-pdf-viewer {
    min-height: 0;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lightbox-pdf-viewer .pdf-viewer-stage {
    flex: 1;
    min-height: 0;
    max-height: calc(75vh - 60px);
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.lightbox-pdf-viewer .pdf-page-flip-wrapper {
    max-width: 100%;
    max-height: 100%;
}

.lightbox-pdf-viewer .pdf-page {
    max-width: 100%;
    max-height: 100%;
}

.lightbox-pdf-viewer .pdf-page canvas {
    max-height: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .pdf-page,
    .pdf-page-flipping {
        transition: none;
    }
}

/* Comments Section */
.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.comments-section h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.comment::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border-gold);
    border-radius: 0.25rem 0 0 0.25rem;
}

.comment-author {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

.comment-date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Art Gallery Page */
.art-page {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-primary);
}

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

.art-item {
    position: relative;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-image: linear-gradient(135deg, var(--border-gold), var(--border-color)) 1;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    max-height: 320px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.art-item .art-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 1;
}

.art-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.art-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-secondary);
    color: var(--text-primary);
}

.art-image-placeholder svg {
    width: 80px;
    height: 80px;
    opacity: 0.8;
}

.art-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
    z-index: 2;
    pointer-events: none;
}

.art-item:hover .art-overlay {
    transform: translateY(0);
}

.art-overlay h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.art-overlay p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    padding: 2rem;
    overflow-y: auto;
}

.lightbox.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.lightbox-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 2rem;
    max-width: 95vw;
    background: var(--bg-card);
    border-radius: 0.5rem;
    padding: 2rem;
    border: 3px solid var(--border-gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.lightbox-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 0.5rem;
}

.lightbox-image-wrap {
    flex: 0 0 auto;
}

.lightbox-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55vw;
    max-width: 800px;
    height: 75vh;
    min-height: 400px;
}

.lightbox-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    display: block;
}

.lightbox-details {
    flex: 1 1 auto;
    min-width: 200px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lightbox-details h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.lightbox-details p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.lightbox-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.lightbox-link:hover {
    background: var(--primary-dark);
}

/* Blog lightbox: fill the screen */
.blog-lightbox.active {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}
.blog-lightbox .lightbox-content {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
}
.blog-lightbox .lightbox-content::before {
    border-radius: 0;
}
.blog-lightbox .lightbox-image-wrap {
    flex: 0 0 auto;
    min-width: 280px;
}
.blog-lightbox .lightbox-image {
    width: 45vw;
    max-width: 900px;
    height: 100%;
    min-height: 100vh;
}
.blog-lightbox .lightbox-details {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    padding: 3rem 2rem 2rem 3rem;
    justify-content: flex-start;
    overflow-y: auto;
}

/* Contact Page */
.contact-page {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 0.5rem;
    border: 3px solid var(--border-color);
    border-image: linear-gradient(135deg, var(--border-gold), var(--border-color), var(--border-gold)) 1;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
/* 16px minimum on small screens to prevent iOS zoom on input focus */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-gold);
    background: var(--bg-dark);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 10px rgba(212, 175, 55, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-full {
    width: 100%;
}

/* ============================================
   Responsive: Tablet & Mobile
   ============================================ */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-content {
        padding: 1.5rem 1rem;
    }

    .hero-title {
        font-size: clamp(2rem, 5vw, 3.25rem);
        letter-spacing: 0.1em;
    }

    .hero-tagline {
        font-size: clamp(0.9rem, 1.8vw, 1.1rem);
        letter-spacing: 0.15em;
    }

    .hero-glow-1 {
        width: 280px;
        height: 280px;
    }

    .hero-glow-2 {
        width: 200px;
        height: 200px;
    }

    .hero-glow-3 {
        width: 140px;
        height: 140px;
        margin-left: -70px;
        margin-top: -70px;
    }

    .home-content {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    }

    .content-section {
        padding: 2rem;
    }

    .content-section h3 {
        font-size: 1.5rem;
    }

    .footer-content {
        gap: 2rem;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .footer {
        padding: 3rem 0 1.5rem;
    }

    .gallery-item {
        flex: 0 0 300px;
        height: 250px;
    }

    .art-grid,
    .story-list {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }

    .story-card,
    .chapter-viewer {
        padding: 1.5rem;
    }

    .lightbox-content {
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .lightbox-image {
        width: 50vw;
        max-width: 480px;
        min-height: 350px;
    }
}

/* Mobile (768px and below) - desktop unchanged */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        padding: 0.75rem;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--bg-dark);
        width: 100%;
        padding: 2rem;
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        gap: 0;
        border-top: 1px solid var(--border-color);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(107, 93, 71, 0.3);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: flex;
        align-items: center;
        padding: 1rem 0;
        font-size: 1.1rem;
        min-height: 44px;
    }

    .logo a {
        font-size: 1.4rem;
        word-break: keep-all;
        white-space: nowrap;
    }

    .hero {
        min-height: 85vh;
        min-height: 85dvh;
        padding-top: 60px;
        padding-top: max(60px, env(safe-area-inset-top));
    }

    .hero-content {
        padding: 1.25rem 1rem;
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        letter-spacing: 0.06em;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .hero-tagline {
        margin-bottom: 1.5rem;
        letter-spacing: 0.1em;
        font-size: clamp(0.8rem, 3.5vw, 1rem);
    }

    .hero-cta {
        display: inline-block;
        padding: 0.875rem 2rem;
        min-height: 48px;
        min-width: 140px;
        text-align: center;
    }

    .hero-scroll {
        bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    .home-content {
        padding: 2.5rem 0;
        padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-title {
        word-break: break-word;
        overflow-wrap: break-word;
        padding: 0 0.25rem;
    }

    .section-description {
        font-size: 1rem;
        padding: 0 0.25rem;
    }

    .content-section {
        padding: 1.75rem 1.25rem;
        margin-bottom: 1.5rem;
    }

    .content-section:hover {
        transform: none;
    }

    .content-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 1.25rem;
    }

    .content-icon svg {
        width: 26px;
        height: 26px;
    }

    .content-section h3 {
        font-size: 1.35rem;
    }

    .content-section p {
        font-size: 1rem;
        line-height: 1.75;
        margin-bottom: 1.25rem;
    }

    .content-section .btn {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1.5rem;
    }

    .gallery-item {
        flex: 0 0 240px;
        height: 180px;
    }

    .gallery-track {
        padding: 1.5rem 0;
    }

    .social-links {
        gap: 1rem;
    }

    .social-link {
        min-width: 100px;
        min-height: 44px;
        padding: 1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
        min-height: 44px;
    }

    .form-group textarea {
        min-height: 120px;
    }

    .contact-form {
        padding: 2rem 1.25rem;
    }

    .contact-page,
    .stories-page,
    .art-page {
        padding-top: 80px;
    }

    .story-list,
    .art-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.25rem;
        margin-top: 1.5rem;
    }

    .story-card {
        padding: 1.25rem;
    }

    .story-card .story-cover-image {
        height: 180px !important;
    }

    .story-card h3 {
        font-size: 1.25rem;
    }

    .chapter-viewer {
        padding: 1.25rem;
        margin-top: 1.5rem;
    }

    .chapter-controls {
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .pdf-viewer,
    .pdf-viewer-container {
        min-height: 400px;
    }

    .pdf-viewer-stage {
        min-height: 340px;
    }

    .pdf-viewer-controls {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .pdf-nav-btn {
        min-width: 80px;
        min-height: 44px;
    }

    .art-item {
        min-height: 200px;
        max-height: 280px;
    }

    .lightbox {
        padding: 1rem;
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        align-items: flex-start;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .lightbox-close {
        top: max(1rem, env(safe-area-inset-top));
        right: max(1rem, env(safe-area-inset-right));
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        font-size: 1.5rem;
    }

    .lightbox-content {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        padding: 1.25rem;
        margin-top: 3rem;
    }

    .lightbox-image-wrap {
        width: 100%;
    }

    .lightbox-image {
        width: 100%;
        max-width: none;
        height: 45vh;
        height: 45dvh;
        min-height: 240px;
    }

    .lightbox-details {
        max-width: none;
        min-width: 0;
    }

    .lightbox-details h2 {
        font-size: 1.35rem;
    }

    .blog-lightbox.active {
        padding: 0;
    }
    .blog-lightbox .lightbox-content {
        margin-top: 0;
        min-height: 100vh;
        min-height: 100dvh;
        flex-direction: column;
    }
    .blog-lightbox .lightbox-image {
        height: 40vh;
        height: 40dvh;
        min-height: 200px;
        width: 100%;
        max-width: none;
    }

    .footer {
        padding: 2.5rem 0 max(1.5rem, env(safe-area-inset-bottom));
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    .footer-social li a {
        min-height: 44px;
        padding: 0.625rem 1rem;
    }

    /* Smaller hero glows on mobile for performance and clarity */
    .hero-glow-1 {
        width: 180px;
        height: 180px;
        top: 15%;
        left: 10%;
    }

    .hero-glow-2 {
        width: 120px;
        height: 120px;
        bottom: 25%;
        right: 5%;
    }

    .hero-glow-3 {
        width: 100px;
        height: 100px;
        margin-left: -50px;
        margin-top: -50px;
    }

    /* Admin panel: tablet/mobile */
    .admin-page {
        padding-top: 80px;
    }

    .admin-header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .admin-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .admin-tab {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .upload-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }

    .save-section {
        padding: 1.5rem;
    }
}

/* Small mobile (480px and below) - desktop unchanged */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .logo a {
        font-size: 1.25rem;
    }

    .hero-content {
        padding: 1rem 0.75rem;
    }

    .hero-title {
        font-size: clamp(1.5rem, 8vw, 2rem);
        letter-spacing: 0.05em;
    }

    .hero-divider {
        margin: 0.75rem auto 1rem;
    }

    .content-section {
        padding: 1.25rem 1rem;
        margin-bottom: 1.25rem;
    }

    .section-title {
        font-size: 1.5rem;
        padding: 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .gallery-item {
        flex: 0 0 200px;
        height: 150px;
    }

    .art-grid,
    .story-list {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.25rem;
    }

    .story-card .story-cover-image {
        height: 200px !important;
    }

    .story-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .story-link {
        text-align: center;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .contact-form {
        padding: 1.5rem 1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        min-height: 44px;
    }

    .btn-full {
        width: 100%;
    }

    .lightbox-image {
        height: 40vh;
        height: 40dvh;
        min-height: 200px;
    }

    .nav-menu {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .admin-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }
}
