/* --- Global Variables & Resets --- */
:root {
    --primary-color: #0f172a; /* Deep midnight blue */
    --secondary-color: #3b82f6; /* Bright electric blue */
    --text-color: #333;
    --bg-light: #f8fafc;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth; /* Enables smooth scrolling */
}

body {
    color: var(--text-color);
    line-height: 1.6;
}

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

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

/* --- Typography & Buttons --- */
h1, h2, h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.btn:hover {
    background-color: #2563eb;
}

/* --- Button Loading State --- */
.btn:disabled {
    background-color: #94a3b8; /* Muted slate color */
    cursor: not-allowed;
    pointer-events: none; /* Prevents double-clicking */
    animation: pulse 1.5s infinite ease-in-out;
}

/* Suble pulsing animation for the loading state */
@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 0.5; }
    100% { opacity: 0.8; }
}

/* --- Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- Clickable Logo & Drawer Header Fixes --- */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white); /* Ensures the text stays white */
}

.drawer-logo-link {
    text-decoration: none;
    color: var(--white);
    font-size: 1.1rem; /* Matches your previous drawer header size */
}

.nav-logo {
    height: 60px; /* Adjust size as needed */
    margin-right: 10px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 8rem 1rem;
    background-size: cover;
    background-position: center;
    color: var(--white);
    position: relative;
}

/* Overlay for better text readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7); /* Dark blue overlay */
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    color: var(--white);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
}

/* --- Page Header (About & Contact) --- */
.page-header {
    text-align: center;
    padding: 6rem 1rem;
    background-color: var(--bg-light);
}

.page-header h1 { font-size: 3rem; }
.page-header p { font-size: 1.2rem; color: #64748b; }

/* --- Section Header (Subscriptions) --- */
.section-header {
    text-align: center;
    padding: 6rem 1rem 1rem 1rem;
}

.section-header h1 { font-size: 3rem; }
.section-header p { font-size: 1.2rem; color: #64748b; }

/* --- Sections & Grids --- */
section {
    padding: 5rem 0;
}

h2 { text-align: center; }
section > .container > p { text-align: center; margin-bottom: 3rem; }

.service-grid, .testimonial-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.brand-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0 2rem 0; /* Extra padding at the bottom for the scrollbar */
    /* scroll-snap-type: x mandatory; */
    -webkit-overflow-scrolling: touch; /* Ensures smooth scrolling on iPhones/iPads */
    
    /* Styling the scrollbar for Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) #e2e8f0;
}

/* Custom Webkit Scrollbar (Chrome, Safari, Edge) */
.brand-scroll-container::-webkit-scrollbar {
    height: 8px;
}
.brand-scroll-container::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}
.brand-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 4px;
}

/* Individual Brand Cards */
.brand-card {
    background: var(--white);
    min-width: 150px; /* Forces cards to stay wide enough to read */
    flex: 0 0 auto;   /* Prevents cards from shrinking */
    padding: 1.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    scroll-snap-align: start; /* Makes scrolling snap neatly to the next card */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;

    /* ADD THIS LINE to remove the default link underline */
    text-decoration: none;
}

.brand-card:hover {
    transform: translateY(-5px); /* Gentle lift effect on hover */
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.brand-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.brand-card span {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

/* --- Services Section --- */
.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 300px;
    text-align: center;
    
    /* New properties to handle the <a> tag and animation */
    display: block;
    text-decoration: none; /* Removes link underline */
    color: var(--text-color); /* Keeps your text color normal */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* The pop-out hover effect */
.service-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.service-img {
    width: 100%;
    height: 300px; /* Increased height to give portrait images more room */
    object-fit: contain; /* Changed from 'cover' to 'contain' to prevent cropping */
    border-radius: 1px;
    margin-bottom: 1.5rem;
    background-color: var(--white); /* Optional: keeps the background clean if the image doesn't fill the width */
}

/* --- Testimonials Section --- */
.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    
    /* ADDED: Smooth transition for the hover effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ADDED: The hover "pop out" effect */
.testimonial-card:hover {
    transform: translateY(-5px) scale(1.02); /* Lifts up slightly and scales up by 2% */
    box-shadow: 0 12px 20px rgba(0,0,0,0.1); /* Deepens the shadow to make it look raised */
}

.testimonial-img {
    width: 100px;
    height: 120px;
    border-radius: 50%; /* Makes the image circular */
    object-fit: cover;
    border: 1px solid var(--bg-light);
}

/* --- About Page Specific --- */
.about-grid {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-text {
    flex: 1;
}

/* --- Pricing & Subscriptions --- */
.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.pricing-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 260px;
    max-width: 350px;
    text-align: center;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Highlight for the Annual Plan */
.pricing-card.popular {
    border: 2px solid var(--secondary-color);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
    transform: scale(1.05);
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-10px);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0 0.5rem 0;
}

.price span {
    font-size: 1rem;
    color: #64748b;
    font-weight: normal;
}

.billing-cycle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.savings-text {
    color: #10b981; /* Emerald green */
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.features-list {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
    flex-grow: 1; /* Pushes the button to the bottom */
}

.features-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    font-size: 0.95rem;
}

/* Custom checkmark for list items */
.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Secondary Button Style for non-highlighted cards */
.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

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

/* Make sure cards stack nicely on smaller screens */
@media (max-width: 1024px) {
    .pricing-card.popular {
        transform: scale(1); /* Removes the size bump on mobile to prevent overflow */
    }
    .pricing-card.popular:hover {
        transform: translateY(-10px);
    }
}

/* --- About Page Carousel --- */
.about-img-container {
    flex: 1;
}

.carousel {
    width: 100%;
    aspect-ratio: 1 / 1; /* This guarantees a perfect square on ANY screen size */
    overflow: hidden;    /* Hides the images that are not currently active */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    background-color: var(--white);
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out; /* Smooth sliding animation */
}

.carousel-img {
    flex: 0 0 100%; /* Forces each image to take up exactly 100% of the container width */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the square area without stretching */
}

/* --- Contact Form --- */
.contact-section {
    text-align: left;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

/* --- File Upload Styling (Contact Form) --- */
.file-upload-group {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.hidden-file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem;
    background-color: var(--bg-light);
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background-color: #eff6ff; /* Very light blue */
}

.file-upload-label svg {
    width: 24px;
    height: 24px;
    min-width: 24px; /* Bulletproof sizing */
    flex-shrink: 0;  /* Prevents the flexbox container from stretching it */
}

.file-upload-label.has-file {
    border-color: #10b981; /* Emerald Green */
    color: #10b981;
    border-style: solid;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); 
    
    /* Smooth transitions */
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
}

/* This class is added by JavaScript when scrolling */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #2563eb; /* Slightly darker blue on hover */
    transform: translateY(-5px); /* Gentle lift effect */
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* --- Navigation Drawer & Mobile Menu Elements (Hidden by default) --- */
.menu-toggle {
    display: none;
    cursor: pointer;
    color: var(--white);
}

.drawer-header {
    display: none;
}

.drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* --- Media Queries for Responsiveness --- */
@media (max-width: 768px) {
    .hero h1, .page-header h1 {
        font-size: 2.5rem;
    }
    
    .about-grid {
        flex-direction: column-reverse;
    }

    .testimonial-card {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Mobile Specific Styles (450px and below) --- */
@media (max-width: 450px) {
    .menu-toggle {
        display: block; /* Show hamburger icon */
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -280px; /* Hidden off-screen to the left */
        width: 250px;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1.5rem;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        transition: left 0.3s ease;
        z-index: 1000;
        margin: 0;
    }

    /* Class added by JS to open drawer */
    .nav-links.active {
        left: 0;
    }

    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        font-size: 1.1rem;
        font-weight: bold;
        color: var(--white);
        border-bottom: 1px solid #334155;
        padding-bottom: 1rem;
        margin-bottom: 0.5rem;
    }

    .close-drawer {
        font-size: 2rem;
        cursor: pointer;
        line-height: 1;
        color: #94a3b8;
    }

    .close-drawer:hover {
        color: var(--white);
    }

    /* Overlay active state */
    .drawer-overlay.active {
        display: block;
        opacity: 1;
    }
}