/* --- TABLE OF CONTENTS ---
1.  CSS Variables
2.  Global Styles & Resets
3.  Typography
4.  Layout & Container
5.  UI Components
    - Buttons
    - Cards
    - Forms
    - Timeline
    - Slider
    - FAQ
6.  Header & Navigation
7.  Main Content & Sections
    - Hero Section
    - Generic Content Sections
    - Clientele & Partners (Logo Grid)
    - Team Section
    - External Resources
8.  Footer
9.  Specific Page Styles
    - success.html
    - privacy.html & terms.html
10. Animations & Transitions
11. Media Queries (Responsiveness)
----------------------------- */

/* 1. CSS Variables */
:root {
    /* Color Palette: Complementary (Deep Blue & Amber/Gold) */
    --primary-color: #0d47a1; /* Deep Blue */
    --primary-color-dark: #002171;
    --accent-color: #ff8f00;  /* Amber */
    --accent-color-hover: #ffb300;
    
    /* Backgrounds */
    --bg-light: #f4f4f9;
    --bg-dark: #1a1a2e; /* Dark Navy/Purple */
    --bg-card: #ffffff;
    --bg-card-dark: #2a2a45;

    /* Text Colors */
    --text-light: #ffffff;
    --text-dark: #333333;
    --text-secondary: #6c757d;
    --text-headers-dark: #222222;

    /* Fonts */
    --font-family-headings: 'Raleway', sans-serif;
    --font-family-body: 'Open Sans', sans-serif;

    /* Spacing & Borders */
    --spacing-unit: 1rem;
    --border-radius: 8px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 100%; /* 16px */
}

body {
    font-family: var(--font-family-body);
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content-wrap {
    flex: 1;
}

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

ul {
    list-style: none;
}

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

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

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-headers-dark);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

.section-title {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-weight: 900;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto calc(var(--spacing-unit) * 2.5);
    color: var(--text-secondary);
}

.section-subtitle-small {
    text-align: center;
    margin-bottom: var(--spacing-unit);
    color: inherit;
}

/* 4. Layout & Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

.columns {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2);
    align-items: center;
}

.column {
    flex: 1 1 300px;
}

.column.is-two-thirds {
    flex-basis: 66%;
}

/* 5. UI Components */
/* --- Buttons --- */
.btn, button, input[type="submit"] {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    cursor: pointer;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    transition: all 0.3s ease-in-out;
    user-select: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-dark);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--accent-color-hover);
    border-color: var(--accent-color-hover);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* --- Cards --- */
.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: calc(var(--spacing-unit) * 1.5);
}

.card-content h3 {
    margin-bottom: var(--spacing-unit);
    color: var(--primary-color);
}

/* --- Forms --- */
.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: inherit;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: 2px solid #ccc;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-family-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.2);
}

.contact-form button {
    width: 100%;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--accent-color);
    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-dark);
    border: 4px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after { left: -10px; }
.timeline-content {
    padding: 20px 30px;
    background-color: var(--bg-card-dark);
    border-radius: var(--border-radius);
}

/* --- Slider --- */
.custom-slider {
    position: relative;
    overflow: hidden;
}
.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.custom-slider .card {
    min-width: 31%;
    margin: 0 1%;
}
.slider-controls {
    text-align: center;
    margin-top: 1.5rem;
}
.slider-controls button {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 10px;
    font-size: 1.5rem;
}
.slider-controls button:hover {
    background: var(--primary-color-dark);
}

/* --- FAQ --- */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item {
    border-bottom: 1px solid #ddd;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem 1rem;
    font-size: 1.2rem;
    font-family: var(--font-family-headings);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-headers-dark);
}
.faq-question::after {
    content: '+';
    font-size: 2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}
.faq-question.active::after {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.faq-answer p {
    padding: 0 1rem 1.5rem;
}

/* 6. Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-family-headings);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-light);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

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

/* 7. Main Content & Sections */
/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: var(--header-height);
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    color: var(--text-light);
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* --- Generic Content Sections --- */
.content-section {
    padding: 5rem 0;
}

.content-section-dark {
    padding: 5rem 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.content-section-dark .section-title,
.content-section-dark .section-subtitle,
.content-section-dark h1,
.content-section-dark h2,
.content-section-dark h3 {
    color: var(--text-light);
    text-shadow: none;
}

.content-section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.content-section-dark .card {
    background-color: var(--bg-card-dark);
    color: var(--text-light);
}
.content-section-dark .card h3 {
    color: var(--accent-color);
}
.content-section-dark .card p {
    color: rgba(255, 255, 255, 0.8);
}

/* --- Clientele & Partners (Logo Grid) --- */
.logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}
.logo-item img {
    max-height: 75px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.logo-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
}
.small-logos img {
    max-height: 60px;
}

/* --- Team Section --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.team-grid .card-content span {
    display: block;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* --- External Resources --- */
.resources-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.resource-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-card-dark);
    border: 2px solid var(--primary-color);
    color: var(--text-light);
    border-radius: var(--border-radius);
    transition: background-color 0.3s, color 0.3s;
}

.resource-link:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

/* 8. Footer */
.main-footer {
    background-color: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
}

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

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

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-col a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 9. Specific Page Styles */
/* --- success.html --- */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-dark);
}
.success-content {
    background-color: var(--bg-card-dark);
    padding: 3rem;
    border-radius: var(--border-radius);
    color: var(--text-light);
}
.success-content h1 { color: var(--text-light); }
.success-content p { margin: 1rem 0 2rem; }

/* --- privacy.html & terms.html --- */
.legal-page-content {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    max-width: 800px;
}
.legal-page-content h1 {
    margin-bottom: 2rem;
}
.legal-page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}
.legal-page-content p,
.legal-page-content li {
    margin-bottom: 1rem;
}

/* 10. Animations & Transitions */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* 11. Media Queries (Responsiveness) */
@media (max-width: 1024px) {
    .columns {
        flex-direction: column;
    }
    .column.is-two-thirds {
        flex-basis: auto;
    }
    .custom-slider .card {
        min-width: 48%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        padding: 1rem 0;
    }
    .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);
    }

    .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;
    }
    
    .custom-slider .card {
        min-width: 96%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}