/*
    Table of Contents
    -----------------
    1. :root Variables - Colors, Fonts, Spacing
    2. Global Styles & Typography - Base setup for body, headings, links
    3. Layout & Helpers - .container, column system
    4. Header & Navigation - Fixed header, nav links, burger menu
    5. Footer - Layout, links, and text styles
    6. Component Styles - Buttons, Forms, Cards, Timeline, Toggle Switch, etc.
    7. Section Styles - Hero and general section padding/backgrounds
    8. Page-Specific Styles - Success, Privacy, Terms pages
    9. Animations & Transitions - ScrollReveal initial state
    10. Media Queries - Responsive adjustments for tablet and mobile
*/

/* 1. :root Variables */
:root {
    /* Color Palette (Tetradic) */
    --color-primary: #0D47A1;    /* Deep Blue - Main action color */
    --color-secondary: #2E7D32;  /* Forest Green - Trust, growth */
    --color-accent: #FF6F00;     /* Amber Orange - Call to action, energy */
    --color-complement: #8E24AA; /* Purple - Sophistication (optional accent) */

    /* Neumorphism Base */
    --bg-color: #E0E5EC;
    --bg-color-light: #f8f9fa; /* For alternating sections */
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;

    /* Text Colors */
    --text-color-dark: #333745;
    --text-color-light: #FFFFFF;
    --heading-color: #222222;

    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans Pro', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;  /* 8px */
    --spacing-sm: 1rem;    /* 16px */
    --spacing-md: 1.5rem;  /* 24px */
    --spacing-lg: 2rem;    /* 32px */
    --spacing-xl: 4rem;    /* 64px */

    /* Borders */
    --border-radius-sm: 8px;
    --border-radius-md: 15px;

    /* Transitions */
    --transition-speed: 0.3s;
}

/* 2. Global Styles & Typography */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.7;
    background-color: var(--bg-color);
    color: var(--text-color-dark);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--spacing-sm);
    max-width: 75ch;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover, a:focus {
    color: var(--color-accent);
    text-decoration: underline;
}

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

/* 3. Layout & Helpers */
.main-container {
    width: 100%;
    margin: 0 auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.columns-container {
    display: grid;
    gap: var(--spacing-lg);
    grid-template-columns: 1fr;
}

.column {
    width: 100%;
}

@media (min-width: 768px) {
    .columns-container {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* 4. Header & Navigation */
.header {
    background: rgba(224, 229, 236, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(163, 177, 198, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background var(--transition-speed) ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}
.logo:hover {
    color: var(--heading-color);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-list a {
    color: var(--text-color-dark);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    position: relative;
    padding: var(--spacing-xs) 0;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-speed) ease;
}

.nav-list a:hover::after, .nav-list a:focus::after {
    width: 100%;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color-dark);
    margin: 5px 0;
    transition: all var(--transition-speed) ease;
}

/* 5. Footer */
.footer {
    background-color: var(--heading-color);
    color: var(--text-color-light);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-column h4 {
    color: var(--text-color-light);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

.footer-column p, .footer-column a {
    color: #ccc;
    line-height: 1.6;
}

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

.footer-column ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-column ul a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: var(--spacing-md);
    color: #aaa;
    font-size: 0.9rem;
}

/* 6. Component Styles */

/* Buttons (Global) */
.btn, button[type="submit"] {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-speed) ease-in-out;
}

.btn-primary, button[type="submit"] {
    background-color: var(--color-primary);
    color: var(--text-color-light);
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
}

.btn-primary:hover, .btn-primary:focus, button[type="submit"]:hover, button[type="submit"]:focus {
    transform: translateY(-3px);
    box-shadow: 8px 8px 15px var(--shadow-dark), -8px -8px 15px var(--shadow-light);
    color: var(--text-color-light);
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--bg-color);
    color: var(--color-primary);
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    text-decoration: none;
}

.btn-text {
    background: none;
    color: var(--color-accent);
    padding: var(--spacing-xs) 0;
    font-weight: 700;
    text-decoration: underline;
}
.btn-text:hover, .btn-text:focus {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Forms (Neumorphic) */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    background: var(--bg-color);
    border-radius: var(--border-radius-md);
    box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
}

.form-group {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.neumorphic-input {
    width: 100%;
    padding: 14px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-color-dark);
    background-color: var(--bg-color);
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    transition: box-shadow var(--transition-speed) ease;
}

.neumorphic-input:focus {
    outline: none;
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light), 0 0 0 2px var(--color-primary);
}

.form-group label {
    position: absolute;
    top: 14px;
    left: 14px;
    color: #666;
    pointer-events: none;
    transition: all var(--transition-speed) ease;
}

.neumorphic-input:focus + label, .neumorphic-input:not(:placeholder-shown) + label {
    top: -22px;
    left: 5px;
    font-size: 0.85rem;
    color: var(--color-primary);
}

/* Cards */
.card, .neumorphic-card, .service-card, .testimonial-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    text-align: center;
    align-items: center;
}

.neumorphic-card {
    padding: var(--spacing-lg);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}
.neumorphic-card:hover {
    transform: translateY(-5px);
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
}
.card-image {
    margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-lg);
    height: 250px;
    width: calc(100% + 2 * var(--spacing-lg));
    overflow: hidden;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}
.neumorphic-card:hover .card-image img {
    transform: scale(1.05);
}
.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    width: 100%;
}
.card-content p { margin-bottom: var(--spacing-md); }

.service-card {
    background-color: var(--bg-color-light);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--color-primary);
    text-align: left;
    padding: var(--spacing-lg);
}

.testimonial-card {
    text-align: left;
    padding: var(--spacing-lg);
}
.testimonial-card blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: var(--spacing-md);
    font-style: italic;
    margin-bottom: var(--spacing-md);
}
.testimonial-card cite {
    font-weight: 600;
    color: var(--color-primary);
    display: block;
    text-align: right;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: rgba(13, 71, 161, 0.3);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-color-light);
    border: 4px solid var(--color-accent);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after { left: -10px; }
.timeline-content { position: relative; }
.timeline-date {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--color-secondary);
    color: var(--text-color-light);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Toggle Switch */
.toggle-switch-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}
.toggle-label { font-weight: 600; }
.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: var(--transition-speed);
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.2);
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition-speed);
}
input:checked + .slider { background-color: var(--color-secondary); }
input:checked + .slider:before { transform: translateX(26px); }

/* Awards */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    text-align: center;
}
.award-item img {
    margin: 0 auto var(--spacing-sm);
    filter: grayscale(50%);
    opacity: 0.8;
    transition: all var(--transition-speed) ease;
}
.award-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}
.award-item p { font-size: 1rem; }

/* Resource List */
.resource-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}
.resource-list li { margin-bottom: var(--spacing-sm); }
.resource-list a {
    display: block;
    padding: var(--spacing-md);
    background: var(--bg-color-light);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all var(--transition-speed) ease;
}
.resource-list a:hover {
    transform: translateX(10px);
    background-color: var(--bg-color);
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    text-decoration: none;
}

/* 7. Section Styles */
.hero-section {
    color: var(--text-color-light);
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-sm);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}
.hero-content { max-width: 800px; }
.hero-title {
    font-size: 4rem;
    color: var(--text-color-light);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin-bottom: var(--spacing-md);
}
.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-lg);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

.section { padding: var(--spacing-xl) 0; }
.section-light { background-color: var(--bg-color-light); }
.section-title { text-align: center; margin-bottom: var(--spacing-sm); }
.section-subtitle {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    color: #555;
    font-size: 1.15rem;
}

/* 8. Page-Specific Styles */
.success-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: var(--spacing-md);
}
.success-container {
    padding: var(--spacing-xl);
    background: var(--bg-color);
    border-radius: var(--border-radius-md);
    box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
}

.content-page-wrapper {
    padding-top: 120px; /* 80px header + 40px space */
    padding-bottom: var(--spacing-xl);
}
.content-page-wrapper .container {
    max-width: 800px;
    background: var(--bg-color-light);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}
.content-page-wrapper h1 { margin-bottom: var(--spacing-lg); }

/* 9. Animations & Transitions */
.reveal { visibility: hidden; }

/* 10. Media Queries */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2.2rem; }
    .hero-title { font-size: 3rem; }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform var(--transition-speed) ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        display: flex;
    }
    .main-nav.active { transform: translateX(0); }
    .nav-list { flex-direction: column; gap: var(--spacing-xl); text-align: center; }
    .nav-list a { font-size: 1.5rem; }
    .burger-menu { display: block; }
    .burger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .burger-menu.active span:nth-child(2) { opacity: 0; }
    .burger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
    
    .hero-section { min-height: 80vh; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }

    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; }
    .timeline-item::after { left: 21px; }
}

@media (max-width: 480px) {
    body { font-size: 1rem; }
    .section { padding: var(--spacing-lg) 0; }
    .container { width: 95%; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    .hero-title { font-size: 2.2rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .neumorphic-card, .contact-form-container { padding: var(--spacing-md); }
    .card-image {
        margin: calc(-1 * var(--spacing-md)) calc(-1 * var(--spacing-md)) var(--spacing-md);
        width: calc(100% + 2 * var(--spacing-md));
    }
}