/* ======================= RATES PAGE STYLES ======================= */

/* -------------------- Page Container (Header/Hero) -------------------- */
.rates-hero-banner {
    /* Layered a 50% opacity black gradient over the image */
    background-image: linear-gradient(rgba(0, 0, 0, 0.918), rgba(0, 0, 0, 0.678)),
        url('../images/Rates.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    /* Added to ensure image is centered */
    padding: 60px 60px 60px 60px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: white;
    /* Ensures all text inside is white for better contrast */
}

.rates-hero-banner h2 {
    font-size: 3em;
    font-weight: 800;
    margin-top: 10px;
    margin-bottom: 15px;
    line-height: 1.1;
}

.rates-hero-banner p {
    font-size: 1.25em;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* The small "Pricing" tag above the main heading */
.rates-hero-banner .tag-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 15px;
    border-radius: 50px;
    margin-bottom: 5px;
}


/* -------------------- General Content Layout -------------------- */
.rates-content {
    max-width: 1500px;
    margin: 40px auto 60px auto;
    /* Pull the content up over the hero bottom edge */
    padding: 0 20px;
    position: relative;
    z-index: 20;
    /* Ensure content box is above the hero */
}

.rates-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin-top: 40px;
    margin-bottom: 15px;
    padding-left: 10px;
}

.rates-content p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 25px;
    padding-left: 10px;
}

/* -------------------- Info Box (Policies) -------------------- */
/* --- THE FLEX ROW (The Alignment Fix) --- */
.fleet-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 40px 0;
    border-bottom: 1px solid #eee;
    /* Thin separator line from screenshot */
    margin: 0 auto;
    
}

/* Left Column */
.mini-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    width: 25%;
    /* Fixed width to keep center title perfectly centered */
    font-weight: 500;
}

/* Center Column */
.fleet-title-center {
    width: 50%;
    text-align: center;
}

.fleet-title-center h3 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Right Column */
.fleet-header-desc {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #d4d4d4;
    line-height: 1.6;
    width: 25%;
    text-align: right;
    font-weight: 400;
}

/* --- INFO BOX STYLING --- */
.info-box {
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 50px;
}

.info-box > p {
    font-size: 16px;
    color: #444;
    text-align: center;
    max-width: 800px;
    margin: -70px auto 50px;
    line-height: 1.6;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.info-col h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box ul li {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #333;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 991px) {
    .fleet-header-row {
        flex-direction: column;
        /* Stacks items on mobile */
        text-align: center;
        gap: 15px;
        padding-bottom: 20px;
    }

    .mini-tag,
    .fleet-title-center,
    .fleet-header-desc {
        width: 100%;
        text-align: center;
    }

    .fleet-title-center h3 {
        font-size: 32px;
    }

    .fleet-header-desc {
        text-align: center;
        /* Ensures right text centers on mobile */
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
}

    
/* -------------------- Rates Table Styling -------------------- */
.rates-table-wrapper {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 40px;
}

.rates-table {
    width: 100%;
    border-collapse: separate;
    /* Use separate borders for rounded cells */
    border-spacing: 0;
    margin-top: 20px;
}

.rates-table thead th {
    background-color: #333;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rates-table tbody td {
    padding: 12px 15px;
    border: 1px solid #f0f0f0;
    font-size: 1rem;
    color: #333;
}

/* Style the Location column */
.rates-table tbody tr td:nth-child(odd) {
    background-color: #f9f9f9;
    font-weight: 500;
}

/* Style the Rate column */
.rates-table tbody tr td:nth-child(even) {
    text-align: right;
    font-weight: 700;
    color: #003366;
}

/* Styling for the rounded corners (optional, but nice) */
.rates-table thead tr th:first-child {
    border-top-left-radius: 8px;
}

.rates-table thead tr th:last-child {
    border-top-right-radius: 8px;
}

/* Styling to highlight specific data cells, matching the screenshot's alternating row background */
.rates-table tbody tr:nth-child(odd) td {
    background-color: #fcfcff;
}

.rates-table tbody tr:nth-child(even) td:nth-child(odd) {
    background-color: #f0f0f0;
    /* Darker location background for even rows */
}

.rates-table tbody tr:nth-child(even) td:nth-child(even) {
    background-color: #f9f9f9;
    /* Lighter rate background for even rows */
}


/* -------------------- Contact CTA Banner -------------------- */
.contact-cta {
    position: relative;
    margin-top: 80px;
    padding: 80px 40px;
    border-radius: 25px; /* Matches the homepage CTA radius */
    text-align: center;
    color: #fff;
    overflow: hidden;
    background: url('/images/CustomerSupport.webp') center/cover no-repeat; /* Replace with your image path */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: none;
}

/* Dark Gradient Overlay to ensure text stays sharp */
.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(19, 19, 19, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.cta-inner-content {
    position: relative;
    z-index: 2; /* Sits above the overlay */
}

.contact-cta h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    /* Override blue H3 color */
    border: none;
    padding-left: 0;
}

.contact-cta h3::before {
    font-size: 1.5rem;
    margin-right: 15px;
}

.contact-cta p {
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto 25px auto;
    color: white;
    opacity: 0.9;
}

.contact-cta a {
    text-decoration: none;
}

.contact-cta button {
    background-color: white;
    color: #003366;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s;
}

.contact-cta button:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

.contact-cta strong a {
    color: white;
    text-decoration: underline;
    font-weight: 700;
}


/* ======================= SEARCH BAR STYLES (NEW) ======================= */
.rates-search-container {
    margin-bottom: 20px;
    position: relative;
    max-width: 100%;
}

.rates-search-input {
    width: 100%;
    padding: 15px 20px 15px 45px;
    /* Left padding space for icon */
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.rates-search-input:focus {
    border-color: #333;
    box-shadow: 0 2px 10px rgba(0, 85, 170, 0.1);
}

/* Search Icon */
.rates-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.2rem;
    pointer-events: none;
    /* Let clicks pass through to input */
}

/* "No results" message hidden by default */
.no-results-message {
    display: none;
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 10px;
}

/* ======================= MOBILE RESPONSIVENESS FIX ======================= */
@media (max-width: 768px) {

    .rates-search-container {
        margin-bottom: 15px;
        width: 80%;
    }

    /* 1. Hero Adjustments */
    .rates-hero-banner {
        padding-top: 40px;
        padding-bottom: 30px;
        padding-left: 25px;
        padding-right: 25px;
    }

    .rates-hero-banner h2 {
        font-size: 2rem;
    }

    .rates-hero-banner p {
        font-size: 0.9rem;
    }

    /* 2. Container Adjustments */
    .rates-content {
        padding: 0 15px;
        margin-top: 20px;
    }

    .rates-table-wrapper {
        padding: 15px;
    }

    /* Force Table into a Single Column Stack */
    .rates-table, 
    .rates-table thead, 
    .rates-table tbody, 
    .rates-table th, 
    .rates-table td, 
    .rates-table tr {
        display: block; 
        width: 97.5% !important;
    }

    /* Hide the Desktop Headers */
    .rates-table thead {
        display: none;
    }

    /* Each Row becomes a container for 2 cards (since your HTML has 4 <td> per <tr>) */
    .rates-table tbody tr {
        margin-bottom: 0;
        border: none;
    }

    .rates-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        border: 1px solid #eee;
        margin-bottom: -1px; /* Prevents double borders */
        background-color: #fff !important; /* Reset background for list view */
    }

    /* Add "Location" Label to Odd cells (1 and 3) */
    .rates-table td:nth-child(odd)::before {
        content: "Location";
        font-size: 11px;
        text-transform: uppercase;
        color: #888;
        font-weight: 700;
    }

    /* Add "Rate" Label to Even cells (2 and 4) */
    .rates-table td:nth-child(even)::before {
        font-size: 11px;
        text-transform: uppercase;
        color: #888;
        font-weight: 700;
    }

    /* Make the Price pop on Mobile */
    .rates-table td:nth-child(even) {
        border-top: none;
        margin-bottom: 15px; /* Spacing between the pairs */
        border-bottom: 2px solid #eee;
        background-color: #fcfcff !important;
        color: #0d47a1;
        font-size: 1.1rem;
    }
    
    /* Round the corners of the mobile cards */
    .rates-table td:nth-child(odd) {
        border-radius: 10px 10px 0 0;
        margin-top: 10px;
    }
    .rates-table td:nth-child(even) {
        border-radius: 0 0 10px 10px;
    }
}