/* =========================================
    PUBLIC SITE MAIN STYLESHEET
    ========================================= */

/* =========================================
    Google Fonts - Centralized Import
    (Using the more comprehensive list, but ensure you only use a few to prevent performance issues)
    ========================================= */
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700|Open+Sans:400,700|Lato:400,700|Montserrat:400,700|Oswald:400,700|Source+Sans+Pro:400,700|Raleway:400,700|Poppins:400,700|Nunito:400,700|Merriweather:400,700|PT+Sans:400,700|Ubuntu:400,700|Playfair+Display:400,700|Rubik:400,700|Inter:400,700|Quicksand:400,700|Mulish:400,700|Noto+Sans:400,700|Cabin:400,700|Fira+Sans:400,700|Josefin+Sans:400,700|Oxygen:400,700|Exo+2:400,700|Muli:400,700|Work+Sans:400,700|Inconsolata:400,700|Anton:400,700|Dancing+Script:400,700|Pacifico:400,700|Lobster:400,700&display=swap');


/* =========================
    Base Layout & Body Styles for Sticky Footer
    ========================= */
html {
    height: 100%;
    box-sizing: border-box; /* Global box-sizing */
}

*, *::before, *::after {
    box-sizing: inherit; /* Inherit box-sizing for all elements */
}

body {
    min-height: 100vh; /* Ensures body takes at least full viewport height */
    display: flex; /* Establishes flex container */
    flex-direction: column; /* Stacks children vertically */
    margin: 0; /* Remove default body margin */
    padding: 0; /* Remove default body padding */
    /* font-family and font-size are now controlled by dynamic_font_styles.php */
    line-height: 1.6; /* Base line height */
    /* REMOVED: color: #333; */
}

/* Reset default heading/paragraph margins */
h1, h2, h3, h4, h5, h6, p, ul, ol {
    margin-top: 0;
    margin-bottom: 0; /* Consistent spacing below elements */
}


/* This is the main content area that should grow and push the footer down.
    It applies flex-grow to ensure it takes available space. */
.main-content {
    flex-grow: 1; /* Allows this content area to expand and push footer down */
    /* No max-width or centering here, as it's meant to be a full-width container for .page-content-wrapper */
}

/* NEW: Global Container for Centered Content - Replaces Bootstrap's .container */
/* This will now control the width for all sections using 'container' class */
.container {
    margin-left: auto; /* Centers the container */
    margin-right: auto; /* Centers the container */
    padding-left: 15px; /* Default horizontal padding */
    padding-right: 15px; /* Default horizontal padding */
}

/* NEW: Vertical Padding Utility - Replaces Bootstrap's .py-5 */
.py-5 {
    /* Padding values for .py-5 will be handled at the element level in the HTML */
}
/* You might also need other padding utilities if used by Bootstrap, e.g.:
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-4 { padding-top: 1.5rem; }

*/


/* Wrapper for page content with white background and specific padding (for non-about-us-pages) */
.page-content-wrapper {
    background-color: #ffffff; /* White background for the main content sections */
    /* Add top/bottom padding here if you want it to wrap the container.
        For About Us, this is skipped by page.php. */
    padding-top: 3rem; /* Added padding for pages using this wrapper */
    padding-bottom: 3rem; /* Added padding for pages using this wrapper */
}


/* =========================================
    Public Site Specific Styles
    ========================================= */

/* Page Banner (Header Image Area) */
.page-banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 100px 0; /* Adjust padding as needed for height */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Adds readability to text over image */
    text-align: center; /* Center content in banner */
}

.page-banner .container {
    /* If you want banner content to be narrower than default container, you can override here, e.g.: */
    max-width: 900px;
}


.page-title {

}

.page-description {
    /* font-size handled by dynamic_font_styles.php H4 settings */
    /* REMOVED: font-weight: 300; */
}


/* --- Our Mission Section --- */
/* This section is wrapped by .container and .py-5, which now define its outer spacing */
.about-mission-section {
    
}
.about-mission-title {
    text-align: Center;
    margin-top: 0px;
}


.about-mission-lead {
    /* font-size handled by dynamic_font_styles.php base settings */
    text-align: center;
    text-size-adjust: 100%;
    max-width: 900px;
	Padding-top:8px;
	Padding-bottom:8px;
    
}
.about-mission-text {
    /* font-size handled by dynamic_font_styles.php base settings */
    max-width: 900px; /* Allow this paragraph to be wider than the lead */
    margin: 0 auto 0px auto; /* Centers the paragraph within its parent's width */
    line-height: 1.7;
    text-align: start;

}

.about-mission-text-part2 {
    /* Maybe reduce its default top margin, or leave it for natural flow */
    margin-top: 12px;
}


/* --- How It Works Section --- */
/* The parent .how-it-works will provide the full-width background.
    Its inner .container will constrain the content. */

.how-it-works {
    /* The padding for content is handled by the .py-5 on the inner container */
    margin-bottom: 4.0em;
}

.how-it-works-title {
    Padding-top: 38px;
    /* font-size handled by dynamic_font_styles.php H2 settings */
    margin-bottom: 3rem;
    text-align: center;
    /* As per discussion, if this is still white, its color might be set globally or in dynamic_font_styles.php.
        No explicit 'color' property added here unless specifically requested. */
}
.how-steps-row {
    display: flex;
    justify-content: Center;
    gap: 3rem; /* Adjusted to rem for consistency, roughly 32px */
    flex-wrap: wrap;
}

.step-card {
    background: #F8F9FA;

    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* More prominent shadow */
    position: relative;
    transition: transform 0.3s;
    width: 335px; /* Slightly wider cards */
    height: 220px; /* Ensures consistent height for all cards */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* Adjusted padding to help content fit inside fixed height */
    padding: 25px 24px 20px 24px; /* Reduced top/bottom padding */
}
.step-card:hover {
    transform: translateY(-8px) scale(1.03); /* More noticeable lift on hover */
}

/* Styling for the step number (the <span> element) */
.step-card .step-number {
    /* font-size handled by dynamic_font_styles.php for base or specific span.step-number */
    color: #fff;
    background-color: #1976d2; /* Blue background circle */
    border-radius: 50%;
    width: 50px; /* Slightly larger circle */
    height: 50px; /* Slightly larger circle */
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -25px; /* Half of height to sit on top edge */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    border: 4px solid #f8f8f8; /* Border to match body background */
}

/* Styling for symbol - Adjusted font size and margins */
.step-card i {
    color: #1976d2; /* Blue icon color */
    font-size: 35px; /* Reduced from 40px to help content fit */
    margin: 5px 0 10px 0; /* Reduced margins slightly */
    display: block;
    margin-top: 25px; /* This margin-top specifically accounts for the absolute positioned number */
}
/* Corrected from h3 to h4 as per HTML structure */
.step-card h4 {
    /* font-size handled by dynamic_font_styles.php for H4 settings */
    margin-bottom: 0.5rem; /* Reduced from 0.7rem to create more space */
}
/* Adjusted line-height for paragraph to fit better */
.step-card p {
    line-height: 1.4; /* Slightly tighter line height to help content fit */
    margin: 0; /* Remove default margin */
}

/* --- Our Team Section --- */
/* This section is wrapped by .container and .py-5 */

.about-team-title {
    text-align: center;
    margin-bottom: 3rem; /* More spacing below title */
    margin-top: 8px;
}
.team-row {
    display: flex;
    justify-content: center;
    gap: 2.5rem; /* Adjusted to rem, more spacing */

    width: 310px; 

}
/* Removed 'box' styling for team members as requested */
.team-member {
    text-align: center;


}
.team-img {
    width: 130px; /* Larger image */
    height: 130px;
    border-radius: 50%;

    object-fit: cover;
    border: 5px solid #5b21b6; /* Purple border */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.team-name {
    margin-top: 10px;
}
.team-role {
    margin-bottom: 0.8rem;
}
.team-desc {
    /* No changes here as per request */
    width: 310px; 
}


/* --- How Our Scoring System Works Section --- */
/* This section is wrapped by .container and .py-5 */
.scoring-system-section {
    display: flex; /* Still flexbox for centering the card */
    justify-content: center;
}
.scoring-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 0px 10px rgba(0,0,0,0.15); /* More prominent shadow */
    padding: 2.5rem; /* Consistent padding */
    max-width: 900px; /* Wider card */
    width: 100%; /* Ensure it fills max-width */
    margin-top: 55px;
}
.scoring-card h3 {
    margin-top: 0;
    /* font-size handled by dynamic_font_styles.php H3 settings */
    /* REMOVED: font-weight: 700; */
    /* REMOVED: color: #2c3e50; */
    margin-bottom: 1.5rem;
}
.scoring-card ul, .scoring-card ol {
    margin-bottom: 1.5rem; /* Consistent spacing */
    padding-left: 25px; /* Add custom padding for list items */
}
.scoring-card hr {
    border: none;
    border-top: 2px solid #eee;
    margin: 1.8rem 0; /* Consistent spacing */
}
.scoring-card h5 {
    /* font-size handled by dynamic_font_styles.php H5 settings */
    /* REMOVED: font-weight: bold; */
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
}
.scoring-card p {
    /* font-size handled by dynamic_font_styles.php base settings */
    line-height: 1.7;
    margin-bottom: 1rem;
    /* REMOVED: color: #666; */
}
.scoring-card ul li,
.scoring-card ol li {
    /* font-size handled by dynamic_font_styles.php base settings */
    line-height: 1.6;
    margin-bottom: 0.5rem;
    /* REMOVED: color: #666; */
}
.scoring-card strong {
    /* REMOVED: color: #333; */
}


/* --- Form/Input Related Styles --- */
/* These are kept as they are not directly related to font sizing of content text */
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Change from space-around */
    gap: 200px; /* Add a gap between "Italic:" and "Underline:" groups */
    height: 100%;
    width: 100%;
}
.checkbox-group .form-check-inline {
    margin-right: 0; /* Keep this */
    display: flex;
    align-items: center;
    gap: 5px; /* Space between label text and checkbox input */
    white-space: nowrap;
}


/* =========================================
    Responsive Design (Media Queries)
    ========================================= */

@media (max-width: 1200px) {
    .container {
        max-width: 960px; /* Slightly narrower container for medium screens */
    }
    .scoring-card {
        padding: 2rem; /* Adjusted padding */
    }
}

@media (max-width: 992px) { /* Tablets */
    .container {
        max-width: 720px; /* Even narrower container */
    }

    .about-mission-title,
    .how-it-works-title,
    .about-team-title,
    .scoring-card h3 {
        /* font-size handled by dynamic_font_styles.php H2/H3 settings */
    }
    .about-mission-lead {
        /* font-size handled by dynamic_font_styles.php base settings */
    }
    .how-steps-row,
    .team-row {
        gap: 1.5rem; /* Smaller gap */
    }
}

@media (max-width: 768px) { /* Smaller Tablets & Large Phones */
    .container {
        max-width: 100%; /* Allow container to take full width */
        padding-left: 20px; /* Keep consistent side padding */
        padding-right: 20px;
    }
    .py-5 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    .about-mission-title,
    .how-it-works-title,
    .about-team-title,
    .scoring-card h3 {
        /* font-size handled by dynamic_font_styles.php H2/H3 settings */
    }
    .about-mission-lead {
        /* font-size handled by dynamic_font_styles.php base settings */
    }
    /* Stack cards vertically */
    .how-steps-row,
    .team-row {
        flex-direction: column;
        align-items: center;
        gap: 3rem; /* Restore gap when stacked */
        
        display: flex;
        justify-content: Center;
    
    }
    .step-card,
    .team-member {
        width: 90%; /* Make cards take more width */
        max-width: 380px; /* Limit their max width */
    }
    .scoring-card {    
        padding: 1.8rem;
        
    }
}

@media (max-width: 576px) { /* Smaller Phones */
    .page-title {
        /* font-size handled by dynamic_font_styles.php H1 settings */
    }
    .page-description {
        /* font-size handled by dynamic_font_styles.php H4 settings */
    }
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .py-5 {
        padding-top: 2rem;
        
    }
    .about-mission-title,
    .how-it-works-title,
    .about-team-title,
    .scoring-card h3 {
        /* font-size handled by dynamic_font_styles.php H2/H3 settings */
    }
    .scoring-card {
        padding: 1.2rem;
        margin-top: 20px;
    }
    .step-card,
    .team-member {
        width: 100%; /* Take full width on very small screens */
    }
    .step-card .step-number {
        width: 45px;
        height: 45px;
        top: -22px;
    }
    .step-card i {
        font-size: 3.5rem; /* Icon size might need to be re-evaluated if not controlled by dynamic CSS */
    }
}

/* =========================================
   Contact Us Specific Styles 
   ========================================= */

/* We are overriding the default padding on this wrapper to give our component full control.
   The flex-grow property from the global .main-content class will still work to push the footer down. */
.contact-page-content-wrapper {
    padding-top: 3rem;
    padding-bottom: 3rem;
    width: 100%; 
    flex: auto;
}

/* This is the main component card. It is centered with a simple margin. */
.contact-main-layout {
    display: flex;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto; /* Horizontally centers the component */
    border-radius: 16px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15);
    position: relative; 
}

/* This is the left-side container for the image. */
.contact-image-section {
    flex: 1.1; 
    background-image: url('https://images.unsplash.com/photo-1556761175-5973dc0f32e7?q=80&w=2832&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative; 
    
    /* Apply rounded corners to the left side */
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}




/* The info box is absolutely positioned to hang off the side */
.contact-info-box {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%); /* Pulls the box 50% out to the left and centers it vertically */

    width: 340px; 
    
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    
    /* Frosted glass effect */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); 
}

/* The form wrapper holds the form */
.contact-form-wrapper {
    flex: 1; 
    background-color: #fff; 
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    
    /* This makes the form centered vertically inside the wrapper */
    display: flex;
    align-items: center;
}

/* The form itself */
.contact-form-admin-box {
    padding: 2.5rem;
    width: 100%;
}


/* --- Shared Styles for Content Inside Cards --- */

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    flex-shrink: 0;
}

.info-item-svg {
    width: 22px; 
    height: 22px;
    color: #5b21b6;
}

.info-item-heading { 
    margin-bottom: 0.1rem;
}

.info-item-text { 
    line-height: 1.4;
}


.contact-form-admin-box .contact-page-main-title {
    margin-top: 0;
    margin-bottom: 2rem; 
    text-align: left;
}

.contact-form .form-group {
   padding-bottom: 10px; 
}

/* This is the new rule for the h3 form labels */
.contact-form .form-label {
    margin-bottom: 10px;
    margin-top: 10px;
    color: #47366d;
}

.contact-form .form-control {
    width: 100%;
    background-color: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 2px solid #e0e0e0;
    padding: 0rem 0rem; 
    font-size: 1rem;
    box-shadow: none;
    transition: border-color 0.3s ease;
    padding-bottom: 4px;
}

.contact-form .form-control:focus {
    outline: none;
    border-bottom-color: #5b21b6;
    box-shadow: none;
}

/* Styling for the dropdown menu to look like a box, using a more specific selector and !important */
.form-group-subject select.form-control {
    color: #09242b;
    text-transform: uppercase;
    
    /* MODIFIED: Added !important to force these styles to apply */
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background-color: #f8f9fa !important;
    padding: 0.75rem !important;

    /* Custom arrow for consistent look across browsers */
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
}


.contact-form textarea.form-control {
    resize: vertical;
    padding-bottom: 10px;
    overflow-y: hidden;
}

.contact-form .submit-button {
    width: 100%;
    background-color: #47366d;
	    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1.5rem; 
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: none;
}

.contact-form .submit-button:hover {
    background-color: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


/* --- Responsive Design --- */
@media (max-width: 900px) {
    .contact-page-content-wrapper {
        padding: 0;
        
    }

    .contact-main-layout {
        flex-direction: column;
        overflow: visible; 
        box-shadow: none; 
        margin: 6rem 0 0 0; 
        background: transparent;
        min-height: auto;
        width: 100%;
        border-radius: 0;
    }
    
    .contact-image-section {
        min-height: 200px;
        border-radius: 0;
    }

    .contact-info-box {
        position: relative;
        transform: none;
        left: auto;
        top: auto;
        margin: -4rem auto 0 auto;
        z-index: 10;
        width: 90%; 
    }

    .contact-form-wrapper {
        border-radius: 16px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.15);
        margin: -2rem 1rem 0 1rem;
        padding-top: 2rem; 
        z-index: 5;
        background-color: #fff;
    }
    
    .contact-form-admin-box {
        padding: 2.5rem;
    }
}


/* =========================================
   Terms of Use Specific Styles 
   ========================================= */


.terms-page-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- New Rule for Terms of Use Page --- */
.terms-card {
    margin-top: 0;
}


/* =========================================
   HOME PAGE LAYOUT STYLES (Revised)
   ========================================= */

/* Wrapper to center the entire interactive section */
.home-interactive-wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 0px 20px 0px;
}

/* Main container for the two-column layout */
.home-layout-container {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px; 
}

/* MODIFIED: Refiners Sidebar (Left Column) */
.refiners-sidebar {
    /* This sets a narrower base width and prevents it from growing. */
    flex: 0 1 260px;
}

.refiner-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    height: 100%;
    min-height: 400px;
}

/* MODIFIED: Main Content Area (Right Column) */
.main-content-area {
    /* This will now grow to fill all the remaining available space. */
    flex: 1;
    min-width: 300px; 
}

/* Placeholder styling for the category grid */
.category-grid-placeholder {
    width: 100%;
    min-height: 400px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: #aaa;
    background-color: #fdfdfd;
}





/* =========================================
   HOME PAGE - "HOW IT WORKS" SECTION STYLES
   (This is a separate copy for the homepage)
   ========================================= */

/* The parent .home-how-it-works will provide the full-width background. */
.home-how-it-works {
    margin-bottom: 4.0em;
}

/* This is the new title class with the top padding removed */
.home-how-it-works-title {
    margin-bottom: 3rem;
    text-align: center;
    padding-top: 0; /* Top padding removed as requested */
}

.home-how-steps-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.home-step-card {
    background: #F8F9FA;
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    position: relative;
    transition: transform 0.3s;
    width: 360px;
    height: 210px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 18px 20px 20px 18px;
}
.home-step-card:hover {
    transform: translateY(-8px) scale(1.03);
}

/* Children of home-step-card will inherit styles, but we target them via the new parent class */
.home-step-card .step-number {
    color: #fff;
    background-color: #1976d2;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    border: 4px solid #fff; /* Changed border to white to pop against non-white backgrounds */
}

.home-step-card i {
    color: #1976d2;
    font-size: 35px;
    margin: 5px 0 10px 0;
    display: block;
    margin-top: 25px;
}

.home-step-card h4 {
    margin-bottom: 0.5rem;
}

/* NOTE: Your original file has an h3 tag here, not a p tag. Styling h3. */
.home-step-card h3 {
    line-height: 1.4; 
    margin: 0;
    font-size: 1rem; /* Example font size, adjust as needed or let it inherit */
    font-weight: normal; /* Example font weight */
}



//* =========================================
   REFINERS SIDEBAR STYLES
   ========================================= */

/* The subtitle text below the main title */
.refiner-box h3 {
    /* Font size and weight REMOVED - these should come from dynamic_font_styles.php */
    color: #6c757d; /* A muted grey color - this is a structural color, not dynamic text color */
    margin-top: -5px; /* Pull it closer to the title */
    margin-bottom: 20px; /* Increased space before the items start */
}

/* Container for all the refiner items */
.refiner-items-container {
    display: flex;
    flex-direction: column;
    gap: 12px; /* The space between each refiner card */
	Padding-top: 30px;
	Padding-bottom: 30px;
}

/* Individual refiner card styling (for the <a> tag) */
.refiner-item {
    display: flex;
    align-items: center;
    padding: 10px 15px; /* Adjusted padding for better spacing */
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    text-decoration: none;
    color: inherit; 
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

/* MODIFICATION: The hover effect now includes the blue background and white text */
.refiner-item:hover {
    transform: translateY(-2px);
    background-color: #3b82f6; /* Blue background on hover */
    color: #fff; /* White text on hover */
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* This rule is no longer needed as hover state is combined above, but we keep an empty one for the future 'active' state for when a user clicks */
.refiner-item.active {
    /* We can add styles here later for a clicked/selected state if needed */
}

/* Styling for the main icon on the left */
.refiner-item > .fas {
    width: 28px; /* Gives the icon a fixed space for alignment */
    text-align: center;
    margin-right: 10px;
    color: #495057; /* A dark grey for the icon - this is a structural color */
    transition: color 0.2s ease-in-out; /* Smooth color transition */
}

/* The text (h4) of the refiner */
.refiner-item h4 {
    flex-grow: 1; /* This pushes the info icon all the way to the right */
    margin: 0;
 
    transition: color 0.2s ease-in-out; /* Smooth color transition */
}

/* The 'i' info icon on the right */
.refiner-info-icon {
    color: #adb5bd; /* A light grey for the info icon */
    cursor: help;
    transition: color 0.2s ease-in-out; /* Smooth color transition */
	margin-left: auto;
}

/* MODIFICATION: Make icons and text white when the parent card is hovered */
.refiner-item:hover > .fas,
.refiner-item:hover .refiner-info-icon,
.refiner-item:hover h4 {
    color: #fff;
}


/*
 * CSS for the Dynamic Category Grid on the Home Page
 */

/* 1. The main container for the category cards */
.category-grid {
    display: grid;
    /* This creates a responsive grid. It will try to fit as many 250px columns as it can.
       On a standard desktop, this will result in 4 columns. It will automatically wrap
       to fewer columns on smaller screens. */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px; /* The space between the cards */
    width: 100%;
    padding: 20px 0; /* Some spacing above and below the grid */
}

/* 2. The individual category card */
.category-card {
    position: relative; /* Needed for positioning the overlay content */
    height: 200px; /* Sets a consistent height for all cards */
    border-radius: 12px; /* Rounded corners */
    overflow: hidden; /* Ensures the background image doesn't bleed past the rounded corners */
    color: #ffffff; /* White text for better contrast on the dark overlay */
    
    /* Background image settings */
    background-size: cover;
    background-position: center;
    
    /* A subtle shadow for depth */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    
    /* Smooth transition for the hover effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 3. A slight lift effect when hovering over a card */
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* 4. A dark overlay on the card to ensure text is always readable */
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* A linear gradient from dark at the bottom to transparent at the top */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1; /* Places the overlay above the background image but below the content */
}

/* 5. The container for the text content inside the card */
.category-card-content {
    position: relative; /* To position it above the overlay */
    z-index: 2;
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligns content to the top */
}

/* 6. The category title (H4) */
.category-title {
    margin: 0;
    font-size: 1.25rem; /* Adjust size as needed */
    font-weight: bold;
    display: flex; /* Using flexbox to align title and icon */
    align-items: center; /* Vertically centers the icon with the text */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* Makes text pop */
}

/* 7. The info icon container (span) */
.category-info-icon {
    margin-left: 8px; /* Space between the title text and the icon */
    cursor: help; /* Changes the cursor to a question mark on hover */
    font-size: 1rem; /* Makes the icon slightly smaller than the title */
}

/*
 * CSS for the Interactive Slider Components
 */

/* Main container for the slider and its labels */
.category-slider-container {
    margin-top: auto; /* Pushes the slider to the bottom of the card */
    padding-top: 15px;
    width: 100%;
    position: relative;
    text-align: center;
}

/* The number that shows the current value */
.slider-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    margin-bottom: 5px;
    display: block; /* Make it a block to sit on its own line */
}

/* A wrapper to hold the min/max labels and the slider input */
.slider-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* The '1' and '10' labels */
.slider-label-min,
.slider-label-max {
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* The actual slider input element */
.importance-slider {
    flex-grow: 1; /* Allows the slider to take up the available space */
    margin: 0 10px; /* Adds space between the labels and the slider */
    -webkit-appearance: none; /* Removes default browser styling */
    appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.5); /* A semi-transparent white track */
    border-radius: 5px;
    outline: none;
}

/* Styling for the slider thumb (the draggable part) - Webkit browsers */
.importance-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff; /* Solid white thumb */
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #47366d; /* A border matching your theme color */
}

/* Styling for the slider thumb - Firefox */
.importance-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #47366d;
}


/*
 * CSS for the Search Button
 */

.search-button-container {
    text-align: center; /* Centers the button within its container */
    padding: 30px 0;    /* Adds space above and below the button */
}

.search-button {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    background-color: #47366d; /* A primary color from your theme */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.search-button:hover {
    background-color: #5a4a8a; /* A slightly lighter shade on hover */
    transform: translateY(-2px); /* A subtle lift effect */
}

.search-button:active {
    transform: translateY(0); /* Returns to original position on click */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/*
 * CSS for the Search Results Page (Grid Layout)
 */

.results-container {
    max-width: 1400px; /* Wider container for a 5-column grid */
    margin: 40px auto;
    padding: 0 20px;
}

.results-title {
    text-align: center;
    font-size: 2.5rem;
    color: #47366d;
    margin-bottom: 10px;
}

.results-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 40px;
}

/* --- GRID STYLES --- */
.results-grid {
    display: grid;
    /* Creates 5 columns, each taking an equal fraction of the space */
    grid-template-columns: repeat(5, 1fr);
    gap: 25px; /* The space between the cards */
}

.result-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Stacks card content vertically */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.result-card-image-wrapper {
    position: relative;
    width: 100%;
    /* This creates a square aspect ratio for the image area */
    aspect-ratio: 1 / 1; 
}

.result-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-card-rank {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(71, 54, 109, 0.9); /* Semi-transparent background */
    color: #ffffff;
    padding: 5px 12px;
    font-size: 1rem;
    font-weight: bold;
    border-bottom-right-radius: 12px;
}

.popular-choice-badge-card {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #856404;
    background-color: #fff3cd;
    border-radius: 20px;
    z-index: 1; /* Ensure it's above the image */
}
.popular-choice-badge-card .fa-star { margin-right: 5px; }


.result-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows content to fill the card height */
}

.result-card-title {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: bold;
    /* Ensure title doesn't get too long */
    line-height: 1.3;
    min-height: 2.6em; /* Reserve space for two lines of text */
}

.match-score-container {
    margin-bottom: 15px;
}

.match-score-label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
}

.progress-bar-fill {
    height: 100%;
    background-color: #5cb85c;
    border-radius: 4px;
}

.result-card-button {
    display: block; /* Makes the button take full width of its container */
    text-align: center;
    background-color: #47366d;
    color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
    margin-top: auto; /* Pushes the button to the bottom of the card */
}

.result-card-button:hover {
    background-color: #5a4a8a;
}

/* --- RESPONSIVE STYLES FOR THE GRID --- */
@media (max-width: 1200px) {
    .results-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on smaller desktops */
    }
}
@media (max-width: 992px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on tablets */
    }
}
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on small tablets */
    }
}
@media (max-width: 576px) {
    .results-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}


/* No Results Card */
.no-results-card {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    /* This will make it span all columns of the grid if it's the only item */
    grid-column: 1 / -1; 
}

.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background-color: #6c757d;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

/* --- NEW PAGINATION STYLES --- */
.pagination-container { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-top: 40px; 
    flex-wrap: wrap; /* Allow wrapping on small screens */
}
.pagination-container a, .pagination-container span { 
    color: #47366d; 
    padding: 8px 16px; 
    text-decoration: none; 
    transition: background-color .3s; 
    border: 1px solid #ddd; 
    margin: 4px; 
    border-radius: 5px; 
}
.pagination-container a.active { 
    background-color: #47366d; 
    color: white; 
    border-color: #47366d; 
}
.pagination-container a:hover:not(.active) { 
    background-color: #f0f0f0; 
}
.pagination-ellipsis {
    border: none;
    padding: 8px 0;
}








/* =========================================
   DESTINATION DETAILS PAGE STYLES
   ========================================= */

.destination-details-page {
    max-width: 1200px; /* Set a max-width for the page content */
    margin: 40px auto; /* Center the container with top/bottom margin */
    padding: 0 20px;
}

.destination-main-content {
    display: grid;
    /* Create two columns: left is 1 part, right is 1 part */
    grid-template-columns: 1fr 1fr; 
    gap: 40px; /* The space between the two columns */
}

/* --- Left Column Styles --- */
.destination-info-column {
    /* This column will contain the image and description */
}

.destination-main-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3; /* Give the image a nice aspect ratio */
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.destination-description-wrapper h3 {
    font-size: 1.8rem;
    color: #47366d;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.destination-description-wrapper p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}


/* --- Right Column Styles --- */
.destination-scores-column {
    /* This column will contain the category breakdown */
}

.category-scores-wrapper {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    height: 100%; /* Make it take the full height of the column */
}

.scores-title {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 5px;
}

.scores-subtitle {
    font-size: 1rem;
    color: #6c757d;
    margin-top: 0;
    margin-bottom: 30px;
}

.scores-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between each score item */
}

.score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.score-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.score-info {
    flex-grow: 1; /* Takes up available space */
}

.score-category-name {
    font-weight: 500;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex-grow: 1;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #28a745; /* A vibrant green */
    border-radius: 5px;
}

.score-value-text {
    font-size: 0.9rem;
    font-weight: bold;
    color: #6c757d;
    width: 40px; /* Fixed width for alignment */
    text-align: right;
}

.score-feedback-buttons {
    display: flex;
    gap: 8px;
    margin-left: 20px; /* Space between progress bar and buttons */
}

.feedback-btn {
    background-color: #fff;
    border: 1px solid #ced4da;
    color: #6c757d;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.feedback-btn:hover {
    background-color: #e9ecef;
    color: #343a40;
    transform: translateY(-1px);
}

.feedback-btn .fa-arrow-up { color: #28a745; }
.feedback-btn .fa-arrow-down { color: #dc3545; }


/* --- Responsive Styles for Destination Details Page --- */
@media (max-width: 992px) {
    .destination-main-content {
        grid-template-columns: 1fr; /* Stack columns on tablets and below */
    }
}




/*
 * CSS for the Contextual Popularity Badges
 */

/* Container to hold multiple badges and ensure they wrap nicely */
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px; /* Space between badges */
    margin-bottom: 15px; /* Space below the badges, before the score */
    min-height: 25px; /* Reserve some space even if there are no badges */
}

/* Individual badge styling */
.contextual-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem; /* Small, unobtrusive font */
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 20px; /* Pill shape */

    /* Default badge color scheme */
    color: #495057;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
}

/* You could even add specific colors for specific refiners in the future, like:
.contextual-badge.digital-nomad {
    color: #fff;
    background-color: #007bff;
}
*/
