/* Ensure contact page hero text is white */
.contact-hero-section,
.contact-hero-section *,
.contact-hero-section .container,
.contact-hero-section .lead,
.contact-hero-section h1,
.contact-hero-section h2,
.contact-hero-section h3,
.contact-hero-section h4,
.contact-hero-section h5,
.contact-hero-section h6,
.contact-hero-section p {
    color: #fff !important;
}
/* Ensure all footer text is white */
.site-footer,
.site-footer *,
.site-footer .footer-links a,
.site-footer .footer-contact a,
.site-footer .text-light-muted,
.site-footer .text-light,
.site-footer .text-white {
    color: #fff !important;
}
/* Make modal Get a Quote buttons dark navy blue */
.modal .btn-primary {
    background-color: #001f3f;
    border-color: #001f3f;
    border-radius: 0;
    color: #fff;
}
.modal .btn-primary:hover {
    background-color: #003366;
    border-color: #003366;
    color: #fff;
}
/* Force hero overlay text to white */
.hero-section .hero-content,
.hero-section .hero-content h1,
.hero-section .hero-content p,
.hero-section .hero-content .btn,
.hero-section .hero-content .btn-primary {
    color: #fff !important;
}
/* Default text color: dark blue, except where white is needed */
body, .text-dark, .container, .row, .col, .brand-text, .about-content, .about-intro, .about-detail, .footer-links a, .footer-contact a, .navbar .nav-link, .card-text, .card-title, .lead, .h5, .h2, .h1, .h3, .h4, .h6, .display-4, .display-5, .display-6 {
    color: #001f3f;
}

/* Preserve white text where needed */
.text-white,
.navbar .nav-link.active,
.site-footer.bg-dark,
.site-footer .text-white,
.site-footer .text-light,
.hero-section,
.hero-section .hero-content,
.hero-section .btn,
.hero-section .btn-primary,
.family-hero-banner,
.family-hero-content,
.contact-hero-section,
.contact-icon,
.contact-form-card .btn-primary,
.insurance-card .btn-primary {
    color: #fff !important;
}
/* Font settings for Rowley Insurance site */
body {
    font-family: Arial, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: serif;
    color: #001f3f;
}

/* Keep hero overlay headings white */
.hero-section .hero-content h1,
.hero-section .hero-content h2,
.hero-section .hero-content h3,
.hero-section .hero-content h4,
.hero-section .hero-content h5,
.hero-section .hero-content h6 {
    color: #fff !important;
}
/* Override Bootstrap bg-dark to use dark navy blue */
.bg-dark {
    background-color: #001f3f !important;
}

/* Create a faded navbar background to highlight the logo */
/* Custom CSS */
.bg-fade-right {
    background: linear-gradient(to right,
    rgba(255,255,255,0.4) 0%,
    rgba(0, 31, 63,0.8) 30%,
    rgba(0, 31, 63) 100%) !important;
}

/* Ensure navbar text remains white and logo visible on bg-fade-right */
.bg-fade-right .brand-text {
    color: #ffffff !important;
}
/* Site-specific styles */

/* Page transition effects */
body {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

body.page-transitioning {
    opacity: 0;
}

/* Navbar transitions */
.navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar .navbar-logo {
    width: 60px;
    height: 60px;
}

.navbar .nav-link {
    font-size: 1.08rem;
}

/* Logo colour transitions */
.navbar-logo .logo-primary {
    fill: #001f3f;
    transition: fill 0.3s ease;
}

.navbar-logo .logo-accent {
    fill: #0d6efd;
    transition: fill 0.3s ease;
}

/* Change logo and toggler colours when navbar is scrolled */
.navbar.navbar-scrolled .navbar-logo .logo-primary {
    fill: #ffffff;
}

.navbar.navbar-scrolled .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar.navbar-scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar.navbar-scrolled .navbar-logo .logo-accent {
    fill: #ffffff;
}

/* Brand text container and stacked text */
.brand-text-container {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.navbar .brand-text {
    transition: color 0.3s ease;
    font-weight: 600;
}

.navbar .brand-text-top {
    font-size: 1.5rem;
}

.navbar .brand-text-bottom {
    font-size: 1.16rem;
    font-weight: 400;
    opacity: 0.95;
}

/* Solid navbar background for scrolled state or non-hero pages */
.navbar.navbar-scrolled {
    background-color: #001f3f !important; /* Dark navy blue */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* Hero section with background image */
.hero-section {
    background-image: url('/static/images/homepage.jpg');
    background-size: cover;
    background-position: center 95%; /* Adjust this percentage to focus on the best part of the image */
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Move content to the left */
    color: white;
}
/* For larger desktop screens where we can afford to show more */
@media (min-width: 1400px) {
    .hero-section {
        background-position: center 95%; /* Keep same focal point on large screens */
    }
}

.hero-section .hero-content {
    max-width: 800px;
    padding: 3rem;
    /* background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */
}

.hero-section h1 {
    font-size: 4.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-section p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-section .btn {
    font-size: 1.2rem;
    padding: 0.75rem 2rem;
}

/* Dark navy blue square button for Get a Quote */
.hero-section .btn-primary {
    background-color: #001f3f;
    border-color: #001f3f;
    border-radius: 0;
}

/* Square dark navy blue Contact Us buttons in Why Choose Us section */
.container .btn-primary {
    background-color: #001f3f;
    border-color: #001f3f;
    border-radius: 0;
}

.container .btn-primary:hover {
    background-color: #003366;
    border-color: #003366;
}

/* Speak to an Advisor button at bottom: dark navy blue, white text */
.container .btn-outline-primary {
    background-color: #001f3f;
    border-color: #001f3f;
    color: #fff;
    border-radius: 0;
}
.container .btn-outline-primary:hover {
    background-color: #003366;
    border-color: #003366;
    color: #fff;
}


.hero-section .btn-primary:hover {
    background-color: #003366;
    border-color: #003366;
}

@media (min-width: 992px) and (max-width: 1366px) {
    .hero-section .hero-content {
        margin-top: 40px;
    }
}

hr {
    border-top: 2px solid #001f3f;
    margin: 3rem 300px;
}

/* Family hero banner section */
.family-hero-banner {
    width: 100%;
    height: 400px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('/static/images/family.jpg');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0 3rem 0;
}

.family-hero-content {
    padding: 2rem;
    text-align: center;
    color: white;
}

/* Responsive height adjustments */
@media (max-width: 768px) {
    .family-hero-banner {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .family-hero-banner {
        height: 250px;
    }
}

/* Anchor offset for smooth scrolling when navbar is absolute/fixed */
#why-choose-us {
    scroll-margin-top: calc(var(--navbar-offset, 70px) + 2px);
}

#about {
    scroll-margin-top: calc(var(--navbar-offset, 70px) + 2px);
}

/* About section content styling */
.about-content {
    background-color: rgba(0, 31, 63, 0.05);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.about-intro {
    font-size: 1.2rem;
    font-weight: 600;
    color: #001f3f;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-detail {
    font-size: 1.05rem;
    color: #001f3f;
    margin-bottom: 0;
    line-height: 1.8;
}

/* Team member cards */
.team-member-card {
    max-width: 350px;
    margin: 0 auto;
}

.team-member-card .card-img-top {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
}

@media (max-width: 576px) {
    body { padding-top: 70px; }

    /* Ensure navbar has solid background on mobile */
    .navbar {
        background-color: #001f3f !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    /* Keep navbar text readable on small screens */
    .navbar .brand-text,
    .navbar .nav-link {
        color: #ffffff !important;
    }

    .navbar .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.5);
    }

    .navbar .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .navbar .navbar-logo {
        width: 56px;
        height: 56px;
    }

    .navbar .brand-text-top {
        font-size: 1.3rem;
    }

    .navbar .brand-text-bottom {
        font-size: 1.02rem;
    }

    .navbar .nav-link {
        font-size: 1.02rem;
    }

    /* Adjust hero section to account for fixed navbar on mobile */
    .hero-section {
        min-height: calc(100vh - 70px);
        background-size: cover; /* Use cover on small screens for better mobile experience */
        background-position: center center;
    }

    /* Remove blur on mobile to show coastal view */
    .hero-section .hero-content {
        backdrop-filter: none;
        background-color: rgba(0, 0, 0, 0.4);
    }
}

/* Contact Page Styles */
.contact-hero-section {
    background: linear-gradient(135deg, #001f3f 0%, #003366 100%);
    padding: 100px 0 80px;
    color: white;
    position: relative;
    overflow: hidden;
}

.contact-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/images/homepage.jpg') center/cover;
    background-position: center 95%;
    opacity: 0.15;
    z-index: 0;
}

.contact-hero-section .container {
    position: relative;
    z-index: 1;
}

.contact-form-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.contact-form-card .form-control:focus {
    border-color: #001f3f;
    box-shadow: 0 0 0 0.25rem rgba(0, 31, 63, 0.15);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #001f3f 0%, #003366 100%);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.contact-item a {
    color: #001f3f;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #003366;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.contact-info-section .card {
    border-radius: 1rem;
}

.contact-info-section .alert {
    border-radius: 1rem;
}

/* Form button hover effect */
.contact-form-card .btn-primary {
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 0;
}

.contact-form-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 31, 63, 0.3);
}

/* Insurance Page Styles */
.insurance-heading {
    padding-top: 100px;
    padding-bottom: 80px;
}

.insurance-intro-box {
    max-width: 700px;
    margin: 0 auto;
    background-color: rgba(0, 31, 63, 0.05);
    padding: 2rem 2.5rem;
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.insurance-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.insurance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.insurance-card .card-img-top-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 31, 63, 0.05) 0%, rgba(0, 31, 63, 0.1) 100%);
}

.insurance-icon {
    transition: transform 0.3s ease;
}

.insurance-card:hover .insurance-icon {
    transform: scale(1.1);
}

/* Homepage navbar text and toggler color */
/* On transparent navbar (top of page), text and toggler are black */
@media (min-width: 577px) {
    .navbar:not(.navbar-scrolled) .brand-text,
    .navbar:not(.navbar-scrolled) .nav-link {
        color: #000000 !important;
    }

    .navbar:not(.navbar-scrolled) .navbar-toggler {
        border-color: rgba(0, 0, 0, 0.5);
    }

    .navbar:not(.navbar-scrolled) .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

/* On scrolled navbar, text is white */
.navbar.navbar-scrolled .brand-text,
.navbar.navbar-scrolled .nav-link {
    color: #ffffff !important;
}