/* ========================================
   LIGHT & DARK THEME - PREMIUM DESIGN
   ======================================== */

:root {
    /* LIGHT THEME (Default) */
    --bg-light: #F5F1ED;
    --text-light: #2C2C2C;
    --primary-gold-light: #D4AF37;
    --white-card-light: #FFFFFF;
    --border-light: #D4C5B9;
    --primary-blue-light: #A8C5DC;
    --footer-light: #E8E3DD;
    
    /* DARK THEME */
    --bg-dark: #082A42;
    --text-dark: #F0F0F0;
    --primary-gold-dark: #D4AF37;
    --white-card-dark: #0D3F61;
    --border-dark: #1A5073;
    --primary-blue-dark: #8FA8BD;
    --footer-dark: #051729;
}

/* ========================================
   BASE TYPOGRAPHY
   ======================================== */
* {
    font-family: 'Montserrat', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-light);
    transition: all 0.4s ease;
    position: relative;
    overflow-x: hidden;
    animation: fadeIn 1500ms ease-in-out;
}

/* DARK MODE - Body Styles */
html.dark body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* Multiple layered textures for premium effect - LIGHT */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(168, 197, 220, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(168, 197, 220, 0.05) 0%, transparent 40%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(168, 197, 220, 0.01) 10px,
            rgba(168, 197, 220, 0.01) 20px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            rgba(212, 175, 55, 0.01) 10px,
            rgba(212, 175, 55, 0.01) 20px
        );
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4"/></filter><rect width="100" height="100" fill="rgba(168,197,220,0.02)" filter="url(%23noise)"/></svg>');
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* DARK MODE - Background Textures */
body.dark::before {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(26, 80, 115, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(212, 175, 55, 0.01) 10px,
            rgba(212, 175, 55, 0.01) 20px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            rgba(26, 80, 115, 0.01) 10px,
            rgba(26, 80, 115, 0.01) 20px
        );
}

body.dark::after {
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4"/></filter><rect width="100" height="100" fill="rgba(212,175,55,0.02)" filter="url(%23noise)"/></svg>');
}

main {
    position: relative;
    z-index: 1;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        filter: blur(20px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    background-color: var(--primary-gold-light);
    color: var(--text-light);
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(212, 175, 55, 0.2),
        0 0 0 0 rgba(212, 175, 55, 0.2);
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 25px rgba(212, 175, 55, 0.3),
        0 0 20px rgba(212, 175, 55, 0.5);
}

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

/* DARK MODE - Button */
html.dark .btn-primary {
    background-color: var(--primary-gold-dark);
    color: var(--bg-dark);
    box-shadow: 
        0 4px 15px rgba(212, 175, 55, 0.3),
        0 0 0 0 rgba(212, 175, 55, 0.3);
}

html.dark .btn-primary:hover {
    box-shadow: 
        0 10px 25px rgba(212, 175, 55, 0.4),
        0 0 20px rgba(212, 175, 55, 0.6);
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background-color: var(--white-card-light);
    color: var(--text-light);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-gold-light), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.12),
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card:hover::before {
    opacity: 1;
    animation: shimmer 1.5s infinite;
}

/* DARK MODE - Card */
html.dark .card {
    background-color: var(--white-card-dark);
    color: var(--text-dark);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: var(--border-dark);
}

html.dark .card::before {
    background: linear-gradient(90deg, transparent, var(--primary-gold-dark), transparent);
}

html.dark .card:hover {
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ========================================
   HEADER
   ======================================== */
header {
    background: linear-gradient(135deg, rgba(168, 197, 220, 0.4) 0%, rgba(245, 241, 237, 0.4) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

/* DARK MODE - Header */
html.dark header {
    background: linear-gradient(135deg, rgba(13, 63, 97, 0.7) 0%, rgba(8, 42, 66, 0.7) 100%);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--border-dark);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: linear-gradient(135deg, var(--footer-light) 0%, #DDD5CE 100%);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-gold-light), transparent);
    opacity: 0.3;
}

/* DARK MODE - Footer */
html.dark footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #05152d 100%);
    color: var(--text-dark);
}

html.dark footer::before {
    background: linear-gradient(90deg, transparent, var(--primary-gold-dark), transparent);
}

/* ========================================
   ACCENT COLOR
   ======================================== */
.accent {
    color: var(--primary-gold-light);
    transition: all 0.3s ease;
}

/* DARK MODE - Accent */
html.dark .accent {
    color: var(--primary-gold-dark);
}

a.accent:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* ========================================
   BORDERS
   ======================================== */
.border-custom {
    border-color: var(--border-light);
}

/* DARK MODE - Border */
html.dark .border-custom {
    border-color: var(--border-dark);
}

/* ========================================
   FORMS
   ======================================== */
input, textarea, select {
    border: 1.5px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    background-color: var(--white-card-light);
    color: var(--text-light);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-gold-light);
    box-shadow: 
        0 0 0 3px rgba(212, 175, 55, 0.15),
        0 0 0 1px var(--primary-gold-light);
    transform: translateY(-2px);
}

/* DARK MODE - Forms */
html.dark input, 
html.dark textarea, 
html.dark select {
    border-color: var(--border-dark);
    background-color: var(--white-card-dark);
    color: var(--text-dark);
}

html.dark input:focus, 
html.dark textarea:focus, 
html.dark select:focus {
    border-color: var(--primary-gold-dark);
    box-shadow: 
        0 0 0 3px rgba(212, 175, 55, 0.2),
        0 0 0 1px var(--primary-gold-dark);
}

/* ========================================
   LINKS
   ======================================== */
a {
    transition: all 0.3s ease;
    text-decoration: none;
}

a:hover {
    color: var(--primary-gold-light);
}

/* DARK MODE - Links */
html.dark a:hover {
    color: var(--primary-gold-dark);
}

/* ========================================
   IMAGES
   ======================================== */
img {
    transition: transform 0.4s ease, filter 0.4s ease;
}

.card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 768px) {
    .card {
        padding: 1.5rem;
    }
    
    .btn-primary {
        padding: 0.875rem 2rem;
        font-size: 0.95rem;
    }
}

/* ========================================
   SECTIONS
   ======================================== */
section {
    position: relative;
    z-index: 1;
    background-color: var(--bg-light);
}

/* DARK MODE - Sections */
html.dark section {
    background-color: var(--bg-dark);
}

section.card {
    border-radius: 0;
    box-shadow: none;
    border: none;
}
