/*--------------------------------------------------------------
# FlexiWork India - Consolidated & Refined CSS
--------------------------------------------------------------*/

/* Base Body Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa; /* Very light gray, similar to dashboard background */
    color: #343a40; /* Dark text for readability */
    margin: 0; /* Ensure no default body margin */
    min-height: 100vh; /* Ensure body takes full viewport height */
    display: flex; /* Use flexbox for sticky footer if needed */
    flex-direction: column;
}

/* Header Styling */
.header {
    background-color: #ffffff; /* White background */
    padding: 1rem 2rem; /* Increased padding for more space */
    border-bottom: 1px solid #e9ecef; /* Subtle border */
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* Light shadow */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space between logo and nav */
}

#logo h1 {
    margin: 0;
    padding: 0;
    line-height: 1;
}

#logo h1 a {
    color: #2563eb; /* Changed logo color to #2563eb */
    text-decoration: none;
    font-size: 1.75rem; /* Slightly smaller, more dashboard-like */
    font-weight: 700;
}

#logo h1 a:hover {
    color: #1d4ed8; /* Darker shade on hover */
}

/* Main Navigation (Desktop Styles) */
.header-nav {
    display: flex; /* Always flex on desktop */
    align-items: center;
    /* Reset mobile positioning for desktop */
    position: static;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    background-color: transparent;
    backdrop-filter: none;
    transition: none;
    z-index: auto;
    padding-top: 0;
    overflow-y: visible;
}

.header-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Horizontal on desktop */
    align-items: center;
    flex-direction: row; /* Ensure horizontal for desktop */
    gap: 0; /* Remove gap from mobile */
}

.header-nav .nav-item {
    position: relative;
    margin-left: 1.5rem;
    /* Adjusted padding to create a larger hover area that includes the space for the dropdown */
    padding: 0.5rem 1rem;
}

.header-nav .nav-link {
    padding: 0.5rem 0; /* Vertical padding only for direct links */
    color: #6c757d;
    font-weight: 500;
    transition: color 0.3s ease;
    text-decoration: none;
}

.header-nav .nav-link:hover {
    color: #2563eb;
}

/* Profile Dropdown Trigger (Logged-in state) */
.header-nav .nav-item > span {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #343a40;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.header-nav .nav-item > span:hover {
    background-color: #f0f2f5;
}

.header-nav .nav-item > span h6 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: inherit;
}

.header-nav .nav-item > span img {
    border-radius: 50%;
    height: 30px;
    width: 30px;
    object-fit: cover;
    margin-left: 0.5rem;
}

/* Dropdown Menu Styling (for logged-in profile) - Desktop Click Behavior */
.header-nav .nav-item ul { /* This targets the nested <ul> for the dropdown */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;

    position: absolute;
    top: calc(100% - 5px); /* Adjusted top to slightly overlap the parent for seamless hover/click transition */
    right: 0; /* Align to the right of the parent nav-item */
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 100;
    padding: 0.5rem 0;
    margin-top: 0; /* Crucial: Remove gap that breaks hover/click */
    list-style: none;
    flex-direction: column; /* Stack items vertically in dropdown */
    transform: translateY(-10px); /* Start slightly above for slide-down effect */
}

/* Dropdown Item Styling */
.header-nav .nav-item ul li {
    padding: 0;
}

.header-nav .nav-item ul li .nav-link {
    padding: 0.75rem 1.25rem;
    color: #495057;
    font-weight: 400;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header-nav .nav-item ul li .nav-link:hover {
    background-color: #f0f2f5;
    color: #2563eb;
}

/* Icon within dropdown items (if you add them like in the first reference image) */
.header-nav .nav-item ul li .nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    color: #6c757d;
    transition: color 0.3s ease;
}

.header-nav .nav-item ul li .nav-link:hover i {
    color: #2563eb;
}

/* Class to show the dropdown on click (Desktop & Mobile) */
.header-nav .nav-item.dropdown-open > ul {
    opacity: 1; /* Make visible */
    visibility: visible; /* Make visible */
    display: flex; /* Ensure it's flex to maintain column layout */
    transform: translateY(0); /* Slide into place */
}

/* Toggle button for mobile menu - initially hidden */
.toggle-sidebar-btn {
    display: none; /* Hidden on desktop by default */
    font-size: 1.8rem;
    cursor: pointer;
    color: #343a40;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}

.toggle-sidebar-btn:hover {
    color: #2563eb;
}

/* Mobile menu close button - initially hidden */
.mobile-menu-close-btn {
    display: none; /* Hidden by default, only shown in mobile menu */
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #343a40;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}
.mobile-menu-close-btn:hover {
    color: #dc3545;
}


/* --- Responsive Adjustments (Mobile/Tablet) --- */

@media (max-width: 991px) {
    .header {
        padding: 0.75rem 1rem; /* Smaller padding for mobile header */
        justify-content: space-between; /* Ensure logo and toggle are spaced */
    }

    /* Show hamburger icon */
    .toggle-sidebar-btn {
        display: block;
    }

    /* Mobile Navigation (Sidebar) */
    .header-nav {
        position: fixed;
        top: 0;
        left: -280px; /* Start off-screen to the left for slide-in (match width below) */
        width: 280px; /* Fixed width for the sidebar menu */
        max-width: 80%; /* Max width to not cover whole screen on small tablets */
        height: 100vh;
        background-color: #ffffff; /* Solid white background for sidebar */
        box-shadow: 0.25rem 0 1rem rgba(0, 0, 0, 0.15); /* Shadow on the right side */
        transition: left 0.3s ease-in-out; /* Smooth slide-in/out */
        z-index: 999;
        flex-direction: column;
        justify-content: flex-start; /* Align items to the top */
        align-items: flex-start; /* Align items to the left */
        padding-top: 4rem; /* Space from top for close button */
        overflow-y: auto; /* Enable scrolling for long menus */
    }

    /* Class to show the mobile menu */
    .header-nav.mobile-menu-open {
        left: 0; /* Slide into view */
    }

    /* Show close button when menu is open */
    .header-nav.mobile-menu-open .mobile-menu-close-btn {
        display: block;
    }

    .header-nav ul {
        flex-direction: column; /* Stack menu items vertically */
        width: 100%;
        text-align: left; /* Align text to left in sidebar */
        gap: 0; /* Remove gap, use padding on list items */
        padding: 0; /* Remove padding from ul, add to li */
    }

    .header-nav .nav-item {
        margin: 0; /* Remove horizontal margin */
        width: 100%; /* Full width for menu items */
        padding: 0; /* Remove padding from nav-item, add to nav-link */
        border-bottom: 1px solid #f0f2f5; /* Separator for menu items */
    }
    .header-nav .nav-item:last-child {
        border-bottom: none; /* No border on last item */
    }


    .header-nav .nav-link {
        font-size: 1.1rem; /* Slightly smaller font for mobile links */
        padding: 1rem 1.5rem; /* Generous padding for touch targets */
        display: block; /* Make links block-level for full touch area */
        color: #343a40; /* Darker color for mobile links */
        justify-content: flex-start; /* Align link content to the left */
    }

    .header-nav .nav-link:hover {
        background-color: #f0f2f5;
        color: #2563eb;
    }

    /* Adjust profile dropdown for mobile menu (nested within sidebar) */
    .header-nav .nav-item ul { /* The nested dropdown */
        position: static; /* Remove absolute positioning */
        display: none; /* Hidden by default, toggled by JS click */
        flex-direction: column;
        width: 100%; /* Full width within parent item */
        box-shadow: none; /* Remove shadow */
        border: none; /* Remove border */
        background-color: #f8f9fa; /* Slightly darker background for nested items */
        padding: 0;
        margin-top: 0;
        margin-left: 0;
        align-items: flex-start; /* Align sub-items to the left */
        border-top: 1px solid #e9ecef; /* Separator for dropdown content */
    }

    /* Ensure dropdown is visible when 'dropdown-open' class is applied */
    .header-nav .nav-item.dropdown-open > ul {
        display: flex; /* Show the nested dropdown */
        opacity: 1; /* Ensure visibility */
        visibility: visible;
        transform: translateY(0); /* Reset transform */
    }

    .header-nav .nav-item ul li .nav-link {
        padding: 0.75rem 2rem; /* Indent sub-items further */
        font-size: 1rem;
        color: #495057;
    }

    .header-nav .nav-item ul li .nav-link:hover i {
        color: #2563eb; /* Blue icon on hover */
    }

    /* Ensure the profile span (dropdown trigger) is styled correctly for mobile */
    .header-nav .nav-item > span {
        width: 100%; /* Full width */
        justify-content: flex-start; /* Align content to left */
        padding: 1rem 1.5rem; /* Match padding of other nav links */
        border-bottom: 1px solid #f0f2f5; /* Separator for profile item */
    }
}

/*--------------------------------------------------------------
Testimonials Section Specific Styles 
--------------------------------------------------------------*/
/* Testimonials Section Specific Styles */
#testimonials-section {
    padding: 4rem 1rem; /* Consistent padding */
    background-color: #f8f9fa; /* Light background */
}

.testimonial-card {
    /* Inherits .card-style for general appearance */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push quote to top, author to bottom */
    text-align: left; /* Align text within card */
    height: 100%; /* Ensure cards in a slide have equal height */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, z-index 0.3s ease; /* Smooth transition for scaling and shadow */
}

.testimonial-card .text-lg.italic {
    font-size: 1.125rem; /* Slightly larger quote text */
    line-height: 1.6;
    margin-bottom: 1.5rem; /* Space between quote and author info */
    color: #495057; /* Darker text for readability */
}

.testimonial-card img {
    border: 2px solid #e9ecef; /* Subtle border around avatar */
}

.testimonial-card .font-semibold {
    color: #343a40; /* Darker name color */
}

.testimonial-card .text-sm.text-gray-600 {
    color: #6c757d; /* Subtitle color */
}

.testimonial-card .text-yellow-500 {
    color: #ffc107; /* Standard yellow for stars */
}

.testimonial-card .bi-star-fill,
.testimonial-card .bi-star-half,
.testimonial-card .bi-star {
    margin-right: 2px; /* Small space between stars */
}

/* Carousel Specific Styles */
.carousel-container {
    position: relative;
    /* Adjust padding for navigation buttons to be outside the visible area */
    padding: 0 40px; 
}

.carousel-wrapper {
    overflow: hidden; /* Hide overflowing slides */
    /* Removed scroll-behavior: smooth; as JS handles transitions */
    -webkit-overflow-scrolling: touch; /* Enable momentum scrolling on iOS */
}

.carousel-slides {
    display: flex;
    /* Transition handled by JS for precise control */
    align-items: center; /* Align items to center vertically, important for scaling */
}

.carousel-slide {
    flex-shrink: 0; /* Prevent slides from shrinking */
    box-sizing: border-box; /* Include padding in width calculation */
    padding: 1rem; /* Gap between cards */
    width: calc(100% / 3); /* Always show 3 slides on screen */
}

/* Style for the active (center) testimonial card */
.carousel-slide.active-center .testimonial-card {
    transform: scale(1.08); /* Make the center card slightly bigger */
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); /* Stronger shadow for emphasis */
    z-index: 10; /* Ensure it's above side cards if overlapping */
}

.carousel-nav-btn {
    position: absolute; /* Keep this as absolute for positioning within carousel-container */
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent; /* Make background transparent */
    border: none; /* Remove any borders */
    border-radius: 50%; /* Keep for shape, but no visual effect without background/border */
    width: 60px; /* Increased width for more space */
    height: 60px; /* Increased height for more space */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: none; /* Remove shadow */
    z-index: 20; /* Above slides */
    transition: transform 0.3s ease; /* Only transition transform for hover effect */
    /* Remove position: relative and overflow: hidden as ::before is removed */
}

/* Pseudo-element for the gradient border - REMOVED COMPLETELY */
/* .carousel-nav-btn::before {
    content: '';
    position: absolute;
    top: -2px; 
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6366f1, #2563eb, #3b82f6);
    z-index: -1;
    transition: opacity 0.3s ease;
} */

.carousel-nav-btn:hover {
    background-color: transparent; /* Keep background transparent on hover */
    transform: translateY(-50%) scale(1.2); /* Make icon slightly larger on hover */
    box-shadow: none; /* No shadow on hover */
}

.carousel-nav-btn:active {
    transform: translateY(-50%) scale(0.9); /* Smaller scale on click */
    box-shadow: none; /* No shadow on click */
}

/* Icon inside buttons */
.carousel-nav-btn i {
    color: #2563eb; /* Blue color for the icon */
    font-size: 2.8rem; /* Make icon more prominent and fill space */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2); /* Subtle shadow for better visibility */
    position: relative; /* Ensure icon is above any potential background elements */
    z-index: 1;
    line-height: 1; /* Crucial for vertical centering of font icons */
}

.carousel-prev-btn {
    left: 0;
}

.carousel-next-btn {
    right: 0;
}

/* Pagination Dots (keep as is from previous update, or include for completeness) */
.carousel-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.carousel-pagination-dot {
    width: 10px;
    height: 10px;
    background-color: #ced4da; /* Inactive dot color */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-pagination-dot.active {
    background-color: #2563eb; /* Active dot color */
    transform: scale(1.2);
}

.carousel-pagination-dot:hover {
    background-color: #aeb8c1;
}

/* Responsive adjustments for navigation buttons on mobile */
@media (max-width: 767px) { /* Small screens (mobile) */
    .carousel-container {
        padding: 0; /* Remove padding for buttons on mobile */
    }
    .carousel-nav-btn {
        display: none !important; /* Hide navigation buttons on mobile */
    }
    .carousel-slide {
        width: 100%; /* Show 1 slide on mobile */
    }
}

/*--------------------------------------------------------------
# Modals
--------------------------------------------------------------*/
.modal-content.extra3 {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
}

.modal-body.grade {
    padding: 2rem;
    background-color: #ffffff;
}

.modal-body .pt-4.pb-2 {
    margin-bottom: 1.5rem;
}

.modal-body .card-title {
    color: #344767;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-body .small {
    color: #6c757d;
    font-size: 0.95rem;
}

.modal-body .close {
    font-size: 2rem;
    color: #6c757d;
    opacity: 0.7;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 10;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.modal-body .close:hover {
    color: #dc3545;
    opacity: 1;
}

.modal-body .form-label h5 {
    color: #343a40;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-body .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
    color: #495057;
}

.modal-body .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    outline: none;
    background-color: #ffffff;
}

.modal-body .input-group-text {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 0.5rem 0 0 0.5rem;
    color: #6c757d;
    padding: 0.75rem 1rem;
}
.modal-body .input-group .form-control {
    border-radius: 0 0.5rem 0.5rem 0;
}

.modal-body input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    vertical-align: middle;
    margin-left: 0.5rem;
    cursor: pointer;
    accent-color: #2563eb;
}

.modal-body .btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    padding: 0.85rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.modal-body .btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-2px);
}

.modal-body .btn-primary:active {
    transform: translateY(0);
}

.modal-body a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.modal-body a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.modal-body .col-12 {
    margin-bottom: 1rem;
}
.modal-body .mb-3 {
    margin-bottom: 1rem !important;
}
.modal-body br {
    display: none;
}


/*--------------------------------------------------------------
# General Section & Card Styles
--------------------------------------------------------------*/
section {
    padding: 4rem 1rem;
}

.section-title-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title-line {
    width: 4rem;
    height: 0.25rem;
    background-color: #2563eb;
    margin: 0 auto 0.5rem auto;
}

.section-main-title {
    color: #344767;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

.card-style {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 2rem;
    transition: transform 0.3s ease-in-out;
}

.card-style:hover {
    transform: scale(1.03);
}

/* Specific styles for contact icons */
.contact-icon {
    color: #2563eb;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: #6c757d;
}

.contact-card a {
    color: #2563eb;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

/*--------------------------------------------------------------
# FAQ Accordion Styling
--------------------------------------------------------------*/
.faq-item {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #343a40;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fefefe;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f0f2f5;
}

.faq-question .toggle-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.faq-question.active .toggle-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    color: #6c757d;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}

.faq-answer.open {
    max-height: 500px; /* Adjust as needed */
    padding: 1.5rem;
}

/*--------------------------------------------------------------
# Hero Section Specific Styles & Animations
--------------------------------------------------------------*/
#hero-section {
    background: linear-gradient(135deg, #1a202c, #2d3748);
    color: #ffffff;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 5rem;
    position: relative;
    overflow: hidden;
}

.welcome { /* This class seems unused or redundant if hero-title is the main one */
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #ffffffb0;
    display: inline-block;
    vertical-align: middle;
}

.to { /* This class seems unused or redundant */
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #ffffff;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    border-right: .15em solid #3b82f6;
    max-width: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Animations for typewriter and gradient */
@keyframes typing {
    from { max-width: 0 }
    to { max-width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #3b82f6; }
}
@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Class added after typing is done */
.hero-title.typed {
    border-right: none;
    white-space: normal;
    max-width: 100%;
    background: linear-gradient(90deg, #6366f1, #2563eb, #3b82f6);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 5s ease infinite alternate;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: #e2e8f0;
}

/* Falling Stars Background */
.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.star {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    opacity: 0;
    animation: fall 10s linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) translateX(50px);
        opacity: 0;
    }
}