/* GLOBAL CSS FIXES FOR CROSS-BROWSER CONSISTENCY START */
html {
    -webkit-text-size-adjust: 100%; /* Prevent font scaling on iOS */
    text-size-adjust: 100%;
    font-size: 16px; /* Explicitly set base font size for consistency (1rem = 16px) */
    line-height: 1.5; /* Ensure a consistent default line height */
    box-sizing: border-box; /* Ensure border-box model universally */
    scroll-behavior: smooth; /* Keep smooth scroll */
}

*, *::before, *::after {
    box-sizing: inherit; /* All elements inherit border-box from html */
}

body {
    margin: 0; /* Remove default browser margin */
    font-family: 'Inter', sans-serif; /* Already there, but good to reconfirm */
    line-height: inherit; /* Inherit line-height from html */
    -webkit-font-smoothing: antialiased; /* Better font rendering on Webkit browsers */
    -moz-osx-font-smoothing: grayscale; /* Better font rendering on Firefox for MacOS */
    color: #333333; /* Dark grey for general text */
    background-color: #f8f9fa; /* Light grey background */
}
/* GLOBAL CSS FIXES FOR CROSS-BROWSER CONSISTENCY END */


/* Combined Color Palette */
/* Define custom colors based on RBH brand for easier use in Tailwind */
:root {
    --color-primary-dark-blue: #002E5D;
    --color-primary-red: #E60023;
    --color-light-blue-bg: #e6f0f8;   /* Updated light blue background for testimonials */
    --color-darker-red: #cc001a;      /* A darker shade for hover effect */
    --color-dark-blue-gradient-start: #002E5D;
    --color-dark-blue-gradient-end: #004080;
    --color-light-red-bg: #ffebee;    /* Updated light red background for testimonials */
}

.text-primary-dark-blue { color: var(--color-primary-dark-blue); }
.bg-primary-dark-blue { background-color: var(--color-primary-dark-blue); }
.text-primary-red { color: var(--color-primary-red); }
.bg-primary-red { background-color: var(--color-primary-red); }
.hover\:bg-darker-red:hover { background-color: var(--color-darker-red); }
.bg-light-blue-bg { background-color: var(--color-light-blue-bg); }
.bg-light-red-bg { background-color: var(--color-light-red-bg); }

/* General border color */
.border-main-color { border-color: #002E5D; }


/* Hide sections by default, JavaScript will show them */
/* Note: This rule might become less relevant as sections are now separate pages,
    but keeping it for any internal page sections that might still use it. */
.content-section:not(.active) {
    display: none;
}
/* Explicitly show active sections as block elements */
.content-section.active {
    display: block;
}

/* Hero Banner specific styles for fade effect (if used by JS) */
.hero-banner {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: absolute; /* Position elements absolutely within the relative container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex; /* Use flexbox for centering content */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px; /* Add some padding */
}
.hero-banner.active {
    opacity: 1;
    position: relative; /* Active banner takes up space */
}
/* Ensure banners don't stack vertically when not active */
.hero-banner:not(.active) {
    pointer-events: none; /* Disable interaction on inactive banners */
}

/* Style for validation error messages */
.error-message {
    color: #ef4444; /* Tailwind red-500 */
    font-size: 0.875rem; /* text-sm */
    margin-top: 0.25rem; /* mt-1 */
}

/* FAQ Accordion Styles */
.accordion-item {
    border-bottom: 1px solid #e2e8f0; /* Tailwind border-gray-200 */
}
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    cursor: pointer;
    font-weight: 600;
    color: #002E5D; /* Primary dark blue */
}
.accordion-header:hover {
    color: #E60023; /* Primary red */
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 1rem;
    color: #4a5568; /* Tailwind gray-700 */
}
.accordion-item.active .accordion-content {
    max-height: 200px; /* Adjust based on expected content height */
    padding-bottom: 1rem;
}
.accordion-icon {
    transition: transform 0.3s ease-out;
}
.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Dropdown specific styles (Desktop) */
.dropdown-menu {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 260px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
    border-radius: 0.5rem; /* rounded-lg */
    overflow: hidden; /* Ensures child rounded corners are visible */
    top: 100%; /* Position directly below the parent link */
}

.dropdown-menu a {
    color: #333333; /* Dark grey */
    padding: 12px 16px;
    text-decoration: none;
    display: block;font-size: 14px;/* update sub menu size*/
    text-align: left;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #E6F0F8; /* Light blue background */
    color: #002E5D; /* Dark blue text */
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* Mobile Menu & Dropdown Adjustments */
@media (max-width: 1023px) { /* lg breakpoint */
    /* Ensure the main nav links container is a column flexbox */
    #nav-links {
        flex-direction: column;
        width: 100%;
        box-sizing: border-box; /* Include padding in width */
    }

    /* Ensure all top-level nav items take full width and stack */
    #nav-links > a.nav-link,
    #nav-links > .dropdown {
        width: 100% !important; /* Force full width */
        display: block !important; /* Ensure they behave as block elements for stacking */
        text-align: left; /* Align text left in mobile menu */
        padding-left: 1.5rem; /* Add some padding for readability */
        padding-right: 1.5rem;
        box-sizing: border-box; /* Include padding in width calculation */
    }

    .dropdown-menu {
        position: static; /* Remove absolute positioning for mobile */
        box-shadow: none;
        margin-top: 0;
        width: 100% !important; /* Force full width for the dropdown content */
        max-width: 100% !important; /* Override any max-width constraints */
        border-radius: 0;
        background-color: #f8f9fa; /* Match mobile menu background */
        padding-left: 0; /* Reset padding on the menu itself */
        padding-right: 0;
        box-sizing: border-box; /* Include padding in width calculation */
    }
    .dropdown-menu a {
        padding-left: 2.5rem; /* Indent sub-menu items */
        width: 100%; /* Ensure sub-menu items also take full width */
        box-sizing: border-box; /* Include padding in width calculation */
    }
    .dropdown.active .dropdown-menu {
        display: block;
    }
}

/* Custom max-width for content on desktop (1200px) */
/* Define a custom utility class for 1200px */
.max-w-custom-xl {
    max-width: 1200px;
}

/* Apply this custom max-width only on large screens and above */
@media (min-width: 1024px) { /* Equivalent to Tailwind's lg breakpoint */
    .lg\:max-w-custom-xl {
        max-width: 1200px;
    }
}

/* Loading spinner styles */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #E60023; /* Primary red */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cookie Consent Banner Styles */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #002E5D; /* Dark blue */
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.5s ease-out;
}
#cookie-consent-banner.show {
    transform: translateY(0);
}
#cookie-consent-banner p {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
}
#cookie-consent-banner .buttons {
    display: flex;
    gap: 1rem;
}
#cookie-consent-banner button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#cookie-consent-banner #accept-cookies {
    background-color: #E60023; /* Primary red */
    color: white;
    border: none;
}
#cookie-consent-banner #accept-cookies:hover {
    background-color: #B3001C; /* Darker red */
}
#cookie-consent-banner #decline-cookies {
    background-color: #ffffff;
    color: #002E5D; /* Dark blue */
    border: 1px solid #002E5D;
}
#cookie-consent-banner #decline-cookies:hover {
    background-color: #f0f0f0;
}

@media (min-width: 768px) {
    #cookie-consent-banner {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 2rem;
    }
    #cookie-consent-banner p {
        text-align: left;
        flex-grow: 1;
        margin-right: 2rem;
    }
}

/* Hero banner specific styling - IMPORTANT: Make sure these are NOT duplicated elsewhere */
#hero-banners-container {
    position: relative;
    height: 600px; /* Doubled height for desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.hero-banner-content {
    opacity: 1;
    transition: opacity 1s ease-in-out;
    text-align: center;
    max-width: 100%;
    padding: 0 1rem; /* Default padding for larger screens */
}

/* Hero banner navigation arrows */
.hero-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 1rem 1.2rem;
    border-radius: 9999px; /* Tailwind's rounded-full */
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.hero-nav-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.hero-nav-arrow.left {
    left: 1rem; /* Default for larger screens */
}

.hero-nav-arrow.right {
    right: 1rem; /* Default for larger screens */
}

/* Increased font sizes for headline and subtext for better arrangement */
#hero-banners-container .hero-banner-content h1 {
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 4.5rem;
}

#hero-banners-container .hero-banner-content p {
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Increased CTA button padding and font size */
.hero-banner-content a {
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
}

/* Mobile adjustments for hero banner specific elements */
@media (max-width: 768px) {
    #hero-banners-container {
        height: 500px;
    }
    /* These specific rules are critical for fixing the mobile banner */
    .hero-nav-arrow.left {
        left: 0.5rem; /* Move closer to edge */
    }
    .hero-nav-arrow.right {
        right: 0.5rem; /* Move closer to edge */
    }
    .hero-banner-content {
        padding-left: 2.5rem; /* Account for arrows on the left */
        padding-right: 2.5rem; /* Account for arrows on the right */
    }
    #hero-banners-container .hero-banner-content h1 {
        font-size: 2.2rem; /* Slightly smaller for very small screens */
        margin-bottom: 0.75rem;
    }
    #hero-banners-container .hero-banner-content p {
        font-size: 1rem; /* Slightly smaller for very small screens */
        margin-bottom: 2rem;
    }
    .hero-banner-content a {
        font-size: 0.9rem; /* Slightly smaller CTA text if needed */
        padding: 0.7rem 1.5rem; /* Adjust CTA padding */
    }
    .hero-nav-arrow { /* This rule was already present, just ensure it's here */
        padding: 0.75rem;
        font-size: 1.2rem;
    }
}


/* Styling for the Expertise section cards */
.expertise-card-icon {
    font-size: 4rem;
    color: #E60023;
    margin-bottom: 1.5rem;
}
.expertise-card {
    background-color: #f8faff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    text-decoration: none;
    color: inherit;
    /* CORRECTED: Changed from fixed height to minimum height */
    min-height: 320px;
    justify-content: space-between;
}
.expertise-card:hover {
    transform: translateY(-5px);
    cursor: pointer;
}
.expertise-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Adjustments for mobile to ensure cards don't look too tall */
@media (max-width: 768px) {
    .expertise-card {
        height: auto; /* Allow height to auto-adjust */
        min-height: 280px; /* Keep a minimum height */
        padding: 1.5rem;
    }
    .expertise-card-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    .expertise-card h3 {
        font-size: 1.75rem;
    }
    .expertise-card p {
        font-size: 0.9rem;
    }
}


/* Styling for the Key Achievements section icons */
.achievement-icon {
    font-size: 3rem;
    color: #E60023;
    margin-bottom: 1rem;
}

/* Testimonial card specific styling */
.testimonial-card {
    /* Background color now comes from dynamic class, not always white */
    padding: 2rem;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* shadow-md */
    border: 1px solid #e2e8f0; /* subtle border */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    height: 100%; /* Take full height of parent column */
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15); /* Stronger shadow on hover */
}

/* Testimonials Grid container for fade effect */
#testimonials-grid {
    /* Removed fixed min-height here as it can interfere with grid's natural height based on content */
    /* Relying on individual testimonial-card's height:100% and testimonial-grid-item's min-height for responsiveness */
    transition: opacity 0.5s ease-in-out; /* Add transition for fade effect */
}

/* Responsive adjustments for testimonial grid */
@media (max-width: 768px) {
    .testimonial-grid-item {
        min-height: 280px; /* Adjust height for mobile */
    }
}



::selection {
  background: #002e5d !important;
  color: #fff !important;
  text-shadow: none;
}

::-moz-selection {
  background: #002e5d !important;
  color: #fff !important;
  text-shadow: none;
}