/* ============================================================
 * The Luminous Atelier — Frontend Stylesheet
 * Design System: "The Luminous Atelier"
 * Inspired by glassmorphism, editorial typography & warm tones
 * ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@300;400;500;600;700;800&family=Manrope:wght@200;300;400;500;600;700;800&display=swap');

/* ============================================================
   1. Design Tokens
   ============================================================ */
:root {
    /* Brand Palette */
    --primary:            #ac2a26;
    --primary-dim:        #8a1f1c;
    --primary-container:  #ff766b;
    --on-primary:         #ffffff;

    --primary-fixed:      #fcd8d6;
    --primary-fixed-dim:  #f0a8a3;

    --secondary:          #6c5b5e;
    --secondary-container:#edd9db;
    --on-secondary-container: #3b282b;

    /* Surfaces (tonal layering — no borders) */
    --background:                #fff4f4;
    --surface:                   #fffcfc;
    --surface-container-lowest:  #ffffff;
    --surface-container-low:     #fff8f5;
    --surface-container:         #ffeeed;
    --surface-container-high:    #ffe3e1;
    --surface-container-highest: #ffd6d3;
    --on-surface:                #4d2128;
    --on-surface-variant:        #7d5a5e;

    /* Utility */
    --outline-variant:    #b9a4a6;

    --success:    #2b7a4b;
    --error:      #ba1a1a;
    --warning:    #8a6800;

    /* Shadows (tinted – never pure black) */
    --shadow-ambient:   #4d2128;
    --shadow-elevation: 0 4px 30px rgba(77, 33, 40, 0.06);
    --shadow-float:     0 8px 60px rgba(77, 33, 40, 0.08);

    /* Typography */
    --font-display: 'Epilogue', 'Georgia', serif;
    --font-body:    'Manrope', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Radii */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

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

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--on-surface);
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--on-surface);
    line-height: 1.2;
}

h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--primary-dim);
}

/* ============================================================
   3. Core Utility Fallbacks (when Tailwind unavailable)
   ============================================================ */

/* Display */
.inline-block { display: inline-block; }
.block { display: block; }
.hidden { display: none; }
.flex { display: flex; }
.grid { display: grid; }
.inline-flex { display: inline-flex; }

/* Flex direction */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

/* Flex alignment */
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Gap */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-20 { gap: 5rem; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }

/* Width / Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-1\/2 { width: 50%; }

/* Max-widths */
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.max-w-5xl { max-width: 64rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xs { max-width: 20rem; }

/* Grid columns */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Font sizes */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.text-7xl { font-size: 4.5rem; }

/* Font weights */
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
.font-light { font-weight: 300; }

/* Text transforms */
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

/* Colors - text */
.text-primary { color: var(--primary); }
.text-on-background { color: var(--on-surface); }
.text-on-surface-variant { color: var(--on-surface-variant); }
.text-white { color: #ffffff; }
.text-stone-500 { color: #78716c; }
.text-stone-600 { color: #57534e; }
.text-stone-700 { color: #44403c; }

/* Colors - background */
.bg-primary { background-color: var(--primary); }
.bg-white { background-color: #ffffff; }
.bg-on-secondary-container { background-color: var(--on-secondary-container); }
.bg-secondary-container { background-color: var(--secondary-container); }
.bg-on-background { background-color: var(--on-background); }
.bg-surface-container-high { background-color: var(--surface-container-high); }
.bg-surface-container { background-color: var(--surface-container); }

/* Sizing helpers */
.h-1\.5 { height: 0.375rem; }
.h-12 { height: 3rem; }
.h-48 { height: 12rem; }
.h-64 { height: 16rem; }
.h-80 { height: 20rem; }
.h-\[400px\] { height: 400px; }
.w-12 { width: 3rem; }
.w-24 { width: 6rem; }
.w-40 { width: 10rem; }
.w-60 { width: 15rem; }
.w-64 { width: 16rem; }
.w-80 { width: 20rem; }
.w-\[44px\] { width: 44px; }

/* Border radius */
.rounded-full { border-radius: 9999px; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-\[32px\] { border-radius: 32px; }
.rounded-\[40px\] { border-radius: 40px; }
.rounded-\[48px\] { border-radius: 48px; }
.rounded-\[60px\] { border-radius: 60px; }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Backdrop blur */
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* Blur effects */
.blur-2xl { filter: blur(40px); }
.blur-3xl { filter: blur(64px); }

/* Transforms */
.rotate-3 { transform: rotate(3deg); }

/* Transitions */
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s, background-color 0.2s; }
.transition-transform { transition: transform 0.2s ease; }
.transition-shadow { transition: box-shadow 0.2s ease; }
.duration-300 { transition-duration: 0.3s; }
.duration-500 { transition-duration: 0.5s; }
.duration-700 { transition-duration: 0.7s; }

/* Z-index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* Margins */
.mx-auto { margin-left: auto; margin-right: auto; }
.my-12 { margin-top: 3rem; margin-bottom: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-20 { margin-bottom: 5rem; }
.mt-12 { margin-top: 3rem; }

/* Padding */
.p-0 { padding: 0; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }

/* Space between children */
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Aspect ratio */
.aspect-square { aspect-ratio: 1 / 1; }

/* Container queries fallback */
.overflow-hidden { overflow: hidden; }

/* Desktop overrides */
@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
    .md\:inline-block { display: inline-block; }
    .md\:flex-row { flex-direction: row; }
    .md\:text-left { text-align: left; }
    .md\:items-end { align-items: flex-end; }
    .md\:gap-10 { gap: 2.5rem; }
    .md\:px-12 { padding-left: 3rem; padding-right: 3rem; }
    .md\:px-20 { padding-left: 5rem; padding-right: 5rem; }
    .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
    .md\:p-16 { padding: 4rem; }
    .md\:text-2xl { font-size: 1.5rem; }
    .md\:text-5xl { font-size: 3rem; }
    .md\:text-6xl { font-size: 3.75rem; }
    .md\:text-7xl { font-size: 4.5rem; }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* Footer link overrides */
    footer.md\:flex-row { flex-direction: row; }
    footer.md\:text-left { text-align: left; }
    footer.md\:items-end { align-items: flex-end; }
    footer.md\:gap-10 { gap: 2.5rem; }
    footer.md\:px-12 { padding-left: 3rem; padding-right: 3rem; }
    footer.md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Group hover effects - parent has .group class */
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:scale-110 { transform: scale(1.1); }
.group:hover .group-hover\:gap-4 { gap: 1rem; }

/* Hover effects */
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:translate-x-2:hover { transform: translateX(0.5rem); }
.hover\:translate-y-1:hover { transform: translateY(-0.25rem); }
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:bg-white\/80:hover { background-color: rgba(255,255,255,0.8); }
.hover\:bg-white\/20:hover { background-color: rgba(255,255,255,0.2); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); }
.hover\:shadow-2xl:hover { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.hover\:text-primary:hover { color: var(--primary); }

/* Active scale */
.active\:scale-95:active { transform: scale(0.95); }

/* Object fit */
.object-cover { object-fit: cover; }

/* Opacity */
.opacity-20 { opacity: 0.2; }
.opacity-30 { opacity: 0.3; }
.opacity-60 { opacity: 0.6; }

/* Pointer events */
.pointer-events-none { pointer-events: none; }

/* Border helpers */
.border { border-width: 1px; border-style: solid; }
.border-none { border-style: none !important; }
.border-white\/30 { border-color: rgba(255,255,255,0.3); }
.border-white\/40 { border-color: rgba(255,255,255,0.4); }
.border-white\/20 { border-color: rgba(255,255,255,0.2); }
.border-primary-container\/20 { border-color: rgba(255,118,107,0.2); }

/* List reset */
.list-none { list-style: none; }
.m-0 { margin: 0; }
.p-0 { padding: 0; }

/* Text decoration */
.no-underline { text-decoration: none; }

/* ============================================================
   3. Glass & Surface Utilities
   ============================================================ */
.glass {
    background: rgba(255, 252, 252, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.surface-low {
    background: var(--surface-container-low);
}
.surface-mid {
    background: var(--surface-container);
}
.surface-high {
    background: var(--surface-container-highest);
}

/* Ghost border (only when absolutely needed for accessibility) */
.ghost-border {
    border: 1px solid var(--outline-variant);
    opacity: 0.15;
}

/* ============================================================
   4. Header & Navigation (Glassmorphism — fallback when Tailwind unavailable)
   ============================================================ */

/* Header bar — matches Tailwind classes used in frontend-header.php */
header.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(70, 100, 113, 0.05);
}

header .flex { display: flex; }
header .justify-between { justify-content: space-between; }
header .items-center { align-items: center; }
header .gap-3 { gap: 0.75rem; }
header .gap-8 { gap: 2rem; }

header [class*="px-4"] { padding-left: 1rem; padding-right: 1rem; }
header [class*="px-8"] { padding-left: 2rem; padding-right: 2rem; }
header [class*="py-3"] { padding-top: 0.75rem; padding-bottom: 0.75rem; }
header [class*="py-4"] { padding-top: 1rem; padding-bottom: 1rem; }

header .max-w-screen-2xl { max-width: 1536px; margin-left: auto; margin-right: auto; }
header .h-10 { height: 7.5rem; }
header .w-auto { width: auto; }

/* Desktop nav: hidden on mobile, flex on desktop */
#main-nav { display: none; }
#mobile-nav { display: block; }

@media (min-width: 768px) {
    #main-nav { display: flex !important; align-items: center; }
    #mobile-nav { display: none !important; }
    .menu-toggle { display: none !important; }
}

#main-nav ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Hide Font Awesome icons in nav links (code.html design has text-only links) */
#main-nav ul li a i,
#main-nav ul li a .fa {
    display: none;
}
#main-nav ul li a {
    font-family: 'Epilogue', sans-serif;
    letter-spacing: -0.02em;
    font-size: 0.875rem;
    color: #57534e;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}
#main-nav ul li a:hover {
    color: var(--primary);
    background: var(--surface-container-high);
}

/* CTA button in header — override Tailwind's hidden md:inline-block */
header a[class*="rounded-full"] {
    display: inline-block !important;
    background: var(--primary);
    color: var(--on-primary);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}
header a[class*="rounded-full"]:hover {
    background: var(--primary-dim);
}
header a[class*="rounded-full"]:active {
    transform: scale(0.95);
}

/* Hamburger button (mobile toggle) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 44px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 8px;
    z-index: 1100;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--on-surface);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Glass panel — hero overlay */
.glass-panel {
    background: rgba(255, 244, 244, 0.8);
    backdrop-filter: none!important;
    -webkit-backdrop-filter: none!important;
}

/* Dropdown Menu (used by render_menu_items) */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-arrow {
    font-size: 0.65rem;
    margin-left: 0.3rem;
    transition: transform 0.2s;
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
}

/* Mobile: hide by default, show on click toggle */
.nav-dropdown .nav-dropdown-menu {
    display: none;
    flex-direction: column;
    padding-left: 1rem !important;
    margin-top: 0 !important;
    text-align: left !important;
    align-items: flex-start !important;
    background: transparent;
    box-shadow: none;
}

.nav-dropdown .nav-dropdown-menu li {
    text-align: left !important;
}

.nav-dropdown .nav-dropdown-menu li a {
    text-align: left !important;
    justify-content: flex-start !important;
}

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

/* Desktop dropdown: show on hover */
@media (min-width: 769px) {
    .nav-dropdown {
        position: relative;
    }

    .nav-dropdown .nav-dropdown-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 190px;
        background: var(--surface-container-lowest);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-float);
        padding: 0.4rem 0 !important;
        z-index: 2000;
        flex-direction: column !important;
        gap: 0 !important;
        text-align: left !important;
        align-items: flex-start !important;
        border: none;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        display: flex !important;
    }

    .nav-dropdown .nav-dropdown-menu li {
        text-align: left !important;
    }

    .nav-dropdown .nav-dropdown-menu li a {
        padding: 0.55rem 1rem !important;
        font-size: 0.88rem !important;
        white-space: nowrap;
        border-radius: 0 !important;
        text-align: left !important;
        justify-content: flex-start !important;
    }

    .nav-dropdown-menu li a:hover {
        background: var(--surface-container) !important;
    }
}

/* ============================================================
   5. Main Content Area
   ============================================================ */
/* Main layout is now handled by Tailwind classes in PHP template */

/* ============================================================
   6. Sections (Tonal Layering — No Borders)
   ============================================================ */
section {
    background: var(--surface-container-low);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: none;
    border: none;
}

section h1, section h2 {
    margin-bottom: var(--space-md);
    color: var(--on-surface);
}

section h2 i {
    margin-right: 0.5rem;
    color: var(--primary);
}

/* Deeper sections — nested tonal shift */
section section,
.section-inner {
    background: var(--surface-container);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

/* ============================================================
   7. Alerts (No Borders)
   ============================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-weight: 500;
    border: none;
    box-shadow: none;
}

.alert-success {
    background: #ddeee3;
    color: var(--success);
}

.alert-error {
    background: #f4dbdb;
    color: var(--error);
}

/* ============================================================
   8. Buttons (rounded-full, gradient primary, glass secondary)
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: var(--shadow-ambient) 0 4px 24px rgba(172, 42, 38, 0.25);
}

.btn:hover {
    background: linear-gradient(135deg, var(--primary-dim) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-ambient) 0 6px 30px rgba(172, 42, 38, 0.3);
}

.btn:disabled {
    background: var(--surface-container-high);
    color: var(--on-surface-variant);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Secondary — Glass style */
.btn-secondary {
    background: rgba(255, 227, 225, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--on-surface);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 214, 211, 0.8);
    color: var(--primary);
    box-shadow: none;
    transform: translateY(-1px);
}

/* Hero buttons */
.btn-hero {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--on-primary);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: var(--on-primary);
    border: none;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border: none;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ============================================================
   9. Forms (No borders — surface-container-low bg + glow)
   ============================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--on-surface);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--surface-container-low);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--on-surface);
    transition: box-shadow 0.2s, background 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(172, 42, 38, 0.15), var(--shadow-ambient) 0 4px 20px rgba(172, 42, 38, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--on-surface-variant);
    opacity: 0.7;
}

/* ============================================================
   10. Footer
   ============================================================ */
footer {
    background: var(--surface-container-high);
    color: var(--on-surface);
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    margin-top: auto;
}

/* Footer layout fallback (when Tailwind unavailable) */
footer .flex { display: flex; }
footer .flex-col { flex-direction: column; }
footer .flex-wrap { flex-wrap: wrap; }
footer .justify-center { justify-content: center; }
footer .items-center { align-items: center; }
footer .gap-4 { gap: 1rem; }
footer .gap-6 { gap: 1.5rem; }
footer .gap-8 { gap: 2rem; }
footer .gap-2 { gap: 0.5rem; }
footer .text-center { text-align: center; }
footer .max-w-xs { max-width: 20rem; }
footer .text-sm { font-size: 0.875rem; }
footer .text-lg { font-size: 1.125rem; }
footer .font-bold { font-weight: 700; }
footer .w-full { width: 100%; }

@media (min-width: 768px) {
    footer .md\:flex-row { flex-direction: row; }
    footer .md\:text-left { text-align: left; }
    footer .md\:items-end { align-items: flex-end; }
    footer .md\:gap-10 { gap: 2.5rem; }
    footer .md\:px-12 { padding-left: 3rem; padding-right: 3rem; }
    footer .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
    footer .max-w-screen-2xl { max-width: 1536px; margin-left: auto; margin-right: auto; }
}

footer .rounded-t-\[32px\] { border-top-left-radius: 32px; border-top-right-radius: 32px; }
footer .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
footer .py-12 { padding-top: 3rem; padding-bottom: 3rem; }

footer .text-stone-500 { color: #78716c; }
footer a.text-stone-500 { color: #78716c; text-decoration: none; transition: color 0.2s; }
footer a.text-stone-500:hover { color: var(--primary); }

.footer-links {
    margin-bottom: var(--space-md);
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--on-surface-variant);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links a i {
    margin-right: 0.35rem;
}

.footer-container p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--on-surface-variant);
}

.footer-container a {
    color: var(--primary);
    text-decoration: none;
}

.footer-container a:hover {
    color: var(--primary-dim);
}

/* ============================================================
   11. Dashboard / Welcome
   ============================================================ */
.welcome h1 {
    font-size: 2rem;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.cta {
    text-align: center;
    padding: var(--space-xl);
}

.cta a {
    color: var(--primary);
    font-weight: 600;
}

.dashboard-overview p {
    font-size: 1.05rem;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    max-width: 800px;
    margin: var(--space-xl) 0;
    background: var(--surface);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevation);
}

/* ============================================================
   12. Login Form (frontend)
   ============================================================ */
.login-form {
    max-width: 420px;
    margin: 3rem auto;
}

.login-form h2 {
    text-align: center;
}

.login-form .hint {
    text-align: center;
    color: var(--on-surface-variant);
    margin-bottom: var(--space-lg);
}

/* ============================================================
   13. Utility
   ============================================================ */
.hint {
    font-size: 0.9rem;
    color: var(--on-surface-variant);
    margin-bottom: 0.75rem;
}

.required {
    color: var(--primary);
}

/* ============================================================
   14. Stats Counter Section
   ============================================================ */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem;
}

@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }
    .stats-section .stat-number {
        font-size: 2.5rem !important;
    }
    .stats-section .stat-label {
        font-size: 0.75rem !important;
    }
}

/* ============================================================
   14. Hero Section
   ============================================================ */
.hero {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    color: var(--on-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--on-primary);
    line-height: 1.2;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    flex: 0 0 280px;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    max-height: 200px;
    filter: drop-shadow(0 4px 12px rgba(77, 33, 40, 0.15));
}

/* ============================================================
   15. Features Section
   ============================================================ */
.features h2 {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--surface-container);
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    background: var(--surface-container-high);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--on-surface);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--on-surface-variant);
    line-height: 1.5;
}

/* ============================================================
   16. About Section
   ============================================================ */
.about {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-content {
    flex: 1;
}

.about-content p {
    margin-bottom: var(--space-md);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--on-surface-variant);
}

.about-image {
    flex: 0 0 200px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    max-height: 150px;
    opacity: 0.6;
}

/* ============================================================
   17. User Quick Stats (logged-in)
   ============================================================ */
.user-quickstats h2 {
    margin-bottom: var(--space-lg);
}

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

.stat-card {
    text-align: center;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--surface-container);
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevation);
}

.stat-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-value {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    font-family: var(--font-body);
}

.stat-detail {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ============================================================
   18. Contact Page
   ============================================================ */
.contact-page section {
    padding: var(--space-xl);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.contact-form-container h2 {
    margin-bottom: var(--space-lg);
}

.contact-form-container .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-success {
    text-align: center;
    padding: var(--space-xl);
}

.contact-success i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: var(--space-md);
}

.contact-success p {
    font-size: 1.1rem;
    margin-bottom: var(--space-lg);
    color: var(--on-surface-variant);
}

/* Contact Info Sidebar */
.contact-info {
    background: var(--surface-container);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: none;
}

.contact-info h3 {
    margin-bottom: var(--space-lg);
    color: var(--on-surface);
}

.contact-detail {
    display: flex;
    gap: 1rem;
    margin-bottom: var(--space-lg);
    align-items: flex-start;
}

.contact-detail i {
    font-size: 1.2rem;
    color: var(--primary);
    min-width: 1.5rem;
    margin-top: 0.2rem;
}

.contact-detail strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.contact-detail p {
    font-size: 0.9rem;
    color: var(--on-surface-variant);
    line-height: 1.5;
}

.contact-social {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: none;
}

.contact-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--surface-container-high);
    color: var(--primary);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.contact-social a:hover {
    background: var(--primary);
    color: var(--on-primary);
}

/* ============================================================
   19. Desktop Navigation Helpers (dropdown arrow rotation)
   ============================================================ */
@media (min-width: 768px) {
    .menu-toggle {
        display: none !important;
    }

    .nav-dropdown-arrow {
        transition: transform 0.2s;
    }

    .nav-dropdown:hover > .nav-dropdown-toggle .nav-dropdown-arrow {
        transform: rotate(180deg);
    }
}

/* ============================================================
   20. Mobile Responsive
   ============================================================ */
@media (max-width: 767px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        flex: 0 0 auto;
    }

    .hero-image img {
        max-height: 120px;
    }

    .about {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .about-image {
        flex: 0 0 auto;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-form-container .form-row {
        grid-template-columns: 1fr;
    }

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

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

/* ============================================================
   21. Container Utility
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* ============================================================
   22. Modal Overlay
   ============================================================ */
.modal-overlay {
    animation: modalFadeIn 0.25s ease;
}

.modal-content {
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content .btn:hover {
    background: var(--primary-dim) !important;
}

/* Scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--surface-container-high);
    border-radius: 3px;
}

@media (max-width: 767px) {
    .modal-content {
        padding: 1.5rem !important;
        max-height: 90vh !important;
    }
    #modal-image {
        height: 160px !important;
    }
}

/* ============================================================
   22. Page Section (for generated pages)
   ============================================================ */
.page-section {
    padding: 3rem 0;
}

.page-section h1 {
    margin-bottom: var(--space-lg);
    color: var(--on-surface);
}
