/* ROOT VARIABLES & GLOBAL STYLES */
:root {
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Merriweather', serif;

    /* Analogous Color Scheme: Blues and Violets with a contrasting accent */
    --color-primary: #3b82f6; /* Vivid Blue */
    --color-primary-dark: #2563eb; /* Darker Vivid Blue */
    --color-primary-light: #93c5fd; /* Lighter Blue */

    --color-secondary: #6d28d9; /* Deep Violet (Analogous to Blue) */
    --color-secondary-light: #a78bfa; /* Lighter Violet */

    --color-accent: #ec4899; /* Bright Pink (Contrasting Accent) */
    --color-accent-dark: #db2777; /* Darker Pink */

    --color-text-dark: #1f2937;  /* Dark Gray for main text */
    --color-text-medium: #4b5563; /* Medium Gray for secondary text */
    --color-text-light: #ffffff; /* White for text on dark backgrounds */
    --color-text-headings: #111827; /* Near Black for main headings */
    --color-text-link: var(--color-primary);
    --color-text-link-hover: var(--color-primary-dark);

    --color-background-body: #ffffff;
    --color-background-section-alt: #f3f4f6; /* Light gray for alternating sections */
    --color-background-card: #ffffff;
    --color-border: #e5e7eb; /* Light gray for borders */
    --color-overlay: rgba(0, 0, 0, 0.5); /* Overlay for background images */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    --border-radius-sm: 0.25rem; /* 4px */
    --border-radius-md: 0.5rem;  /* 8px */
    --border-radius-lg: 0.75rem; /* 12px */

    --transition-fast: all 0.2s ease-in-out;
    --transition-medium: all 0.3s ease-in-out;
    --transition-slow: all 0.5s ease-in-out;

    --section-padding-y: clamp(3rem, 8vw, 6rem); /* Adaptive padding */
}

/* Modern Normalize is assumed to be included */

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

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

body {
    font-family: var(--font-secondary);
    line-height: 1.65;
    color: var(--color-text-dark);
    background-color: var(--color-background-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.main-wrapper {
    overflow-x: hidden; /* Prevents horizontal scroll from animations */
}

/* Adaptive Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-headings);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); } /* ~40px to 60px */
h2 { font-size: clamp(2rem, 4vw, 3rem); }    /* ~32px to 48px */
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); } /* ~24px to 36px */
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }/* ~20px to 28px */

p {
    margin-bottom: 1.25rem;
    font-size: clamp(1rem, 1.5vw, 1.125rem); /* ~16px to 18px */
    color: var(--color-text-medium);
}

a {
    color: var(--color-text-link);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-text-link-hover);
    text-decoration: underline;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Section Styling */
.section-padding {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}
.section-padding-alt {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
    background-color: var(--color-background-section-alt);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text-headings);
}
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 0.75rem auto 0;
    border-radius: var(--border-radius-sm);
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
    font-size: clamp(1.1rem, 1.8vw, 1.25rem);
    color: var(--color-text-medium);
}
.centered-subtitle {
    text-align: center;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-headings);
}

/* HEADER & NAVIGATION */
.site-header {
    background-color: var(--color-background-body);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s ease, padding 0.3s ease;
}

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

.logo {
    font-family: var(--font-primary);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-text-headings);
    text-decoration: none;
}
.logo .logo-accent {
    color: var(--color-primary);
}
.logo:hover {
    text-decoration: none;
    opacity: 0.9;
}

.main-navigation .nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-navigation .nav-menu a {
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--color-text-medium);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

.main-navigation .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-medium);
}

.main-navigation .nav-menu a:hover,
.main-navigation .nav-menu a.active {
    color: var(--color-text-headings);
}
.main-navigation .nav-menu a:hover::after,
.main-navigation .nav-menu a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text-headings);
    position: relative;
    transition: var(--transition-medium);
}
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-text-headings);
    transition: var(--transition-medium);
}
.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { bottom: -8px; }

/* Mobile Menu Active State (JS toggles .menu-open on body or header) */
.menu-open .hamburger-icon {
    background-color: transparent; /* Middle line disappears */
}
.menu-open .hamburger-icon::before {
    transform: translateY(8px) rotate(45deg);
}
.menu-open .hamburger-icon::after {
    transform: translateY(-8px) rotate(-45deg);
}


/* HERO SECTION */
.hero-section {
    padding: clamp(8rem, 20vh, 12rem) 0 clamp(4rem, 10vh, 6rem); /* Top padding more for fixed header */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: var(--color-text-light);
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--color-text-light); /* Enforce white text */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-text-light); /* Enforce white text */
    opacity: 0.9;
}

/* GLOBAL BUTTON STYLES */
.cta-button, .cta-button-secondary, .form-submit-button {
    display: inline-block;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    padding: 0.8em 1.8em;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-medium), transform 0.1s ease-out;
    border: 2px solid transparent;
    text-align: center;
}

.cta-button {
    background-color: var(--color-accent);
    color: var(--color-text-light);
    border-color: var(--color-accent);
}
.cta-button:hover {
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: var(--color-text-light);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-decoration: none;
}

.cta-button-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.cta-button-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-color: var(--color-primary);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-decoration: none;
}

.form-submit-button {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-color: var(--color-primary);
    width: 100%;
    max-width: 300px;
}
.form-submit-button:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-text-light);
    transform: translateY(-2px);
    text-decoration: none;
}


/* CARD GRID & CARD STYLES */
.card-grid, .methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card, .methodology-item, .case-study-card, .blog-post-card {
    background-color: var(--color-background-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    display: flex;
    flex-direction: column;
    text-align: center; /* Center text content by default */
}

.card:hover, .methodology-item:hover, .case-study-card:hover, .blog-post-card:hover {
    transform: translateY(-10px) scale(1.02); /* Morphing: subtle scale and lift */
    box-shadow: var(--shadow-lg);
}

.card-image { /* Container for the image */
    width: 100%;
    height: 200px; /* Fixed height for image container */
    overflow: hidden;
    margin-bottom: 1rem; /* Space between image and content */
    display: flex; /* For centering the image if it's smaller (though object-fit handles it) */
    align-items: center;
    justify-content: center;
    background-color: var(--color-background-section-alt); /* Placeholder bg */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area, might crop */
    transition: transform var(--transition-slow);
}

.card:hover .card-image img,
.methodology-item:hover .card-image img,
.case-study-card:hover .card-image img,
.blog-post-card:hover .card-image img {
    transform: scale(1.05); /* Slight zoom on image hover */
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allows content to take remaining space */
    display: flex;
    flex-direction: column;
}
.card-content h3 {
    margin-bottom: 0.75rem;
    color: var(--color-secondary); /* Use secondary color for card titles for distinction */
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
}
.card-content p {
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    color: var(--color-text-medium);
    flex-grow: 1; /* Pushes links/buttons down if present */
    margin-bottom: 1rem;
}

.read-more-link {
    display: inline-block;
    margin-top: auto; /* Pushes to the bottom */
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    align-self: center; /* Center if card-content is flex */
}
.read-more-link:hover {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

/* STATISTICS SECTION */
.parallax-section {
    background-attachment: fixed; /* Simple parallax */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    color: var(--color-text-light);
}
.parallax-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-overlay);
    z-index: 1;
}
.parallax-section .container {
    position: relative;
    z-index: 2;
}
.parallax-section .section-title,
.parallax-section .section-intro {
    color: var(--color-text-light);
}
.parallax-section .section-title::after {
    background-color: var(--color-primary-light);
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
    margin-top: 3rem;
}
.stat-item {
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(5px); /* Glassmorphism hint if browser supports */
}
.stat-number {
    font-family: var(--font-primary);
    font-size: clamp(3rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.5rem;
}
.stat-description {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: var(--color-text-light);
    opacity: 0.9;
    margin-bottom: 0;
}

/* INNOVATION & TWO-COLUMN LAYOUTS */
.layout-two-columns {
    display: grid;
    grid-template-columns: 1fr; /* Default for mobile */
    gap: 2.5rem;
    align-items: center;
}
@media (min-width: 768px) {
    .layout-two-columns {
        grid-template-columns: repeat(2, 1fr);
    }
    .layout-two-columns.reverse-columns .text-column {
        order: 2;
    }
    .layout-two-columns.reverse-columns .image-column {
        order: 1;
    }
}

.text-column {
    text-align: left;
}
.text-column p {
    color: var(--color-text-dark); /* Ensure good contrast on light backgrounds */
}
.image-column img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* CONTENT CAROUSEL (Basic Styling - JS for functionality) */
.content-carousel-container {
    margin-top: 3rem;
}
.content-carousel {
    display: flex; /* This will be handled by JS library, but basic flex for fallback */
    overflow-x: auto; /* Simple scroll for too many items if JS fails */
    gap: 1.5rem;
    padding-bottom: 1rem; /* For scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.content-carousel::-webkit-scrollbar { /* Chrome, Safari, Opera */
    display: none;
}

.carousel-item {
    flex: 0 0 clamp(280px, 70vw, 350px); /* Responsive item width */
    /* If cards are used inside, they inherit their styling */
}
.animated-icon-placeholder {
    font-size: 0.8rem;
    color: var(--color-text-medium);
    margin-bottom: 0.5rem;
    padding: 1rem;
    background-color: var(--color-background-section-alt);
    border-radius: var(--border-radius-sm);
    text-align: center;
    border: 1px dashed var(--color-border);
}

/* BLOG SECTION - uses .card and .content-carousel */
.blog-post-card .card-content h3 {
    font-size: clamp(1.2rem, 2vw, 1.4rem); /* Slightly smaller for blog titles in cards */
}

/* EXTERNAL RESOURCES SECTION */
.external-links-list {
    list-style: none;
    padding-left: 0;
}
.external-links-list li {
    margin-bottom: 1.5rem;
}
.external-link-item {
    display: block;
    padding: 1.5rem;
    background-color: var(--color-background-card);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    border-left: 5px solid var(--color-primary-light);
}
.external-link-item:hover {
    transform: translateX(5px) scale(1.01);
    box-shadow: var(--shadow-md);
    border-left-color: var(--color-primary);
    text-decoration: none;
}
.external-link-item strong {
    display: block;
    font-family: var(--font-primary);
    font-size: clamp(1.1rem, 1.8vw, 1.25rem);
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}
.external-link-item p {
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    color: var(--color-text-medium);
    margin-bottom: 0;
}

/* CONTACT FORM SECTION */
.contact-form-section {
    background-size: cover;
    background-position: center;
    color: var(--color-text-light);
    position: relative;
}
.contact-form-section .section-title,
.contact-form-section .section-intro {
    color: var(--color-text-light);
}
.contact-form-section .section-title::after {
    background-color: var(--color-accent);
}
.contact-form {
    max-width: 700px;
    margin: 2rem auto 0;
    background-color: rgba(255,255,255,0.15); /* Semi-transparent white for better readability on image */
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    font-family: var(--font-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--border-radius-sm);
    background-color: rgba(255,255,255,0.2);
    color: var(--color-text-light);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.7);
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent), 0.3);
    background-color: rgba(255,255,255,0.3);
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* FOOTER */
.site-footer {
    background-color: var(--color-text-dark);
    color: #a0aec0; /* Lighter gray for footer text */
    padding: var(--section-padding-y) 0 0;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    padding-bottom: 2rem;
}
.footer-column h4 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}
.footer-column p,
.footer-column ul li {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.footer-column ul {
    list-style: none;
    padding-left: 0;
}
.footer-column ul a {
    color: #a0aec0;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.footer-column ul a:hover {
    color: var(--color-text-light);
    text-decoration: underline;
}
.social-links-text li { margin-bottom: 0.75rem; }
.social-links-text a {
    font-weight: 500; /* Make social links slightly bolder */
    letter-spacing: 0.5px;
}
.footer-bottom {
    border-top: 1px solid #2d3748; /* Darker border */
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}
.footer-bottom p {
    margin-bottom: 0;
    color: #718096; /* Even lighter gray */
}

/* ANIMATIONS ON SCROLL (JS dependent) */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.animate-on-scroll.fadeIn { transform: translateY(30px); }
.animate-on-scroll.fadeInUp { transform: translateY(50px); }
.animate-on-scroll.fadeInDown { transform: translateY(-50px); }
.animate-on-scroll.fadeInLeft { transform: translateX(-50px); }
.animate-on-scroll.fadeInRight { transform: translateX(50px); }
.animate-on-scroll.zoomIn { transform: scale(0.8); }
.animate-on-scroll.pulse { /* For subtle pulse, can be infinite or on visible */ }

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

/* SUCCESS PAGE STYLING */
body.success-page { /* Add this class to body on success.html */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.success-page .main-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.success-content { /* A wrapper for success message on success.html */
    text-align: center;
    padding: 2rem;
    background-color: var(--color-background-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
}
.success-content h1 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.success-content p {
    color: var(--color-text-medium);
    margin-bottom: 1.5rem;
}
.success-content .cta-button {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}
.success-content .cta-button:hover {
    background-color: var(--color-secondary-light);
    border-color: var(--color-secondary-light);
    color: var(--color-text-dark);
}


/* PRIVACY & TERMS PAGES STYLING */
.privacy-page-content,
.terms-page-content { /* Add class to main content wrapper on these pages */
    padding-top: calc(var(--section-padding-y) + 60px); /* Header height + some space */
    padding-bottom: var(--section-padding-y);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.privacy-page-content h1,
.terms-page-content h1 {
    margin-bottom: 2rem;
    text-align: center;
}
.privacy-page-content h2,
.terms-page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

/* RESPONSIVE STYLES */
@media (max-width: 768px) {
    .main-navigation .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%; /* Below header */
        left: 0;
        width: 100%;
        background-color: var(--color-background-body);
        box-shadow: var(--shadow-md);
        padding: 1rem 0;
        border-top: 1px solid var(--color-border);
    }
    .main-navigation.menu-open .nav-menu { /* JS adds .menu-open to .main-navigation */
        display: flex;
    }
    .main-navigation .nav-menu li {
        width: 100%;
        text-align: center;
    }
    .main-navigation .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--color-border);
    }
    .main-navigation .nav-menu li:last-child a {
        border-bottom: none;
    }
    .main-navigation .nav-menu a::after { /* Mobile: no underline animation or different style */
        display: none;
    }
    .menu-toggle {
        display: block;
    }

    .hero-title { font-size: clamp(2.2rem, 8vw, 3rem); }
    .hero-subtitle { font-size: clamp(1rem, 4vw, 1.2rem); }

    .card-grid, .methodology-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }
    .statistics-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column ul {
        padding-left: 0;
    }
}