/* ========================================
   PIPER JAYE BRAND DESIGN SYSTEM
   ========================================
   World-class implementation of sophisticated brand identity
   Coastal elegance meets luxury boutique aesthetic
   ======================================== */

:root {
    /* ========================================
       BRAND COLOR PALETTE - EXACT GUIDELINE COLORS
       ======================================== */
    
    /* 2025 Design Charter Color Tokens - EXACT SPECIFICATIONS */
    --sage: 165 183 159;             /* #A5B79F - Sage Green */
    --mustard: 197 164 70;           /* #C5A446 - Mustard Gold */
    --sand: 217 185 122;             /* #D9B97A - Sand Beige */
    --coral: 225 138 95;             /* #E18A5F - Coral Orange */
    --teal: 53 109 101;              /* #356D65 - Deep Teal */
    --ink: 17 34 34;                 /* #112222 - Deep text color */
    --paper: 255 255 255;            /* White - UI paper */
    
    /* Legacy color mappings for compatibility */
    --color-sage: #A5B79F;           /* Sage Green - primary accent */
    --color-golden: #C5A446;         /* Mustard Gold - luxury highlight */
    --color-sand: #D9B97A;           /* Sand Beige - warm undertones */
    --color-coral: #E18A5F;          /* Coral Orange - organic warmth */
    --color-teal: #356D65;           /* Deep Teal - primary brand color */
    --color-teal-light: #4A8B8B;     /* Light teal - secondary */
    --color-teal-dark: #2A5A5A;      /* Dark teal - depth */
    
    /* Neutral Foundation */
    --color-cream: #FDFBF7;          /* Light cream - primary background */
    --color-cream-warm: #F8F4F0;     /* Warm cream - secondary background */
    --color-text: #2A2A2A;           /* Rich dark text */
    --color-text-light: #6B7280;     /* Muted text */
    --color-text-muted: #9CA3AF;     /* Very light text */
    
    /* ========================================
       TYPOGRAPHY SYSTEM - PALERMO & SOFIA SANS
       ======================================== */
    
    /* Font Families */
    --font-heading: 'Palermo', 'Playfair Display', serif;
    --font-body: 'Sofia Sans', 'Source Sans Pro', sans-serif;
    --font-display: 'Palermo', serif;
    
    /* Typography Scale - Fluid with clamp() */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);    /* 12-14px */
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);      /* 14-16px */
    --text-base: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);    /* 16-18px */
    --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);     /* 18-20px */
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);      /* 20-24px */
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);       /* 24-32px */
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);   /* 30-40px */
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);       /* 36-48px */
    --text-5xl: clamp(3rem, 2.25rem + 3.75vw, 4rem);         /* 48-64px */
    --text-6xl: clamp(3.75rem, 2.75rem + 5vw, 5rem);         /* 60-80px */
    
    /* Letter Spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
    
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* ========================================
       SPACING SYSTEM - 8-POINT SCALE
       ======================================== */
    
    --space-1: 0.25rem;              /* 4px */
    --space-2: 0.5rem;               /* 8px */
    --space-3: 0.75rem;              /* 12px */
    --space-4: 1rem;                 /* 16px */
    --space-6: 1.5rem;               /* 24px */
    --space-8: 2rem;                 /* 32px */
    --space-10: 2.5rem;              /* 40px */
    --space-12: 3rem;                /* 48px */
    --space-16: 4rem;                /* 64px */
    --space-20: 5rem;                /* 80px */
    
    /* Grid System - EXACT CHARTER SPECS */
    --grid-gutter: 24px;
    --grid-gutter-mobile: 16px;
    --container-max: 1200px;
    --hero-max: 1440px;
    
    /* ========================================
       BORDER RADIUS - ORGANIC & SOFT
       ======================================== */
    
    --radius-sm: 0.375rem;           /* 6px */
    --radius-md: 0.5rem;             /* 8px */
    --radius-lg: 0.75rem;            /* 12px */
    --radius-xl: 1rem;               /* 16px */
    --radius-2xl: 1.5rem;            /* 24px */
    --radius-3xl: 2rem;              /* 32px */
    --radius-full: 9999px;           /* Pill shape */
    
    /* ========================================
       SHADOWS - SUBTLE & SOPHISTICATED
       ======================================== */
    
    --shadow-xs: 0 1px 2px rgba(42, 107, 107, 0.05);
    --shadow-sm: 0 1px 3px rgba(42, 107, 107, 0.1), 0 1px 2px rgba(42, 107, 107, 0.06);
    --shadow-md: 0 4px 6px rgba(42, 107, 107, 0.07), 0 2px 4px rgba(42, 107, 107, 0.06);
    --shadow-lg: 0 10px 15px rgba(42, 107, 107, 0.1), 0 4px 6px rgba(42, 107, 107, 0.05);
    --shadow-xl: 0 20px 25px rgba(42, 107, 107, 0.1), 0 10px 10px rgba(42, 107, 107, 0.04);
    --shadow-2xl: 0 25px 50px rgba(42, 107, 107, 0.15);
    
    /* ========================================
       TRANSITIONS - SMOOTH & ELEGANT
       ======================================== */
    
    --transition-fast: 150ms ease-out;
    --transition-normal: 300ms ease-out;
    --transition-slow: 500ms ease-out;
    --transition-bounce: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* ========================================
       GRADIENTS - COASTAL & WARM
       ======================================== */
    
    --gradient-cream: linear-gradient(135deg, var(--color-cream) 0%, var(--color-cream-warm) 100%);
    --gradient-sand: linear-gradient(135deg, var(--color-sand) 0%, #E5C99A 100%);
    --gradient-sage: linear-gradient(135deg, var(--color-sage) 0%, #C5D1C5 100%);
    --gradient-teal: linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-light) 100%);
    --gradient-golden: linear-gradient(135deg, var(--color-golden) 0%, var(--color-terracotta) 100%);
    /* Removed gradient-coastal - no more wave patterns */
    
    /* ========================================
       Z-INDEX SYSTEM
       ======================================== */
    
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ========================================
   BASE STYLES - SOPHISTICATED FOUNDATION
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
    line-height: 1.6;
    color: rgb(var(--ink));
    background: var(--gradient-cream);
    min-height: 100vh;
    font-weight: 400;
}

/* ========================================
   TYPOGRAPHY SYSTEM - PALERMO & SOFIA SANS
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: rgb(var(--ink));
    margin-bottom: var(--space-6);
}

h1 {
    font-size: clamp(2.25rem, 1.6rem + 2.5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-8);
}

h2 {
    font-size: clamp(1.75rem, 1.1rem + 1.6vw, 3rem);
    line-height: 1.1;
    margin-bottom: var(--space-6);
}

h3 {
    font-family: var(--font-body);
    font-size: clamp(1.25rem, 1.05rem + 0.8vw, 2rem);
    line-height: 1.2;
    margin-bottom: var(--space-4);
}

h4 {
    font-family: var(--font-body);
    font-size: var(--text-xl);
    line-height: 1.3;
    margin-bottom: var(--space-3);
}

h5 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    line-height: 1.4;
    margin-bottom: var(--space-2);
}

h6 {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
    margin-bottom: var(--space-2);
}

p {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text);
    margin-bottom: var(--space-4);
    letter-spacing: var(--tracking-normal);
}

p:last-child {
    margin-bottom: 0;
}

/* ========================================
   LAYOUT SYSTEM - AIRY & ELEGANT
   ======================================== */

.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(16px, 5vw, 32px);
    width: 100%;
}

/* ========================================
   HEADER - LUXURY BOUTIQUE AESTHETIC
   ======================================== */

.header {
    background: rgb(var(--paper) / 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    height: 72px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgb(var(--teal) / 0.10);
    transition: var(--transition-normal);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-8);
    width: 100%;
}

/* ========================================
   LOGO - BRAND IDENTITY INTEGRATION
   ======================================== */

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-right: auto;
    width: auto;
    min-width: auto;
    transition: var(--transition-normal);
    height: 100%;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    width: 240px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
}

.logo a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    color: inherit;
    width: auto;
    min-width: auto;
    transition: var(--transition-normal);
    height: 100%;
}

.logo-icon:hover {
    transform: translateY(-1px);
}

.logo-icon img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgb(53, 109, 101, 0.15));
    border-radius: 12px;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    min-width: 120px;
    min-height: 30px;
}

.logo-icon img:hover {
    filter: drop-shadow(0 4px 8px rgba(42, 107, 107, 0.25));
    transform: translateY(-1px);
}

.brand-name {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-coral);
    text-shadow: 0 2px 4px rgba(232, 168, 124, 0.2);
}

/* ========================================
   NAVIGATION - SOPHISTICATED INTERACTIONS
   ======================================== */

.nav {
    display: flex;
    gap: var(--space-8);
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-link {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    color: rgb(var(--teal));
    padding: var(--space-2) var(--space-6);
    transition: var(--transition-normal);
    position: relative;
    background: transparent;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    margin: 0 var(--space-6);
}

.nav-link:hover {
    color: var(--color-teal);
    transform: translateY(-1px);
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}



.nav-link.active {
    color: rgb(var(--coral));
    background: transparent;
    position: relative;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.nav-link.active:hover {
    transform: translateY(-1px);
}

/* Force remove old active styles - ULTRA AGGRESSIVE */
.nav-link.active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    color: #E18A5F !important;
    font-weight: 600 !important;
    position: relative !important;
    text-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Override any existing active styles - ULTRA AGGRESSIVE */
.nav-link.active,
.nav-link.active:hover,
.nav-link.active:focus,
.nav-link.active:active,
.nav-link.active:visited {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
    color: #E18A5F !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Additional specificity to override any conflicting styles */
body .nav-link.active,
html .nav-link.active,
.container .nav-link.active,
.header .nav-link.active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

/* Force remove any navigation lines - ULTRA AGGRESSIVE */
.nav-link::after,
.nav-link::before,
.nav-link.active::after,
.nav-link.active::before,
.nav-link:hover::after,
.nav-link:hover::before,
.nav-link:focus::after,
.nav-link:focus::before,
.nav-link:visited::after,
.nav-link:visited::before,
.nav-link:active::after,
.nav-link:active::before {
    display: none !important;
    content: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    position: static !important;
}

/* Prevent any child elements from creating lines */
.nav-link * {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Force remove any dynamically created swoosh elements */
.nav-link div {
    display: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Prevent any lines from appearing during clicks or transitions */
.nav-link:active,
.nav-link:focus,
.nav-link:target {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.nav-link:active::after,
.nav-link:active::before,
.nav-link:focus::after,
.nav-link:focus::before,
.nav-link:target::after,
.nav-link:target::before {
    display: none !important;
    content: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    position: static !important;
}

/* Disable any transitions that might cause lines to appear */
.nav-link {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
}

/* Prevent any default browser focus styles */
.nav-link:focus {
    outline: none !important;
    outline-offset: 0 !important;
}

/* ========================================
   BUTTON SYSTEM - DESIGN CHARTER COMPLIANT
   ======================================== */

.btn-primary {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    background: rgb(var(--teal));
    color: white;
    padding: var(--space-3) var(--space-8);
    border: none;
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 44px;
    white-space: nowrap;
}

.btn-primary:hover {
    background: color-mix(in srgb, rgb(var(--teal)) 88%, black);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgb(var(--teal) / 0.35);
}

.btn-secondary {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 500;
    background: transparent;
    color: rgb(var(--teal));
    padding: var(--space-3) var(--space-6);
    border: 1px solid rgb(var(--teal));
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 44px;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgb(var(--teal) / 0.08);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgb(var(--teal) / 0.25);
}

/* ========================================
   FORM SYSTEM - SOPHISTICATED INTERACTIONS
   ======================================== */

.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 600;
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-teal);
    letter-spacing: var(--tracking-wide);
}

.form-input,
.form-textarea,
.form-select {
    font-family: var(--font-body);
    font-size: var(--text-base);
    width: 100%;
    padding: var(--space-4);
    border: 2px solid rgba(168, 181, 168, 0.3);
    border-radius: var(--radius-lg);
    background: rgba(253, 251, 247, 0.8);
    color: var(--color-text);
    transition: var(--transition-normal);
    letter-spacing: var(--tracking-normal);
    line-height: var(--leading-normal);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-teal);
    background: rgba(253, 251, 247, 0.95);
    box-shadow: 
        var(--shadow-sm),
        0 0 0 3px rgba(42, 107, 107, 0.1);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: var(--color-sage);
    background: rgba(253, 251, 247, 0.9);
}

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

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%232A6B6B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right var(--space-3) center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: var(--space-10);
}

/* ========================================
   FOOTER - COASTAL ELEGANCE
   ======================================== */

.footer {
    background: #356D65;
    color: white;
    text-align: center;
    padding: var(--space-12) 0;
    margin-top: var(--space-16);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}



.footer-content {
    position: relative;
    z-index: 1;
}

.footer p {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-2);
    letter-spacing: var(--tracking-normal);
}

.footer a {
    color: var(--color-golden);
    text-decoration: none;
    transition: var(--transition-normal);
    font-weight: 500;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE DESIGN - ELEGANT ADAPTATION
   ======================================== */

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    .section-title {
        font-size: var(--text-4xl);
    }
    
    .timeline-card {
        padding: var(--space-6);
        margin-bottom: var(--space-8);
    }
    
    .btn-primary,
    .btn-secondary {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-base);
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    :root {
        --space-16: 3rem;
        --space-12: 2rem;
        --space-8: 1.5rem;
        --space-6: 1rem;
    }
    
    /* Mobile Header - Horizontal Layout */
    .header {
        height: 64px;
        padding: 0 var(--space-3);
    }
    
    .header .container {
        flex-direction: row;
        gap: var(--space-4);
        justify-content: space-between;
        align-items: center;
        height: 100%;
    }
    
    /* Mobile Logo - Larger and More Prominent */
    .logo {
        flex-shrink: 0;
        margin-right: var(--space-4);
    }
    
    .logo-icon {
        width: 160px;
        height: 40px;
        min-width: 160px;
        min-height: 40px;
    }
    
    /* Mobile Navigation - Compact Horizontal */
    .nav {
        gap: var(--space-2);
        flex-wrap: nowrap;
        justify-content: flex-end;
        margin-left: auto;
        flex-shrink: 0;
    }
    
    .nav-link {
        font-size: var(--text-sm);
        padding: var(--space-2) var(--space-3);
        white-space: nowrap;
        margin: 0;
        min-width: auto;
    }
    
    .section-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-4);
    }
    
    .main {
        padding: var(--space-8) 0;
    }
    
    .timeline-card {
        padding: var(--space-4);
        margin-bottom: var(--space-6);
        border-radius: var(--radius-xl);
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        padding: var(--space-3);
        font-size: var(--text-base);
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: var(--space-4);
        font-size: var(--text-lg);
        justify-content: center;
    }
    
    .footer {
        padding: var(--space-8) 0;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-3);
    }
    
    /* Extra Small Mobile Header */
    .header {
        height: 56px;
        padding: 0 var(--space-2);
    }
    
    .header .container {
        gap: var(--space-2);
    }
    
    /* Smaller Logo for Very Small Screens */
    .logo-icon {
        width: 140px;
        height: 35px;
        min-width: 140px;
        min-height: 35px;
    }
    
    /* Compact Navigation for Small Screens */
    .nav {
        gap: var(--space-1);
    }
    
    .nav-link {
        font-size: var(--text-xs);
        padding: var(--space-1) var(--space-2);
        margin: 0;
    }
    
    .section-title {
        font-size: var(--text-2xl);
        letter-spacing: var(--tracking-wide);
    }
    
    .timeline-card {
        padding: var(--space-3);
        margin-bottom: var(--space-4);
    }
}

/* ========================================
   MAIN CONTENT - COASTAL ELEGANCE
   ======================================== */

.main {
    padding: var(--space-16) 0;
    background: var(--gradient-cream);
    position: relative;
    min-height: calc(100vh - 200px);
}

/* ========================================
   SECTION TITLES - PALERMO ELEGANCE
   ======================================== */

.section-title {
    font-family: var(--font-heading);
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--color-teal);
    text-align: center;
    margin-bottom: var(--space-6);
    text-shadow: 0 4px 8px rgba(42, 107, 107, 0.1);
    position: relative;
    letter-spacing: var(--tracking-wider);
    line-height: var(--leading-tight);
}

.section-title::before {
    content: '';
    position: absolute;
    top: -var(--space-5);
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-sage);
    border-radius: var(--radius-full);
    opacity: 0.8;
    box-shadow: var(--shadow-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -var(--space-5);
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-golden);
    border-radius: var(--radius-full);
    opacity: 0.7;
    box-shadow: var(--shadow-xs);
}

/* Consistent title styling across all pages */
.section-title,
.slideshow-title,
h1, h2, h3 {
    font-family: 'Palermo', 'Playfair Display', serif !important;
    color: var(--color-teal) !important;
    text-align: center !important;
}

/* Memory titles use Sofia Sans */
.memory-title {
    font-family: 'Source Sans Pro', 'Sofia Sans', sans-serif !important;
    color: #000000 !important;
    text-align: center !important;
}

/* Slideshow attribution uses Sofia Sans */
#slideAttribution {
    font-family: 'Source Sans Pro', 'Sofia Sans', sans-serif !important;
    color: #000000 !important;
    font-weight: 600 !important;
}

/* Enhanced Timeline Styling */
.timeline-hero {
    background: var(--gradient-cream);
    padding: 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.timeline-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.4;
    pointer-events: none;
}

.timeline-section {
    position: relative;
    z-index: 1;
}

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

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        rgba(244, 209, 174, 0.4), 
        rgba(168, 181, 168, 0.3), 
        rgba(42, 107, 107, 0.25), 
        rgba(168, 181, 168, 0.3), 
        rgba(244, 209, 174, 0.4)
    );
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 
        0 0 8px rgba(244, 209, 174, 0.3),
        0 0 4px rgba(168, 181, 168, 0.2);
}

.timeline-items {
    position: relative;
    z-index: 2;
}

.timeline-card {
    background: linear-gradient(135deg, 
        rgba(253, 251, 247, 0.98) 0%, 
        rgba(244, 209, 174, 0.06) 25%, 
        rgba(168, 181, 168, 0.04) 50%, 
        rgba(212, 165, 116, 0.03) 75%, 
        rgba(253, 251, 247, 0.98) 100%
    );
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    margin-bottom: var(--space-10);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    border: 1px solid rgba(168, 181, 168, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(168, 181, 168, 0.6), 
        rgba(42, 107, 107, 0.4), 
        rgba(244, 209, 174, 0.6)
    );
    opacity: 0.8;
}

.timeline-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-2xl);
    border-color: rgba(168, 181, 168, 0.4);
}

.timeline-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
    font-style: italic;
    background: linear-gradient(135deg, 
        rgba(253, 251, 247, 0.8) 0%, 
        rgba(248, 244, 240, 0.9) 100%
    );
    border-radius: 16px;
    border: 2px dashed rgba(168, 181, 168, 0.3);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Gallery Section */
.gallery-section {
    margin-bottom: 5rem;
}

.upload-cta {
    background: linear-gradient(135deg, 
        rgba(253, 251, 247, 0.95) 0%, 
        rgba(244, 209, 174, 0.12) 25%, 
        rgba(168, 181, 168, 0.1) 50%, 
        rgba(212, 165, 116, 0.08) 75%, 
        rgba(253, 251, 247, 0.95) 100%
    );
    border: 2px solid var(--color-sage);
    border-radius: 20px;
    padding: 4rem 3rem;
    text-align: center;
    margin-bottom: 4rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(42, 107, 107, 0.12),
        0 4px 16px rgba(168, 181, 168, 0.1),
        0 2px 8px rgba(244, 209, 174, 0.08);
}

.upload-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(168, 181, 168, 0.1), 
        transparent
    );
    transition: left 0.6s ease;
}

.upload-cta:hover::before {
    left: 100%;
}

.upload-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.cta-content i {
    font-size: 3rem;
    color: var(--color-teal);
    margin-bottom: 1rem;
}

.cta-content h3 {
    font-size: 1.8rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.cta-content p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

.refresh-notice {
    background: rgba(42, 107, 107, 0.1);
    border: 1px solid var(--color-sage);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.refresh-notice p {
    color: var(--color-text);
    margin: 0;
    font-size: 0.9rem;
}

.refresh-notice i {
    color: var(--color-teal);
    margin-right: 0.5rem;
}

.upload-area {
    background: rgba(255, 255, 255, 0.8);
    border: 2px dashed var(--color-teal);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--color-coral);
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(232, 168, 124, 0.1), transparent);
    transition: left 0.5s;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-content i {
    font-size: 3rem;
    color: var(--color-teal);
    margin-bottom: 1rem;
}

.upload-content h3 {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: var(--color-text-light);
}

#photoUpload {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
    padding: 20px;
}

    .gallery-item {
        background: white;
        border-radius: 0;
        overflow: visible;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: var(--transition);
        cursor: pointer;
        position: relative;
        padding: 15px;
        transform: rotate(-2deg);
        margin: 10px;
    }

    .polaroid-content {
        position: relative;
        background: white;
        padding: 15px 15px 40px 15px;
        border-radius: 0;
    }

.gallery-item:nth-child(even) {
    transform: rotate(1deg);
}

.gallery-item:nth-child(3n) {
    transform: rotate(-1deg);
}

.gallery-item:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
    border: 1px solid #e0e0e0;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

    .gallery-item-overlay {
        position: absolute;
        bottom: 15px;
        left: 15px;
        right: 15px;
        background: rgba(255, 255, 255, 0.95);
        color: #333;
        padding: 1rem;
        transform: translateY(100%);
        transition: var(--transition);
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .polaroid-title {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        color: #333;
        padding: 8px 12px;
        font-family: 'Dancing Script', cursive;
        font-size: 16px;
        font-weight: 600;
        text-align: center;
        border-radius: 0;
    }

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

.gallery-item-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-item-date {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Guestbook Section */
.guestbook-section {
    background: rgba(255, 255, 255, 0.5);
    padding: 4rem 0;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.guestbook-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(90, 139, 139, 0.2);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-coral);
    box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-teal), #1f5a5a);
    color: white;
    box-shadow: 0 4px 15px rgba(42, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 107, 107, 0.4);
}

.btn-danger {
    background: #dc3545;
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Guestbook Messages */
.guestbook-messages {
    max-width: 800px;
    margin: 0 auto;
}

.message {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--color-sage);
    transition: var(--transition);
}

.message:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-medium);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.message-header h4 {
    color: var(--color-teal);
    font-weight: 600;
}

.message-date {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.message p {
    color: var(--color-text);
    line-height: 1.7;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightboxImage {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-caption {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: #356D65;
    border-top: 2px solid #A8B5A8;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    box-shadow: 0 -2px 20px rgba(42, 107, 107, 0.06);
    position: relative;
}

/* Removed footer::before rule - no more wave lines */

.footer-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    /* Enhanced footer logo container */
    padding: 6px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.03), rgba(90, 139, 139, 0.03));
    transition: all 0.3s ease;
}

.footer-logo:hover {
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.08), rgba(90, 139, 139, 0.08));
    transform: translateY(-1px);
}

.footer-content p {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.logo-icon.small {
    width: 250px;
    height: 125px;
}

.logo-icon.small img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    /* Optimized for transparent horizontal footer logo */
    filter: drop-shadow(0 3px 6px rgba(42, 107, 107, 0.2));
    border-radius: 0;
    background: transparent;
    transition: all 0.3s ease;
    /* Match actual footer logo dimensions from HTML */
    min-width: 200px;
    min-height: 100px;
}

.logo-icon.small img:hover {
    filter: drop-shadow(0 2px 6px rgba(42, 107, 107, 0.2));
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 15px;
    }
    
    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .brand-name {
        font-size: 2rem;
    }
    
    .logo-icon img {
        width: 100%;
        height: 100%;
        min-width: 120px;
        min-height: 30px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .memory-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .memory-header {
        padding: 1rem 0;
    }
    
    .back-link {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
        padding: 10px;
    }
    
    .lightbox-nav {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        padding: 0 10px;
    }
    
    .logo-icon img {
        width: 100%;
        height: 100%;
        min-width: 90px;
        min-height: 22px;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .memory-title {
        font-size: 1.8rem;
        line-height: 1.1;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .guestbook-form {
        padding: 1.5rem;
    }
    
    .message {
        padding: 1.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(232, 168, 124, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-coral);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Upload Page Styles */
.upload-section {
    margin-bottom: 3rem;
}

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

.instruction-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.instruction-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.instruction-card i {
    font-size: 2.5rem;
    color: var(--color-coral);
    margin-bottom: 1rem;
}

.instruction-card h3 {
    color: var(--color-text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.instruction-card p {
    color: var(--color-text-light);
    line-height: 1.6;
}

.upload-area-large {
    background: rgba(255, 255, 255, 0.8);
    border: 3px dashed var(--color-teal);
    border-radius: var(--border-radius);
    padding: 4rem;
    text-align: center;
    margin-bottom: 3rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.upload-area-large:hover {
    border-color: var(--color-coral);
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.upload-area-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(232, 168, 124, 0.1), transparent);
    transition: left 0.5s;
}

.upload-area-large:hover::before {
    left: 100%;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-content i {
    font-size: 4rem;
    color: var(--color-teal);
    margin-bottom: 1.5rem;
}

.upload-content h3 {
    font-size: 2rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.upload-content p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--color-coral);
    font-style: italic;
}

.upload-form {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 3rem;
}

.upload-form h3 {
    color: var(--color-coral);
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

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

.uploaded-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.selected-photo {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.selected-photo:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.selected-photo img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.photo-info {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-name {
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.btn-remove {
    background: var(--color-coral);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #D4946A;
    transform: scale(1.1);
}

.success-message {
    background: var(--color-coral);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-medium);
}

.upload-success {
    background: var(--color-teal);
    margin: 1rem 0;
    animation: slideIn 0.3s ease-out;
}

.success-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-message h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.success-message p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-secondary {
    background: var(--color-teal);
    color: white;
    box-shadow: 0 4px 15px rgba(90, 139, 139, 0.3);
}

.btn-secondary:hover {
    background: #4A7A7A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 139, 139, 0.4);
}

/* Success message animation */
.success-message {
    background: var(--color-coral);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty state styling */
.no-photos-message {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin: 2rem 0;
}

.no-photos-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-photos-message h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: var(--color-coral);
    margin-bottom: 1rem;
}

.no-photos-message p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.upload-link {
    display: inline-block;
    background: var(--color-teal);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.upload-link:hover {
    background: #4A7A7A;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Enhanced form styling for upload page */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%235A8B8B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

.form-group select:hover {
    border-color: var(--color-coral);
    background-color: rgba(232, 168, 124, 0.05);
}

/* Enhanced file input styling */
input[type="file"] {
    position: relative;
    padding: 1.5rem;
    border: 2px dashed rgba(90, 139, 139, 0.3);
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.05), rgba(90, 139, 139, 0.05));
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

input[type="file"]:hover {
    border-color: var(--color-coral);
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), rgba(90, 139, 139, 0.1));
    transform: translateY(-1px);
}

input[type="file"]:focus {
    outline: none;
    border-color: var(--color-coral);
    box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.1);
}

/* Enhanced submit button */
input[type="submit"] {
    background: linear-gradient(135deg, var(--color-teal), #4A7A7A);
    color: white;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(90, 139, 139, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="submit"]:hover {
    background: linear-gradient(135deg, #4A7A7A, var(--color-teal));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 139, 139, 0.4);
}

input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(90, 139, 139, 0.3);
}

/* Memory Page Styles */
.memory-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.memory-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-teal);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: var(--transition);
    position: absolute;
    left: 0;
    top: 0;
}

.back-link:hover {
    color: var(--color-coral);
    transform: translateX(-5px);
}

.memory-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-coral);
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(232, 168, 124, 0.2);
}

.memory-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--color-text-light);
    font-size: 1.2rem;
}

.memory-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.memory-image-container {
    text-align: center;
}

.memory-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.memory-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.memory-message {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-text);
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.edit-btn {
    align-self: flex-start;
    transform: scale(0.75);
    transform-origin: left top;
}

.edit-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin-top: 2rem;
}

.edit-section h3 {
    color: var(--color-coral);
    margin-bottom: 1.5rem;
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
}

.edit-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Comments Section */
.comments-section {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.comments-section h3 {
    color: var(--color-coral);
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.comment-form {
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(90, 139, 139, 0.05);
    border-radius: var(--border-radius);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    background: rgba(232, 168, 124, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--color-coral);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-header strong {
    color: var(--color-coral);
    font-weight: 600;
}

.comment-date {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

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

.no-comments {
    text-align: center;
    color: var(--color-text-light);
    font-style: italic;
    padding: 2rem;
}

/* Clickable Polaroid Links */
.polaroid-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.polaroid-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.polaroid-link:hover .polaroid-content {
    box-shadow: var(--shadow-medium);
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.error-message h2 {
    color: var(--color-coral);
    margin-bottom: 1rem;
}

/* Responsive Design for Memory Pages */
@media (max-width: 768px) {
    .memory-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .memory-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .edit-buttons {
        flex-direction: column;
    }
    
    .comments-section {
        padding: 2rem 1rem;
    }
}

/* Slideshow Styles */
.slideshow-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.slideshow-header {
    text-align: center;
    margin-bottom: 3rem;
}

.slideshow-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: var(--color-coral);
    margin-bottom: 1rem;
}

.slideshow-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-light);
}

.slideshow-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.slideshow-btn {
    background: var(--color-teal);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.slideshow-btn:hover {
    background: #4A7A7A;
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
}

.slideshow-info {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    font-weight: 500;
    color: var(--color-text);
}

.slideshow-display {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    margin-bottom: 0.125rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    min-height: 600px;
    width: 100%;
    max-width: 900px;
}

.slide-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.125rem;
    width: 100%;
    max-width: 800px;
}

.slide-image-container img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.slide-attribution {
    text-align: center;
    margin-top: 1rem;
}

.memory-link {
    display: inline-block;
    color: var(--color-teal);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: rgba(90, 139, 139, 0.05);
}

.memory-link:hover {
    color: var(--color-coral);
    background: rgba(232, 168, 124, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.slideshow-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(90, 139, 139, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-teal), var(--color-coral));
    transition: width 0.3s ease;
}

.slideshow-thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-teal) transparent;
}

.slideshow-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.slideshow-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.slideshow-thumbnails::-webkit-scrollbar-thumb {
    background: var(--color-teal);
    border-radius: 3px;
}

/* ========================================
   BUTTON SYSTEM - LUXURY BOUTIQUE AESTHETIC
   ======================================== */

.btn-primary {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 600;
    background: var(--gradient-teal);
    color: white;
    padding: var(--space-4) var(--space-8);
    border: none;
    border-radius: var(--radius-full);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: var(--transition-normal);
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    letter-spacing: var(--tracking-wide);
    min-height: 48px;
    white-space: nowrap;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(42, 107, 107, 0.3),
        0 3px 10px rgba(168, 181, 168, 0.15);
}

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

.btn-secondary {
    background: linear-gradient(135deg, 
        rgba(168, 181, 168, 0.95), 
        rgba(197, 209, 197, 0.9),
        rgba(168, 181, 168, 0.95)
    );
    color: var(--color-text);
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-family: 'Sofia Sans', 'Source Sans Pro', sans-serif;
    text-decoration: none;
    display: inline-block;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 
        0 4px 16px rgba(168, 181, 168, 0.25),
        0 2px 8px rgba(42, 107, 107, 0.1),
        0 1px 4px rgba(244, 209, 174, 0.08);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(168, 181, 168, 0.3),
        0 3px 10px rgba(42, 107, 107, 0.15);
}

/* Enhanced Form Styling */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-teal);
    font-family: 'Sofia Sans', 'Source Sans Pro', sans-serif;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(168, 181, 168, 0.4);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Sofia Sans', 'Source Sans Pro', sans-serif;
    background: linear-gradient(135deg, 
        rgba(253, 251, 247, 0.95) 0%, 
        rgba(244, 209, 174, 0.05) 50%, 
        rgba(255, 255, 255, 0.95) 100%
    );
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(168, 181, 168, 0.15),
        0 1px 4px rgba(244, 209, 174, 0.08),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 
        0 0 0 3px rgba(42, 107, 107, 0.15),
        0 4px 12px rgba(168, 181, 168, 0.25),
        0 2px 6px rgba(244, 209, 174, 0.12),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    background: linear-gradient(135deg, 
        rgba(253, 251, 247, 0.98) 0%, 
        rgba(244, 209, 174, 0.08) 50%, 
        rgba(255, 255, 255, 0.98) 100%
    );
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.thumbnail.active {
    border: 3px solid var(--color-coral);
    transform: scale(1.1);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
}

.slideshow-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.slideshow-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.slideshow-empty h2 {
    color: var(--color-coral);
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.slideshow-empty p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* Responsive Design for Slideshow */
@media (max-width: 768px) {
    .slide {
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .slide-image-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .slide-image-container img {
        max-height: 300px;
    }
    
    .slideshow-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .slideshow-thumbnails {
        gap: 0.5rem;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .memory-link {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
} 

/* ========================================
   CONSISTENT SPACING - HEADER TO CONTENT
   ======================================== */

/* Main content spacing - consistent across all pages */
.main {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
    min-height: calc(100vh - 200px); /* Account for header and footer */
}

/* Slideshow container - provides consistent spacing */
.slideshow-container {
    margin-bottom: var(--space-6);
}

/* Page title spacing - consistent across all pages */
.slideshow-header,
.memory-header {
    margin-bottom: var(--space-6);
    text-align: center;
}

/* Page titles - consistent styling */
.slideshow-title,
.memory-title {
    font-family: var(--font-body);
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--color-teal);
    margin-bottom: var(--space-4);
    letter-spacing: var(--tracking-wider);
    line-height: var(--leading-tight);
}

/* Page subtitles - consistent styling */
.slideshow-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-xl);
    color: var(--color-text-light);
    margin-bottom: var(--space-6);
    letter-spacing: var(--tracking-wide);
    line-height: var(--leading-relaxed);
}

/* Memory page specific spacing */
.memory-container {
    max-width: 800px;
    margin: 0 auto;
}

.memory-meta {
    margin-bottom: var(--space-6);
}

.memory-contributor {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    color: var(--color-text-light);
    font-style: italic;
}

/* Back link spacing */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-teal);
    text-decoration: none;
    margin-bottom: var(--space-3);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
    background: rgba(42, 107, 107, 0.05);
}

.back-link:hover {
    background: rgba(42, 107, 107, 0.1);
    transform: translateX(-4px);
}

/* Mobile responsive spacing adjustments */
@media (max-width: 768px) {
    .main {
        padding-top: var(--space-4);
        padding-bottom: var(--space-4);
    }
    
    .slideshow-header,
    .memory-header {
        margin-bottom: var(--space-4);
    }
    
    .slideshow-title,
    .memory-title {
        font-size: var(--text-4xl);
        margin-bottom: var(--space-3);
    }
    
    .slideshow-subtitle {
        font-size: var(--text-lg);
        margin-bottom: var(--space-4);
    }
    
    .back-link {
        margin-bottom: var(--space-2);
        font-size: var(--text-sm);
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .main {
        padding-top: var(--space-3);
        padding-bottom: var(--space-3);
    }
    
    .slideshow-header,
    .memory-header {
        margin-bottom: var(--space-3);
    }
    
    .slideshow-title,
    .memory-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-2);
    }
    
    .slideshow-subtitle {
        font-size: var(--text-base);
        margin-bottom: var(--space-3);
    }
}

/* ========================================
   LOGO STYLES - CRITICAL FOR ALL PAGES
   ======================================== */

/* Desktop Logo Icon */
.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    width: 240px;
    height: 60px;
    flex-shrink: 0;
    margin-left: 0;
    overflow: hidden;
}

/* Desktop Logo Image */
.logo-icon img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgb(53, 109, 101, 0.15));
    border-radius: 12px;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    min-width: 120px;
    min-height: 30px;
    margin-left: 0;
    user-select: none;
}

/* Logo Container */
.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    width: auto;
    max-width: 100%;
    overflow: hidden;
}

.logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    width: auto;
    max-width: 100%;
}

/* Logo Hover Effects */
.logo-icon:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 4px 12px rgb(53, 109, 101, 0.2));
}

.logo-icon img:hover {
    transform: scale(1.02);
}

/* ========================================
   MOBILE LOGO STYLES - CRITICAL FOR MOBILE VISIBILITY
   ======================================== */

/* Mobile Logo Styles */
@media (max-width: 768px) {
    .logo-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 160px !important;
        height: 40px !important;
        min-width: 160px !important;
        min-height: 40px !important;
        background: transparent !important;
        border: none !important;
        position: relative !important;
        z-index: 9999 !important;
        overflow: visible !important;
    }
    
    .logo-icon img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: transparent !important;
        border: none !important;
        position: relative !important;
        z-index: 10000 !important;
        filter: none !important;
    }
    
    .logo {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-width: 160px !important;
        min-height: 40px !important;
        background: transparent !important;
        border: none !important;
        position: relative !important;
        z-index: 9998 !important;
        overflow: visible !important;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .logo-icon {
        width: 100px !important;
        height: 25px !important;
        min-width: 100px !important;
        min-height: 25px !important;
    }
}

/* Ultra Small Mobile */
@media (max-width: 360px) {
    .logo-icon {
        width: 120px !important;
        height: 30px !important;
        min-width: 120px !important;
        min-height: 30px !important;
    }
}

/* ========================================
   END OF LOGO STYLES
   ======================================== */