/* ============================================
   Moly's Creative Arts — Styles
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:wght@400;600;700&display=swap');

/* --- Custom Properties --- */
:root {
    /* Color palette — earthy, calming tones */
    --color-cream: #FDF6EC;
    --color-beige: #E8DCC8;
    --color-sage: #A8B5A0;
    --color-terracotta: #9C5740;
    --color-charcoal: #3A3A3A;
    --color-white: #FAFAFA;

    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', 'Segoe UI', sans-serif;
}

/* --- Base Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Smooth Scrolling --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* --- Global Typography --- */
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-charcoal);
    background-color: var(--color-cream);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-charcoal);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: var(--space-xs);
}

p {
    margin-bottom: var(--space-sm);
}

a {
    color: var(--color-terracotta);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-charcoal);
}

a:focus {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 2px;
    border-radius: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* --- Utility: Container --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* --- Section Spacing --- */
section {
    padding: var(--space-xl) 0;
}

/* --- Scroll Animation Classes --- */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Breakpoints
   ============================================ */

/* Mobile: <480px — default styles apply (single column) */

/* Tablet: 480px–767px */
@media (min-width: 480px) {
    .container {
        width: 85%;
    }
}

/* Desktop: ≥768px */
@media (min-width: 768px) {
    .container {
        width: 80%;
    }
}

/* Large Desktop: ≥1200px */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
}

/* ============================================
   Navigation Bar
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-cream);
    border-bottom: 1px solid var(--color-beige);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
    position: relative;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-charcoal);
    text-decoration: none;
}

.nav-logo:hover {
    color: var(--color-terracotta);
}

.nav-logo:focus {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 2px;
    border-radius: 4px;
}

.nav-menu {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-charcoal);
    text-decoration: none;
    padding: var(--space-xs) 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-terracotta);
    transition: width 0.3s ease;
}

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

.nav-link:focus {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* --- Hamburger Button --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    z-index: 1001;
}

.hamburger:focus {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 2px;
    border-radius: 4px;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-charcoal);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger open state */
.hamburger.open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Mobile Navigation --- */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-cream);
        border-bottom: 1px solid var(--color-beige);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        padding: var(--space-sm) var(--space-md);
        gap: 0;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: var(--space-sm) 0;
        border-bottom: 1px solid var(--color-beige);
        font-size: 1.05rem;
    }

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('../images/header2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(253, 246, 236, 0.65) 0%,
        rgba(253, 246, 236, 0.55) 50%,
        rgba(253, 246, 236, 0.7) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: var(--space-lg) var(--space-sm);
}

.hero h1 {
    color: var(--color-charcoal);
    margin-bottom: var(--space-sm);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.4);
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--color-charcoal);
    margin-bottom: var(--space-md);
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* --- CTA Button --- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-cta {
    background-color: var(--color-terracotta);
    color: var(--color-white);
    padding: 0.9rem 2.2rem;
    letter-spacing: 0.03em;
}

.btn-cta:hover {
    background-color: #854835;
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(156, 87, 64, 0.35);
}

.btn-cta:focus {
    outline: 3px solid var(--color-sage);
    outline-offset: 3px;
}

/* ============================================
   About Section
   ============================================ */
.about {
    background-color: var(--color-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: start;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.about-text h2 {
    color: var(--color-charcoal);
}

/* --- Artist Profile Card --- */
.artist-profile {
    background-color: var(--color-cream);
    border-left: 4px solid var(--color-terracotta);
    border-radius: 8px;
    padding: var(--space-md);
    margin: var(--space-md) 0;
}

.artist-profile h3 {
    font-family: var(--font-heading);
    color: var(--color-charcoal);
    font-size: 1.3rem;
}

.artist-title {
    font-size: 0.95rem;
    color: var(--color-terracotta);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-xs);
}

.artist-motto {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #5F7356;
    font-style: italic;
    margin-bottom: var(--space-sm);
}

/* --- Studio Location --- */
.studio-location {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding: var(--space-sm);
    background-color: var(--color-beige);
    border-radius: 8px;
}

.studio-location .location-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.studio-location address {
    font-style: normal;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-charcoal);
}

.studio-map {
    margin-top: var(--space-sm);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Programs Section
   ============================================ */
.programs {
    background-color: var(--color-cream);
}

.section-heading {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.programs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 480px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .programs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Program Card --- */
.program-card {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: var(--space-md);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--color-beige);
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.program-card h3 {
    font-family: var(--font-heading);
    color: var(--color-charcoal);
}

.program-card p {
    font-size: 0.95rem;
    color: var(--color-charcoal);
    line-height: 1.7;
}

/* Distinct color accents per card */
.card-art-technique {
    border-top-color: var(--color-terracotta);
}

.card-healing-journey {
    border-top-color: var(--color-sage);
}

.card-kids {
    border-top-color: #E8A87C;
}

.card-group-sessions {
    border-top-color: #85B5A2;
}

.card-book-reading {
    border-top-color: #C9B99A;
}

.card-chit-chat {
    border-top-color: #D4A5A5;
}

/* --- Weekend Note --- */
.programs-note {
    text-align: center;
    margin-top: var(--space-md);
    font-style: italic;
    color: var(--color-terracotta);
    font-size: 0.95rem;
}

/* ============================================
   Gallery Section — Horizontal Slider
   ============================================ */
.gallery {
    background-color: var(--color-white);
}

.gallery-slider-wrapper {
    position: relative;
}

.gallery-slider {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-xs) 0 var(--space-md);
    scrollbar-width: thin;
    scrollbar-color: var(--color-beige) transparent;
}

.gallery-slider::-webkit-scrollbar {
    height: 6px;
}

.gallery-slider::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-slider::-webkit-scrollbar-thumb {
    background-color: var(--color-beige);
    border-radius: 3px;
}

.gallery-item {
    flex: 0 0 auto;
    width: 260px;
    height: 260px;
    display: block;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    line-height: 0;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 480px) {
    .gallery-item {
        width: 280px;
        height: 280px;
    }
}

@media (min-width: 768px) {
    .gallery-item {
        width: 300px;
        height: 300px;
    }
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-item:focus {
    outline: 3px solid var(--color-terracotta);
    outline-offset: 2px;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* --- Gallery Navigation Arrows --- */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    z-index: 10;
    background-color: rgba(253, 246, 236, 0.9);
    border: 1px solid var(--color-beige);
    color: var(--color-charcoal);
    font-size: 2rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-nav:hover {
    background-color: var(--color-terracotta);
    color: var(--color-white);
    border-color: var(--color-terracotta);
}

.gallery-nav:focus {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 2px;
}

.gallery-prev {
    left: -8px;
}

.gallery-next {
    right: -8px;
}

@media (max-width: 479px) {
    .gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }

    .gallery-prev {
        left: -4px;
    }

    .gallery-next {
        right: -4px;
    }
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.lightbox-close:hover {
    color: var(--color-terracotta);
}

.lightbox-close:focus {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq {
    background-color: var(--color-cream);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--color-white);
    border-radius: 8px;
    margin-bottom: var(--space-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-item summary {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 600;
    color: var(--color-charcoal);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    transition: color 0.3s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--color-terracotta);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    content: '−';
    transform: rotate(0deg);
}

.faq-item summary:hover {
    color: var(--color-terracotta);
}

.faq-item summary:focus {
    outline: 2px solid var(--color-terracotta);
    outline-offset: -2px;
    border-radius: 8px;
}

.faq-item p {
    padding: 0 var(--space-md) var(--space-md);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-charcoal);
    margin-bottom: 0;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    background-color: var(--color-white);
    text-align: center;
}

.contact-message {
    max-width: 600px;
    margin: 0 auto var(--space-md);
    font-size: 1.05rem;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

@media (min-width: 480px) {
    .contact-links {
        flex-direction: row;
        justify-content: center;
        gap: var(--space-md);
    }
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 1rem;
    color: var(--color-charcoal);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-link:hover {
    background-color: var(--color-beige);
    color: var(--color-terracotta);
}

.social-link:focus {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 2px;
    border-radius: 6px;
}

.social-icon {
    font-size: 1.3rem;
}

.contact-address {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding: var(--space-sm);
    background-color: var(--color-cream);
    border-radius: 8px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.contact-address address {
    font-style: normal;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-charcoal);
    text-align: left;
}

.contact-map {
    margin-top: var(--space-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background-color: var(--color-charcoal);
    color: var(--color-beige);
    text-align: center;
    padding: var(--space-md) 0;
}

.footer-copyright {
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    color: var(--color-beige);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.footer-social .social-link {
    color: var(--color-beige);
    font-size: 0.9rem;
}

.footer-social .social-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #D99B78;
}

/* ============================================
   Scroll Animations — Initial Hidden State
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
