/* Dynamic Theme Design - Uses CSS Variables */
:root {
    /* Default fallback colors, overridden by inline styles */
    --primary-color: #002B5B; 
    --secondary-color: #D4AF37;
    --text-color: #333333;
    --bg-light: #F9FAFB;
    --white: #FFFFFF;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text-color) !important;
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
}

/* Header Overrides */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative !important; /* Force header to be in document flow */
}

.topbar {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
}

.topbar a {
    color: var(--secondary-color);
}

.topbar .contact-info,
.topbar .contact-info li,
.topbar .contact-info ul {
    color: var(--secondary-color) !important;
    text-align: center;
}

.topbar .contact-info ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.topbar .contact-info li {
    float: none !important;
    display: inline-block;
}

.topbar .social {
    float: none !important;
    display: inline-block;
    text-align: center;
}

.topbar .social a {
    color: var(--secondary-color) !important;
}

.siteNavigation .menu > li > a {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.siteNavigation .menu > li > a:hover,
.siteNavigation .menu > li.current-menu-item > a {
    color: var(--secondary-color);
}

/* Hero Section Overrides */
.hero-slider .slide-inner {
    background-image: none !important; /* Remove photo bg */
    background: var(--primary-color); /* Tint of primary color (using the color itself as base) */
    position: relative;
    overflow: visible; /* Allow content to overflow if needed, or use padding */
    padding-bottom: 80px; /* Add space for the button */
    /* padding-top: 150px; - REMOVED: Header is now relative, so no need for extra padding */
}

.hero-slider .slide-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}

.hero-slider .slide-title h2 {
    color: var(--secondary-color);
    font-size: 3.5rem;
    text-shadow: none;
}

.hero-slider .slide-text p {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.theme-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px 30px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    filter: brightness(1.1);
    color: var(--white);
    transform: translateY(-2px);
}

/* Feature/Service Cards */
.feature-card, .service-card, .product-card {
    background: var(--bg-light);
    border: 1px solid #E5E7EB;
    border-top: 4px solid var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure card fills column */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push content apart if needed */
}

/* Force the row to be a flex container to equalize column heights */
.feature-section .row,
.service-section .row {
    display: flex;
    flex-wrap: wrap;
}

/* Force the column to be a flex container so its child (the link) can stretch */
.feature-section .row > [class*='col-'],
.service-section .row > [class*='col-'] {
    display: flex;
    flex-direction: column;
    float: none !important; /* Disable Bootstrap floats */
}

/* Ensure the link wrapping the card grows to fill the column */
.feature-section .row > [class*='col-'] > a,
.service-section .row > [class*='col-'] > a {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.feature-card:hover, .service-card:hover, .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.feature-icon, .service-icon {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    color: var(--primary-color) !important;
    font-weight: 700;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-title {
    color: var(--secondary-color) !important;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color) !important;
    color: #B0B8C1;
}

.site-footer .widget-title h3 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
    padding-bottom: 10px;
}

.site-footer a {
    color: #B0B8C1;
}

.site-footer a:hover {
    color: var(--secondary-color);
}

.lower-footer {
    background-color: #000000;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Typography Fixes */
p {
    line-height: 1.8;
}

/* Icon Replacement Helper */
.law-icons img {
    display: none; /* Hide original image */
}

.law-icons::after {
    content: '\f24e'; /* FontAwesome Scales */
    font-family: 'FontAwesome'; /* Fallback */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12rem;
    color: var(--secondary-color);
    opacity: 0.8;
    display: block;
    text-align: center;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* SVG Icon Recolor - Using CSS Mask for dynamic coloring */
/* SVG Icon Recolor - Using CSS Mask in HTML (Inline Styles) */
.feature-icon, .service-icon, .badge-icon, .icon-container {
    /* overflow: hidden; */
}

/* Service Card Specifics */
.service-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: var(--bg-light);
    padding: 30px;
}

.service-card h3 a {
    color: var(--primary-color);
    transition: color 0.3s;
}

.service-card:hover h3 a {
    color: var(--secondary-color);
}

/* --- Global Overrides for Inner Pages --- */

/* Page Titles */
.page-title {
    background: var(--primary-color) !important;
    position: relative;
    overflow: hidden;
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}

.page-title h2 {
    color: var(--white) !important;
}

.page-title p, .page-title ol li, .page-title ol li a {
    color: #E0E0E0 !important;
}

/* Section Titles */
.section-title-s2 h2, .section-title-s3 h2, .section-title-s4 h2, .widget-title h3 {
    color: var(--primary-color);
}

.section-title-s2 p, .section-title-s3 p, .section-title-s4 p {
    color: #666;
}

/* Fix for sections with primary background */
.new-feature-section .section-title-s3 h2 {
    color: var(--secondary-color) !important;
}

.contact-form-col .theme-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.contact-form-col .theme-btn:hover {
    filter: brightness(1.1);
    color: var(--white);
}

/* Form Controls */
.form-control {
    border: 1px solid #E5E7EB;
    border-radius: 4px;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2); /* This needs dynamic RGB, hardcoded for now or use opacity */
}

/* About Page & General Text */
.about-content h2, .service-single-content h2 {
    color: var(--primary-color);
}

/* Blockquotes */
.blockquote {
    border-left: 5px solid var(--secondary-color);
    background-color: #F9FAFB;
    color: #555;
    font-style: italic;
}

/* Scroll to Top */
.back-to-top {
    background-color: var(--secondary-color);
}

.back-to-top:hover {
    background-color: var(--primary-color);
}

/* Page Title Overrides */
.page-title {
    height: 200px !important;
    min-height: auto !important;
}

@media (max-width: 991px) {
    .page-title {
        height: 150px !important;
    }
}

.page-title .container {
    padding-top: 0 !important;
}

.page-title h2 {
    color: var(--secondary-color) !important;
    margin-bottom: 5px !important;
}

.page-title p, .page-title ol li, .page-title ol li a {
    color: var(--secondary-color) !important;
    opacity: 0.9;
}

/* Lawyer Forms Section Overrides */
.lawyerFormsSections {
    background-color: var(--primary-color) !important;
    color: var(--secondary-color) !important;
    padding: 80px 0;
}

.lawyerFormsSections h2, 
.lawyerFormsSections p {
    color: var(--secondary-color) !important;
}

.lawyerFormsSections .section-title-s4 h2 {
    color: var(--secondary-color) !important;
}

.history-section .grid-s1 .time-title:before,
.history-section .grid-s2 .time-title:before {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}

/* Products Section Background Override */
.products-section,
section.features-section,
section.customerbenefits-Section,
.about-service-section {
    background-color: var(--primary-color) !important;
    padding: 80px 0;
}

.products-section h2,
.products-section h3,
.products-section h4,
.products-section p,
.products-section .section-title,
.features-section h2,
.features-section .intro-text,
.customerbenefits-Section h2,
.customerbenefits-Section p,
.about-service-section h2,
.about-service-section h3,
.about-service-section p,
.intro-text {
    color: var(--secondary-color) !important;
}

.search-method,
.benefit-card,
.about-service-section .service-card {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--secondary-color) !important;
}

/* Product and feature cards on services pages should have light background */
.products-section .product-card,
.features-section .feature-card {
    background-color: var(--bg-light) !important;
    border-color: var(--secondary-color) !important;
}

/* Homepage feature cards should have light background */
.home-new-feature-section.features-section .feature-card,
.home-new-feature-section .feature-card,
.feature-section.home-new-feature-section .feature-card {
    background-color: var(--bg-light) !important;
}

.search-method-inner {
    background-color: var(--bg-light) !important;
}

.about-service-section .footer-text,
.features-section .footer-text,
.footer-text {
    color: var(--secondary-color) !important;
    opacity: 0.8 !important;
}

.about-service-section .footer-text strong,
.features-section .footer-text strong,
.footer-text strong {
    color: var(--secondary-color) !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}

.real-time-badge,
.ai-chip {
    background-color: var(--primary-color) !important;
}

.real-time-badge .badge-text,
.ai-chip .ai-chip-text,
.real-time-badge .badge-icon,
.ai-chip .ai-chip-icon {
    color: var(--secondary-color) !important;
}

/* CTA Section Override */
.cta-section,
.cta-bg {
    background-color: var(--primary-color) !important;
    background-image: none !important;
}

.cta-section h2,
.cta-section p,
.cta-bg h2,
.cta-bg p {
    color: var(--secondary-color) !important;
}

/* Social Area Icons */
.social-area ul li a {
    background-color: var(--primary-color) !important;
    color: var(--secondary-color) !important;
}

.social-area ul li a:hover {
    background-color: var(--secondary-color) !important;
    color: var(--primary-color) !important;
}

/* Service Detail Pages */
.service-single-section,
.service-single-content-area {
    background-color: var(--bg-light);
}

.service-single-section h2,
.service-single-section h3,
.service-single-section h4 {
    color: var(--primary-color) !important;
}

.service-single-section p,
.service-single-section li {
    color: var(--text-color) !important;
}

/* Service sections with primary background */
.service-single-section .about-service-section,
.service-single-section .features-section {
    background-color: var(--primary-color) !important;
}

.service-single-section .about-service-section h2,
.service-single-section .about-service-section h3,
.service-single-section .features-section h2,
.service-single-section .section-title-s3 h2,
.service-single-section .section-title-s4 h2,
.service-single-section section h2,
.about-service-section h2,
.features-section h2,
section.about-service-section h2,
section.features-section h2,
.about-service-section .section-title-s3 h2,
.features-section .section-title-s3 h2 {
    color: #D4AF37 !important;
    opacity: 1 !important;
    font-weight: 700 !important;
}

.service-single-section .about-service-section p,
.service-single-section .features-section p {
    color: var(--secondary-color) !important;
    opacity: 0.9;
}

/* Ensure good contrast for cards on light backgrounds */
.service-single-section .feature-card,
.service-single-section .service-card {
    background-color: var(--bg-light) !important;
    border-color: var(--secondary-color) !important;
}

.service-single-section .feature-card h3,
.service-single-section .service-card h3 {
    color: var(--primary-color) !important;
}

.service-single-section .feature-card p,
.service-single-section .service-card p {
    color: var(--text-color) !important;
}

/* Icon colors to match homepage */
.service-single-section .feature-icon,
.service-single-section .service-icon,
.about-service-section .feature-icon,
.about-service-section .service-icon,
.features-section .feature-icon,
.features-section .service-icon {
    color: #D4AF37 !important;
}

.service-single-section .feature-card .feature-icon div,
.service-single-section .service-card .service-icon div,
.about-service-section .feature-icon div,
.about-service-section .service-icon div,
.features-section .feature-icon div,
.features-section .service-icon div {
    background-color: var(--bg-light) !important;
    border: 2px solid var(--secondary-color) !important;
    border-radius: 12px;
}

/* Benefit card panel icons */
.benefit-card-panel .icon,
.benefit-card-panel .benefit-icon,
.benefit-card .icon,
.benefit-front .icon,
.benefit-back .icon,
.customerbenefits-Section .icon,
section.customerbenefits-Section .benefit-card .icon {
    color: var(--secondary-color) !important;
}

.benefit-card-panel .icon i,
.benefit-card .icon i,
.benefit-front i,
.benefit-back i,
.customerbenefits-Section i,
section.customerbenefits-Section .benefit-card i {
    color: var(--secondary-color) !important;
}

/* Also target any SVG icons */
.benefit-card svg,
.benefit-front svg,
.benefit-back svg {
    fill: var(--secondary-color) !important;
    color: var(--secondary-color) !important;
    stroke: var(--secondary-color) !important;
}

.products-section .product-title,
.products-section .feature-item,
.features-section .feature-title,
.search-title,
.benefit-front h3,
.about-service-section .service-card h3 {
    color: var(--secondary-color) !important;
}

.products-section .product-subtitle {
    color: #000000 !important;
}

.products-section .product-content,
.products-section .product-content p,
.products-section .product-content li,
.products-section .product-content * {
    color: #000000 !important;
}

.products-section .cta-button,
.features-section .theme-btn,
.about-service-section .theme-btn {
    background-color: var(--secondary-color) !important;
    color: var(--primary-color) !important;
}

/* CRITICAL OVERRIDE - Force gold color on all section headings */
section[class*="service"] h2,
section[class*="about"] h2,
section[class*="feature"] h2,
.about-service-section h2,
.features-section h2,
.service-section h2,
.section-title-s3 h2,
.section-title-s4 h2,
.section-header h2 {
    color: #D4AF37 !important;
}

