/* ==================================== */
/* 0. Core Variables and Base Styles */
/* ==================================== */
/* Retain original :root values as requested */
:root {
    --color-primary: #1e3c72;
    --color-primary-light: #2a5298;
    --color-accent: #9d50bb;
    --color-accent-dark: #6e48aa;
    --color-bg: #f9f9f9;
    --color-text: #222;
    --color-white: #fff;

    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    --gradient-accent: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));

    /* Additional variables for modern styling using existing color palette */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 5rem;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;

    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-circle: 50%;

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);

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

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary); /* Headings use primary color */
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

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

a:hover {
    color: var(--color-accent); /* Accent on hover */
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    text-align: center;
    transition: var(--transition-medium);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* ==================================== */
/* 1. Landing Page Main Layout */
/* ==================================== */
.landing-page-main {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height, 60px) - var(--footer-height, 100px)); /* Adjust for actual header/footer height */
    overflow: hidden; /* For pseudo-elements */
}

.section-title {
    font-size: 3em;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    padding-bottom: var(--spacing-sm);
    color: var(--color-primary); /* Section titles use primary color */
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-accent); /* Underline uses accent color */
    border-radius: 2px;
}

/* ==================================== */
/* 2. Hero Section */
/* ==================================== */
.hero-section {
    background: var(--gradient-primary); /* Use existing primary gradient */
    color: var(--color-white);
    padding: var(--spacing-xxl) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
    min-height: 70vh;
    position: relative;
    overflow: hidden;
    isolation: isolate; /* For stacking context */
    text-align: left;
}

.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-circle);
    filter: blur(70px); /* Soft blur effect */
    z-index: -1;
}

.hero-section::before {
    width: 350px;
    height: 350px;
    top: -80px;
    left: -80px;
    animation: floatShape 18s ease-in-out infinite alternate;
}

.hero-section::after {
    width: 450px;
    height: 450px;
    bottom: -120px;
    right: -120px;
    animation: floatShape 22s ease-in-out infinite alternate-reverse;
}

@keyframes floatShape {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(25px, 35px) scale(1.03) rotate(5deg); }
    100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

.hero-content {
    flex: 1;
    max-width: 700px;
    z-index: 1;
}

.hero-title {
    font-size: 4.5em;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--color-white); /* White on dark hero background */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3); /* Stronger text shadow */
}

.hero-subtitle {
    font-size: 1.8em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9); /* Slightly muted white */
    margin-bottom: var(--spacing-sm);
}

.hero-description {
    font-size: 1.15em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn-primary-hero {
    background: var(--color-white); /* White button */
    color: var(--color-primary);
    padding: 1rem 2.5rem;
    font-size: 1.1em;
    box-shadow: var(--shadow-md);
}

.btn-primary-hero:hover {
    background-color: #eee;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary-hero {
    background: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
    padding: 1rem 2.5rem;
    font-size: 1.1em;
}

.btn-secondary-hero:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.welcome-message {
    font-size: 1.2em;
    color: var(--color-white);
    font-weight: 600;
    margin-right: var(--spacing-md);
    display: flex;
    align-items: center;
}

.hero-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-visual img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    animation: fadeInSlide 1.2s ease-out forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ==================================== */
/* 3. Features Section */
/* ==================================== */
.features-section {
    background-color: var(--color-bg);
    padding: var(--spacing-xxl) var(--spacing-lg);
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05); /* Light border */
    position: relative;
    overflow: hidden; /* For hover effect */
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-accent); /* Top border accent */
    transform: translateY(-100%);
    transition: var(--transition-medium);
}

.feature-card:hover::before {
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--color-primary-light); /* Light primary for icon background */
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-white); /* White icons */
}

.feature-card h3 {
    font-size: 1.7em;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.feature-card p {
    font-size: 1.05em;
    color: var(--color-text);
    opacity: 0.8;
}

/* ==================================== */
/* 4. Call to Action Section */
/* ==================================== */
.cta-section {
    background: var(--gradient-accent); /* Use existing accent gradient */
    color: var(--color-white);
    padding: var(--spacing-xxl) var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.cta-section::before { /* Subtle background pattern */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 25px 25px;
    opacity: 0.3;
    z-index: -1;
}

.cta-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
}

.cta-title {
    color: var(--color-white); /* White on dark CTA background */
    font-size: 3.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cta-description {
    font-size: 1.3em;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary-cta {
    background: var(--color-white); /* White button */
    color: var(--color-accent);
    padding: 1.2rem 3rem;
    font-size: 1.3em;
    box-shadow: var(--shadow-md);
}

.btn-primary-cta:hover {
    background-color: #eee;
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* ==================================== */
/* 5. Responsiveness */
/* ==================================== */
@media (max-width: 992px) {
    .hero-section {
        flex-direction: column-reverse; /* Image above content */
        text-align: center;
        padding-top: var(--spacing-xl);
        padding-bottom: var(--spacing-xl);
    }

    .hero-content {
        max-width: 100%;
        margin-top: var(--spacing-lg);
    }

    .hero-visual {
        max-width: 80%;
        margin-bottom: var(--spacing-lg);
    }

    .hero-actions {
        justify-content: center; /* Center buttons */
    }

    .hero-title {
        font-size: 3.5em;
    }

    .hero-subtitle {
        font-size: 1.5em;
    }

    .section-title {
        font-size: 2.5em;
    }

    .features-grid {
        grid-template-columns: 1fr; /* Stack features */
        max-width: 500px; /* Limit width of stacked cards */
    }

    .cta-title {
        font-size: 2.8em;
    }

    .cta-description {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .hero-section {
        /* min-height removed for compatibility */
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-title {
        font-size: 2.8em;
    }

    .hero-subtitle {
        font-size: 1.2em;
    }

    .hero-description {
        font-size: 1em;
    }

    .btn-primary-hero, .btn-secondary-hero {
        padding: 0.8rem 1.8rem;
        font-size: 1em;
    }

    .section-title {
        font-size: 2em;
    }

    .features-section, .cta-section {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .feature-card h3 {
        font-size: 1.5em;
    }

    .cta-title {
        font-size: 2.2em;
    }

    .cta-description {
        font-size: 1em;
    }

    .btn-primary-cta {
        padding: 1rem 2.5rem;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2em;
    }

    .hero-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .btn-primary-hero, .btn-secondary-hero {
        width: 100%;
        padding: 0.9rem 1.5rem;
    }

    .section-title {
        font-size: 1.8em;
        margin-bottom: var(--spacing-lg);
    }

    .feature-card h3 {
        font-size: 1.3em;
    }

    .feature-card p {
        font-size: 0.95em;
    }

    .cta-title {
        font-size: 1.8em;
    }

    .btn-primary-cta {
        padding: 0.9rem 2rem;
        font-size: 1em;
    }
}