/* =================================================================
   HERO SECTION CSS (REVISED & CORRECTED)
================================================================= */
/* --- Font Imports (Ensure this is at the top of your stylesheet) --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Tenor+Sans&display=swap');

/* --- Main Section Container --- */
.hero-section {
    background-image: url('https://www.careline.com/wp-content/uploads/2025/10/careline-hero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #0c0c0c;
    color: #000000;
    font-family: 'Lato', sans-serif;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 25px 80px 25px; 
}

.hero-container {
    width: 100%;
    max-width: 1280px;
    display: flex;
    flex-direction: column; 
    align-items: center;
    text-align: center;
}


/* --- Mobile Layout Order --- */
.hero-content-column {
    order: 1;
    width: 100%;
}

.hero-image-column {
    order: 2;
    width: 100%;
    margin: 40px 0;
}

.hero-features {
    order: 3;
}


/* --- Image Styling (UPDATED) --- */
.hero-product-image {
    width: 100%;
    /* ADDED: Set a max-width to control the size on large screens */
    max-width: 400px; 
    height: auto;
    object-fit: contain;
    /* ADDED: Ensure it's centered within the column */
    display: block;
    margin: 0 auto;
}


/* --- Text Content Styling --- */
.hero-subtitle {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 14px;
    color: #d1d1d1;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.hero-title {
    font-family: 'Tenor Sans', sans-serif;
    font-size: clamp(2.2rem, 6vw, 2.7rem);
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
    color: #ffffff;
}

.hero-title .accent-text {
    color: #b230ff; /* Correct Brand Purple */
    font-weight: 400;
}

.hero-content-column p:not(.hero-subtitle) {
    font-family: 'Lato', sans-serif;
    font-size: clamp(0.9375rem, 2.5vw, 0.9375rem);
    color: #d1d1d1;
    margin: 12px 0 30px 0;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}


/* --- CTA Button --- */
.hero-cta-button {
    display: inline-block;
    background-color: transparent;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 15px;
    padding: 16px 35px;
    border-radius: 5px;
    border: 2px solid #b230ff;
    text-decoration: none;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-cta-button:hover {
    background-color: #b230ff;
    color: #ffffff;
}


/* --- Features Grid (Icons & Labels) --- */
.hero-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
    flex-wrap: wrap;
    width: 100%;
}

.hero-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-icon-wrapper {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
}

.hero-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.8;
}

.hero-feature-label {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 12px;
    color: #d1d1d1;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
}

/*Animation*/
/* =================================================================
   HERO ICON ANIMATION
================================================================= */

/* 1. Define the animation keyframes for the "shimmer" effect.
   This animation controls one full cycle for a single icon. */
@keyframes icon-shimmer-glow {
    /* 0% to 15% :: The icon is waiting for its turn (dimmed) */
    0%, 15%, 100% {
        filter: grayscale(100%);
        opacity: 0.6;
        transform: scale(1);
    }
    /* 30% :: The icon reaches its peak brightness and color */
    30% {
        filter: grayscale(0%) drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) brightness(1.2);
        opacity: 1;
        transform: scale(1.1); /* Slightly enlarges the icon for emphasis */
    }
    /* 50% :: The icon fades back to its original color before going gray again */
    50% {
        filter: grayscale(0%);
        opacity: 0.9;
        transform: scale(1);
    }
}

/* 2. Set the initial state and apply the animation to all icon images. */
.hero-feature-item .hero-icon-wrapper img {
    /* The animation will run for a total of 5 seconds (1s per icon) and loop forever. */
    animation-name: icon-shimmer-glow;
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

/* 3. Stagger the animation start time for each icon using animation-delay.
   This is the key to making them light up one by one. */

/* Icon 1: Starts immediately */
.hero-feature-item:nth-child(1) .hero-icon-wrapper img {
    animation-delay: 0s;
}

/* Icon 2: Starts 1 second later */
.hero-feature-item:nth-child(2) .hero-icon-wrapper img {
    animation-delay: 1s;
}

/* Icon 3: Starts 2 seconds later */
.hero-feature-item:nth-child(3) .hero-icon-wrapper img {
    animation-delay: 2s;
}

/* Icon 4: Starts 3 seconds later */
.hero-feature-item:nth-child(4) .hero-icon-wrapper img {
    animation-delay: 3s;
}

/* Icon 5: Starts 4 seconds later */
.hero-feature-item:nth-child(5) .hero-icon-wrapper img {
    animation-delay: 4s;
}
/* =================================================================
   OPTION 4: REFRACTIVE LIGHT ANIMATION
================================================================= */

/* 1. The main container to hold the effects */
.refractive-container {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden; /* This is crucial to "clip" the light sheen */
    border-radius: 20px; /* Optional: soft corners */
}

/* 2. The subtle refractive background glow */
.refractive-container::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle,
        rgba(178, 48, 255, 0.2) 0%, /* Soft purple glow */
        rgba(178, 48, 255, 0) 70%   /* Fades to transparent */
    );
    animation: refract-pulse 5s ease-in-out infinite;
    z-index: 1;
}

/* 3. The product image sits on top of the glow */
.refractive-container .hero-product-image {
    position: relative;
    z-index: 2;
}

/* 4. The light sheen/glint effect */
.refractive-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%, /* The subtle white glint */
        transparent 100%
    );
    transform: rotate(25deg); /* Angled sheen */
    animation: shine-wipe 6s ease-in-out infinite;
    z-index: 3;
}

/* 5. The Animation Keyframes */
@keyframes refract-pulse {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(0.9); opacity: 0.5; }
}

@keyframes shine-wipe {
    0% { transform: translate(-100%, 50%) rotate(25deg); }
    100% { transform: translate(50%, -100%) rotate(25deg); }
}
/* =================================================================
   DESKTOP & TABLET STYLES (min-width: 992px)
================================================================= */
@media (min-width: 992px) {
    .hero-container {
        flex-direction: row;
        text-align: left;
        align-items: center; /* Vertically align items */
    }
    
    .hero-image-column {
        order: 1;
        width: 45%;
        margin: 0;
    }
    
    .hero-content-column {
        order: 2;
        width: 55%;
        padding-left: 50px;
    }

    .hero-content-column p:not(.hero-subtitle) {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-features {
        justify-content: flex-start;
        margin-top: 60px;
        gap: 30px;
    }
}
/*SVG*/


/* Intro Section (#start) */
.intro-section {
    background-color: #111111;
    padding: 60px 0;
}

.intro-container {
    display: flex;
    max-width: 1140px;
    width: 90%;
    margin: 0 auto;
}

/* --- Left Panel: Navigation --- */
.intro-left-panel {
    flex: 0 0 25%; /* Left panel takes up 35% of the space */
    padding-right: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.intro-nav a {
    display: flex;
    align-items: center;
    padding: 18px 0;
    text-decoration: none;
    color: #cccccc;
    font-family: "Lato", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid #282828;
    transition: color 0.3s ease;
}

.intro-nav li:last-child a {
    border-bottom: none;
}

.intro-nav a:hover {
    color: #ffffff;
}

.nav-icon {
    width: 9px;
    height: 9px;
    margin-right: 20px;
    fill: #ffffff; /* Sets the circle color */
}

/* --- Right Panel: Content Card --- */
.intro-right-panel {
    flex: 0 0 75%; /* Right panel takes up 65% */
    background-color: #000000;
    background-image: url('https://www.careline.com/wp-content/uploads/2021/05/woman-posing-at-the-beach-P662T7L-1024x683.jpg');
    background-size: cover;
    background-position: center 30%;
    position: relative;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 50px;
    box-sizing: border-box;
    background-position: center; 
}

.intro-right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45); /* Dark overlay to match image */
    z-index: 1;
}

.intro-right-content {
    position: relative;
    z-index: 2;
}

.intro-right-content h2 {
    color: #ffffff;
    font-family: 'Raleway', sans-serif;
    font-size: 60px;
    font-weight: 700;
    letter-spacing: 5px;
    margin-bottom: 15px;
}

.intro-right-content h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.intro-right-content .accent-text {
    color: #b738e8; /* The specific purple color */
    margin-left: 0.5em;
}

.view-products-button {
    background-color: #222222;
    color: #ffffff;
    font-family: "Lato", sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 15px 25px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease;
}

.view-products-button:hover {
    background-color: #444444;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .intro-container {
        flex-direction: column;
    }

    .intro-left-panel,
    .intro-right-panel {
        flex: 1 1 100%; /* Make them full width */
        width: 100%;
    }
    
    .intro-left-panel {
        padding: 0;
        margin-bottom: 40px;
    }

    .intro-right-panel {
        padding: 80px 40px; /* More vertical padding on mobile */
    }
}

@media (max-width: 576px) {
    .intro-right-content h2 {
        font-size: 42px;
        letter-spacing: 3px;
    }
    .intro-right-content h4 {
        font-size: 14px;
        letter-spacing: 2px;
    }
    .intro-right-panel {
        padding: 60px 25px;
    }
}

/* ==========================================================================
   Careline Custom Homepage Sections (CORRECTED)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Global Section Styling for Dark Theme
   -------------------------------------------------------------------------- */
.cl-section {
    background-color: #000000;
    color: #ffffff;
    padding: 80px 20px;
    overflow: hidden; /* Important for marquees */
}

/* Alternating background for visual separation */
.cl-section-bg {
    background-color: #111111; 
}

.cl-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.cl-section-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.cl-section-title .accent-text {
    color: #b230ff; /* Correct Brand Purple */
    font-weight: 700;
}

.cl-section-intro {
    font-size: 1.1rem;
    color: #cccccc; /* Slightly off-white for readability */
    max-width: 800px;
    margin: 0 auto 50px auto;
    line-height: 1.6;
}

.cl-button {
    display: inline-block;
    background-color: #b230ff;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cl-button:hover {
    background-color: #9a28db;
    transform: translateY(-3px);
}

.cl-button-secondary {
    display: inline-block;
    background-color: transparent;
    color: #b230ff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid #b230ff;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cl-button-secondary:hover {
    background-color: #b230ff;
    color: #ffffff;
}


/* --------------------------------------------------------------------------
   Brand Story (F-A-Q) Section
   -------------------------------------------------------------------------- */

.faq-grid {
    /* REPLACED Grid with Flexbox */
    display: flex;
    flex-wrap: wrap; /* Allows cards to wrap */
    justify-content: center; /* Centers the cards */
    gap: 30px;
    text-align: left;
}

.faq-card {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    border-top: 4px solid #b230ff;
    /* ADDED: Flex properties for responsive sizing */
    flex: 1 1 300px; /* Grow, Shrink, Basis: starts at 300px and fills space */
}

.faq-card-title {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.faq-card-title span {
    font-size: 2.5rem;
    color: #b230ff;
    margin-right: 15px;
    font-weight: 800;
}

.faq-card p {
    color: #cccccc;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about-container {
    /* REPLACED Grid with Flexbox */
    display: flex;
    flex-wrap: wrap; /* Allows stacking on mobile */
    gap: 50px;
    align-items: center;
    text-align: left;
}

.about-content, .about-image {
    /* ADDED: Flex properties to create the two-column layout */
    flex: 1 1 400px; /* Each item will try to be at least 400px wide */
}

.about-content .cl-section-title,
.about-content .cl-section-intro {
    text-align: left;
    margin-left: 0;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Products Section (Visual Cards)
   -------------------------------------------------------------------------- */
.product-grid-visual {
    /* REPLACED Grid with Flexbox */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.product-card-visual {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* ADDED: Flex properties for responsive sizing */
    flex: 1 1 300px; /* Grow, Shrink, Basis: starts at 300px */
}

.product-card-visual:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(178, 48, 255, 0.1);
}

.product-image-wrapper img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.product-content {
    padding: 25px;
}

.product-content h3 {
    font-size: 1.4rem;
    color: #b230ff;
    margin-bottom: 10px;
}

.product-content p {
    color: #cccccc;
    line-height: 1.6;
}
/* --------------------------------------------------------------------------
   Client & Review Marquee Sections
   -------------------------------------------------------------------------- */
@keyframes marquee-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

/* --- Client Logo Marquee --- */
.logo-marquee {
    display: flex;
    width: 200%; /* Important for seamless loop */
    animation: marquee-scroll 40s linear infinite;
}
.logo-slide {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
}
.logo-slide img {
    max-height: 100px;
    width: auto;
    margin: 0 40px;
    
}

/* --- Review Card Marquee --- */
/* --- Review Card Marquee (UPDATED FOR SPACING - V2) --- */
@keyframes marquee-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(calc(-100% - 30px)); } /* CHANGED: Accounts for the new gap */
}

.review-marquee {
    display: flex;
    /* ADDED: Creates a 30px gap between the two .review-slide blocks */
    gap: 30px; 
    /* CHANGED: We adjust the width based on the content now */
    width: fit-content; 
    animation: marquee-scroll 80s linear infinite;
}

.review-slide {
    display: flex;
    /* ADDED: Creates a 30px gap between each review card inside the slide */
    gap: 30px; 
    width: fit-content;
    flex-shrink: 0;
}

.review-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 25px;
    /* REMOVED: All margin properties are gone. Gap handles the spacing. */
    width: 350px; 
    flex-shrink: 0;
}

.review-stars {
    color: #b230ff;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.review-card p {
    color: #cccccc;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 15px;
}

.reviewer-info {
    font-weight: 600;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Case Studies & Blog Sections (Shared Card Style)
   -------------------------------------------------------------------------- */
.case-study-grid, .blog-grid {
    /* REPLACED Grid with Flexbox */
    display: flex;
    flex-wrap: wrap; /* Allows cards to wrap to the next line */
    justify-content: center; /* Centers the cards in the container */
    gap: 30px;
}

.case-study-card, .blog-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    /* ADDED: Flex properties to control size and responsiveness */
    flex: 1 1 320px; /* Grow, Shrink, Basis: each card will be at least 320px wide */
    max-width: 400px; /* Optional: prevents cards from stretching too wide on 2-column layouts */
}

.case-study-card img, .blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.case-study-content, .blog-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.case-study-content h3, .blog-content h3 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 15px;
    line-height: 1.4;
}

.case-study-content p, .blog-content p {
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* --------------------------------------------------------------------------
   Why Choose Us Section
   -------------------------------------------------------------------------- */

.wcu-grid {
    /* REPLACED Grid with Flexbox */
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap to the next line on smaller screens */
    justify-content: center; /* Centers the items */
    gap: 30px;
    text-align: left;
}

.wcu-card {
    padding: 30px;
    /* ADDED: Flex properties to control size and responsiveness */
    flex: 1 1 250px; /* Flex-grow: 1, Flex-shrink: 1, Flex-basis: 250px */
    max-width: 300px; /* Optional: prevents cards from getting too wide on some screens */
}

.wcu-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #b230ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.wcu-icon-wrapper svg {
    width: 30px;
    height: 30px;
    fill: #ffffff;
}

.wcu-card h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.wcu-card p {
    color: #cccccc;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Comparison Table Section
   -------------------------------------------------------------------------- */
.comparison-table-wrapper {
    overflow-x: auto;
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    background: #1a1a1a;
}
.comparison-table th, .comparison-table td {
    padding: 18px;
    text-align: left;
    border-bottom: 1px solid #333333;
}
.comparison-table th {
    background-color: #000000;
    color: #ffffff;
    font-size: 1.1rem;
}
.comparison-table td:first-child {
    font-weight: 600;
    color: #ffffff;
}
.comparison-table .icon-bad {
    color: #ff5252; /* Red */
    font-weight: bold;
    margin-right: 8px;
}
.comparison-table .icon-good {
    color: #50fa7b; /* Green */
    font-weight: bold;
    margin-right: 8px;
}
.external-link-text {
    margin-top: 30px;
    font-style: italic;
    color: #888;
}
.external-link-text a {
    color: #b230ff;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Summary Section
   -------------------------------------------------------------------------- */
.summary-container {
    max-width: 800px;
}

/* --------------------------------------------------------------------------
   FAQ Section (CORRECTED)
   -------------------------------------------------------------------------- */
.faq-container {
    max-width: 800px;
}
.faq-accordion {
    text-align: left;
}
.faq-item {
    border-bottom: 1px solid #333333;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    width: 100%;
    /* FIX: Set background to transparent and ensure it doesn't change on hover */
    background: transparent !important;
    border: none;
    text-align: left;
    padding: 25px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* ADDED: Smooth transition for any potential text color changes */
    transition: color 0.3s ease;
}

/* FIX: This explicitly removes any unwanted hover effect from your main theme */
.faq-question:hover {
    background-color: transparent !important;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold; /* Makes the '+' and rotated 'x' look cleaner */
    color: #b230ff;
    transition: transform 0.3s ease;
}

/* FIX: Correctly handles the rotation of the '+' to an 'x' */
.faq-question[aria-expanded="true"] .faq-icon {
    /* This rotates the '+' sign by 45 degrees to create a perfect 'x' */
    transform: rotate(0deg); 
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out; /* Added padding transition */
}

/* FIX: Added padding to the answer itself for better animation */
.faq-answer p {
    padding: 0 10px 25px 10px;
    color: #cccccc;
    line-height: 1.7;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .cl-section {
        padding: 60px 15px;
    }
    .cl-section-title {
        font-size: 2.5rem;
    }
    .about-container {
        /* This rule is no longer needed as flex-wrap handles the stacking. */
        /* We keep the block for other potential mobile overrides. */
    }
    .about-image {
        order: -1; /* This still works perfectly to move image to top on mobile */
        margin-bottom: 30px;
    }
    .about-content .cl-section-title,
    .about-content .cl-section-intro {
        text-align: center;
    }
}