/* --- Variables & Setup --- */
:root {
    --primary: #0F2D52;     /* Deep Navy Blue */
    --secondary: #1E5EFF;   /* Royal Blue */
    --accent: #D4A017;      /* Gold */
    --bg: #FFFFFF;
    --section-bg: #F8FAFC;
    --text: #1A1A1A;
    --text-light: #555555;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.bg-light {
    background-color: var(--section-bg);
}

.text-center {
    text-align: center;
}

section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* --- Typography & Utilities --- */
.accent-text { color: var(--accent); }
.w-100 { width: 100%; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #154ACC;
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: var(--primary);
}

/* --- Header & Navigation --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

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

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--secondary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary);
    transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
    /* Replaced 100vh with fixed padding to reduce excessive height */
    padding: 180px 0 100px 0; 
    display: flex;
    align-items: center;
    background-color: var(--primary);
    background-image: linear-gradient(135deg, var(--primary) 0%, #0A1E38 100%);
    color: var(--white);
}

.hero-content {
    /* Increased from 800px to allow content to stretch wider */
    max-width: 1050px; 
}

.hero h1 {
    /* Slightly increased font size to match the wider layout */
    font-size: 3.8rem; 
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--white);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #CBD5E1;
    /* Keeps the paragraph readable without stretching too thin */
    max-width: 900px; 
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.trust-badges li {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--accent);
    border: 1px solid rgba(212, 160, 23, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- About Section --- */
.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
    color: var(--text-light);
}

.about-text p {
    margin-bottom: 15px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--secondary);
}

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

.card h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--secondary);
    box-shadow: var(--shadow-hover);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* --- Partners Section --- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    align-items: center;
}

.partner-logo {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.partner-logo:hover {
    color: var(--secondary);
    border-color: var(--secondary);
    transform: scale(1.05);
}

/* --- Calculator Section --- */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--secondary);
}

.calc-results {
    background: var(--primary);
    color: var(--white);
    padding: 40px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-box {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.result-box h4 {
    font-weight: 400;
    margin-bottom: 10px;
    color: #CBD5E1;
}

.result-box h3 {
    font-size: 2.5rem;
}

.result-details p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* --- Contact Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-icon {
    font-size: 1.5rem;
    background: var(--white);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.info-item h4 {
    color: var(--primary);
    margin-bottom: 5px;
}

.info-item p {
    color: var(--text-light);
}

/* --- Footer --- */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0 20px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-brand span {
    color: var(--accent);
}

.footer-brand p {
    color: #CBD5E1;
}

.footer-links h3 {
    margin-bottom: 15px;
    color: var(--accent);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #CBD5E1;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #CBD5E1;
    font-size: 0.9rem;
}

/* --- Media Queries (Responsive) --- */
@media (max-width: 992px) {
    .calculator-wrapper, .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        padding: 20px 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ############################################################################################### */

/* --- Partners Section (Infinite Marquee) --- */
.marquee-container {
    width: 100%;
    overflow: hidden; /* Hides everything outside the running frame */
    position: relative;
    padding: 20px 0;
    margin-bottom: 50px;
    /* Optional: Adds a subtle fade effect on the left and right edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 30px;
    width: max-content;
    /* The animation duration (30s) controls the speed. Lower = faster. */
    animation: scrollMarquee 30s linear infinite;
}

/* Pause the scrolling if the user hovers over the logos */
.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

.partner-logo-box {
    background: var(--white);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    height: 100px;
    width: 180px; /* Fixed width prevents jittering during animation */
    flex-shrink: 0; /* Prevents logos from squishing together */
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(20%);
    transition: var(--transition);
}

.partner-logo-box:hover {
    border-color: var(--secondary);
    box-shadow: var(--shadow-hover);
}

.partner-logo-box:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* The Infinite Scroll Animation Keyframes */
@keyframes scrollMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Shifts the track left by exactly half its width (the length of one full set of logos) */
        transform: translateX(calc(-50% - 15px)); 
    }
}

/* Additional Partners Section (Unchanged) */
.additional-partners {
    margin-top: 40px;
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 40px;
}

.additional-partners h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.partners-list-columns {
    display: flex;
    justify-content: center;
    gap: 80px;
    text-align: left;
}

.partners-list-columns ul {
    list-style: none;
}

.partners-list-columns li {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.partners-list-columns li::before {
    content: "•";
    color: var(--secondary);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -2px;
}

@media (max-width: 576px) {
    .partners-list-columns {
        flex-direction: column;
        gap: 0;
        align-items: center;
        text-align: center;
    }
    .partners-list-columns li {
        padding-left: 0;
    }
    .partners-list-columns li::before {
        display: none;
    }
}

/* --- Social Media Icons --- */
.footer-social h3 {
    margin-bottom: 15px;
    color: var(--accent);
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--secondary);
    color: var(--white);
    transform: translateY(-3px); /* Subtle lift effect */
    box-shadow: 0 5px 15px rgba(30, 94, 255, 0.4);
}

/* --- Success Popup --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 45, 82, 0.8); /* Dark Navy semi-transparent */
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    
    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-content {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    
    /* Start slightly scaled down for animation */
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-overlay.active .popup-content {
    transform: scale(1) translateY(0);
}

.popup-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.popup-content h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.popup-content p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1rem;
}