/**
 * Service Page V2 - Modern Clean Design
 * Matching Homepage V2 Style
 */

/* === GLOBAL FIXES === */
/* ULTRA COMPREHENSIVE FIX: White text on ANY dark brown background */

/* 
 * AGGRESSIVE WHITE TEXT RULES - Catches EVERYTHING with #832B00 or #5a1e00
 * This will override ANY inline color styles
 */

/* Rule 1: Direct element with dark BACKGROUND (not border!) */
[style*="background: #832B00"],
[style*="background:#832B00"],
[style*="background: #5a1e00"],
[style*="background:#5a1e00"],
[style*="background: linear-gradient"][style*="#832B00"],
[style*="background:linear-gradient"][style*="#832B00"],
[style*="background: linear-gradient"][style*="#5a1e00"],
[style*="background:linear-gradient"][style*="#5a1e00"] {
    color: white !important;
}

/* Rule 2: ALL children and descendants of dark BACKGROUNDS (most aggressive) */
[style*="background: #832B00"] *,
[style*="background:#832B00"] *,
[style*="background: #5a1e00"] *,
[style*="background:#5a1e00"] *,
[style*="background: linear-gradient"][style*="#832B00"] *,
[style*="background:linear-gradient"][style*="#832B00"] *,
[style*="background: linear-gradient"][style*="#5a1e00"] *,
[style*="background:linear-gradient"][style*="#5a1e00"] * {
    color: white !important;
}

/* Rule 3: Specific element types with dark BACKGROUND (triple coverage for safety) */
[style*="background: #832B00"] h1, [style*="background: #832B00"] h2, [style*="background: #832B00"] h3, 
[style*="background: #832B00"] h4, [style*="background: #832B00"] h5, [style*="background: #832B00"] h6,
[style*="background: #832B00"] p, [style*="background: #832B00"] span, [style*="background: #832B00"] div,
[style*="background: #832B00"] label, [style*="background: #832B00"] a, [style*="background: #832B00"] strong,
[style*="background: #832B00"] th, [style*="background: #832B00"] td, [style*="background: #832B00"] li,
[style*="background: #832B00"] em, [style*="background: #832B00"] i, [style*="background: #832B00"] b,
[style*="background: #5a1e00"] h1, [style*="background: #5a1e00"] h2, [style*="background: #5a1e00"] h3,
[style*="background: #5a1e00"] h4, [style*="background: #5a1e00"] h5, [style*="background: #5a1e00"] h6,
[style*="background: #5a1e00"] p, [style*="background: #5a1e00"] span, [style*="background: #5a1e00"] div,
[style*="background: #5a1e00"] label, [style*="background: #5a1e00"] a, [style*="background: #5a1e00"] strong,
[style*="background: #5a1e00"] th, [style*="background: #5a1e00"] td, [style*="background: #5a1e00"] li,
[style*="background: #5a1e00"] em, [style*="background: #5a1e00"] i, [style*="background: #5a1e00"] b {
    color: white !important;
}

/* Rule 4: SVG icons in dark backgrounds */
[style*="background: #832B00"] svg,
[style*="background: #5a1e00"] svg,
[style*="background:#832B00"] svg,
[style*="background:#5a1e00"] svg {
    color: white !important;
    fill: white !important;
}

/* Rule 5: Pseudo-elements */
[style*="background: #832B00"]::before,
[style*="background: #832B00"]::after,
[style*="background: #5a1e00"]::before,
[style*="background: #5a1e00"]::after {
    color: white !important;
}

/* Rule 6: Override any specific color styles within dark backgrounds */
[style*="background: #832B00"] [style*="color"],
[style*="background: #5a1e00"] [style*="color"] {
    color: white !important;
}

/* EXCEPTION: Form elements should ALWAYS have dark text on white background */
[style*="background: #832B00"] input,
[style*="background: #832B00"] select,
[style*="background: #832B00"] textarea,
[style*="background: #832B00"] option,
[style*="background: #5a1e00"] input,
[style*="background: #5a1e00"] select,
[style*="background: #5a1e00"] textarea,
[style*="background: #5a1e00"] option {
    color: #2D1810 !important;
    background: white !important;
}

/* 
 * DARK TEXT ON ALL LIGHT BACKGROUNDS 
 */
[style*="background: #F7E5DA"] *:not(input):not(select):not(textarea),
[style*="background:#F7E5DA"] *:not(input):not(select):not(textarea),
[style*="background: white"] *:not(input):not(select):not(textarea),
[style*="background:white"] *:not(input):not(select):not(textarea),
[style*="background: #FFFFFF"] *:not(input):not(select):not(textarea),
[style*="background:#FFFFFF"] *:not(input):not(select):not(textarea) {
    color: #2D1810 !important;
}

/* 
 * FORM INPUTS - ALWAYS DARK TEXT ON WHITE BACKGROUND 
 */
input,
select,
textarea,
option {
    color: #2D1810 !important;
    background: white !important;
}

/* Fix dropdown/select appearance and visibility */
select {
    color: #2D1810 !important;
    background-color: white !important;
    padding: 0.875rem !important;
    line-height: 1.5 !important;
    height: auto !important;
    min-height: 44px !important;
}

select option {
    color: #2D1810 !important;
    background: white !important;
    padding: 0.5rem !important;
    line-height: 1.5 !important;
}

/* Ensure selected option is visible */
select:focus,
select:active {
    color: #2D1810 !important;
    background: white !important;
}

/* Ensure proper text colors */
.service-about-v2 p,
.service-about-v2 h1,
.service-about-v2 h2,
.service-about-v2 h3,
.service-about-v2 h4 {
    color: #2D1810 !important;
}

/* === SERVICE HERO === */
.fslp-service-v2 {
    background: #FFFFFF;
}

.service-hero-v2 {
    background: linear-gradient(135deg, #F7E5DA 0%, #FFFFFF 100%);
    padding: 5rem 0;
    text-align: center;
}

.service-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.service-icon-badge {
    font-size: 4rem;
    display: block;
    margin-bottom: 1.5rem;
}

.service-title-v2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #2D1810;
    margin: 0 0 1.5rem 0;
    line-height: 1.1;
}

.service-subtitle-v2 {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    color: #6B5A4D;
    margin: 0 0 2.5rem 0;
    line-height: 1.6;
}

.service-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.service-trust-badges {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-icon {
    font-size: 1.25rem;
}

.badge-text {
    font-size: 0.9rem;
    color: #6B5A4D;
    font-weight: 500;
}

/* === OFFERS SECTION === */
.service-offers-v2 {
    padding: 5rem 0;
    background: #FFFFFF;
}

.offers-list-v2 {
    max-width: 1200px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.offer-row-v2 {
    background: #FDF8F4;
    border: 1px solid #F0E6DC;
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr 2fr auto;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;
}

.offer-row-v2:hover {
    box-shadow: 0 4px 16px rgba(131, 43, 0, 0.08);
    border-color: #832B00;
}

.offer-row-v2.featured {
    border: 2px solid #832B00;
    background: #FDF8F4;
}

.offer-row-v2.featured::before {
    content: "FEATURED";
    position: absolute;
    top: -10px;
    left: 1.5rem;
    background: #832B00;
    color: #FFFFFF;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.offer-col-provider {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.provider-icon-v2 {
    width: 48px;
    height: 48px;
    background: #832B00;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.provider-icon-v2 svg {
    width: 24px;
    height: 24px;
}

.provider-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.provider-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0;
}

.provider-rating {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.provider-rating .star {
    color: #F59E0B;
    font-size: 0.875rem;
}

.provider-rating .star.empty {
    color: #D1D5DB;
}

.provider-rating .rating-num {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6B7280;
    margin-left: 0.25rem;
}

.offer-col-rate {
    text-align: center;
    padding: 0.5rem;
}

.rate-label {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rate-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1F2937;
    line-height: 1.2;
}

.offer-col-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}

.feature-item svg {
    flex-shrink: 0;
    color: #10B981;
    width: 14px;
    height: 14px;
}

.offer-col-cta {
    display: flex;
    align-items: center;
}

.offer-btn-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #832B00;
    color: #FFFFFF;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.offer-btn-v2:hover {
    background: #5A1E00;
    color: #FFFFFF;
    transform: translateX(2px);
}

/* === ABOUT TEXT SECTION (White Background) === */
.service-about-v2 {
    padding: 4rem 0; /* Equal top and bottom padding */
    background: #FFFFFF;
}

.about-content-v2 {
    max-width: 900px;
    margin: 0 auto;
}

.about-content-v2 h2 {
    padding-top: 15px !important;
    font-size: 2rem;
    font-weight: 700;
    color: #2D1810;
    margin: 0 0 1.5rem 0;
}

.about-content-v2 h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2D1810;
    margin: 2rem 0 1rem 0;
}

.about-content-v2 p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2D1810;
    margin-bottom: 1.5rem; /* Fixed overlapping text issue */
}

.about-content-v2 ul,
.about-content-v2 ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.about-content-v2 li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2D1810;
    margin-bottom: 0.75rem;
}

/* === HOW IT WORKS (3 COLUMNS) === */
.service-how-it-works-v2 {
    padding: 5rem 0;
    background: #F7E5DA;
}

.steps-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.step-card-3col {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.step-card-3col:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(131, 43, 0, 0.15);
}

.step-number-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #832B00, #5A1E00);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 1.5rem auto;
}

.step-title-3col {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2D1810;
    margin: 0 0 1rem 0;
}

.step-desc-3col {
    font-size: 1.05rem;
    color: #6B5A4D;
    line-height: 1.6;
    margin: 0;
}

/* === FAQ SECTION (ACCORDION) === */
.service-faq-v2 {
    padding: 5rem 0;
    background: #FFFFFF;
}

.faq-accordion-v2 {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-accordion-item {
    background: #FFFFFF;
    border: 2px solid #F7E5DA;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-accordion-item.active {
    border-color: #832B00;
}

.faq-accordion-button {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.75rem 2rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.3s ease;
}

.faq-accordion-button:hover {
    background: #F7E5DA;
}

.faq-question-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2D1810;
    flex: 1;
}

.faq-icon {
    flex-shrink: 0;
    color: #832B00;
    transition: transform 0.3s ease;
}

.faq-accordion-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-accordion-item.active .faq-accordion-content {
    max-height: 500px;
}

.faq-accordion-content p {
    padding: 0 2rem 2rem 2rem;
    font-size: 1.05rem;
    color: #6B5A4D;
    line-height: 1.7;
    margin: 0;
}

/* === FINAL CTA === */
.service-final-cta-v2 {
    padding: 5rem 0;
    background: linear-gradient(135deg, #832B00 0%, #5A1E00 100%);
    text-align: center;
}

.final-cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.final-cta-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 1rem 0;
}

.final-cta-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 2.5rem 0;
}

.final-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.service-final-cta-v2 .btn-primary-v2 {
    background: #FFFFFF;
    color: #832B00;
}

.service-final-cta-v2 .btn-primary-v2:hover {
    background: #F7E5DA;
    color: #832B00;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .offer-row-v2 {
        grid-template-columns: 1.5fr 1fr 1.5fr auto;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .steps-grid-3col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .offer-row-v2 {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }
    
    .offer-col-provider {
        grid-column: 1 / -1;
    }
    
    .offer-col-rate {
        justify-self: start;
    }
    
    .offer-col-features {
        grid-column: 1 / -1;
    }
    
    .offer-col-cta {
        grid-column: 1 / -1;
    }
    
    .offer-btn-v2 {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .service-hero-v2 {
        padding: 4rem 0;
    }
    
    .service-cta-buttons {
        flex-direction: column;
    }
    
    .service-trust-badges {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .about-content-v2 {
        padding: 0 1rem;
    }
    
    .steps-grid-3col {
        grid-template-columns: 1fr;
    }
    
    .faq-accordion-button {
        padding: 1.25rem 1.5rem;
    }
    
    .faq-question-text {
        font-size: 1.1rem;
    }
    
    .faq-accordion-content p {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
    
    .final-cta-buttons {
        flex-direction: column;
    }
    
    .offer-row-v2 {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .offer-col-provider {
        grid-column: auto;
    }
    
    .offer-col-rate {
        text-align: left;
    }
    
    .offer-col-features {
        grid-column: auto;
    }
    
    .offer-col-cta {
        grid-column: auto;
    }
    
    .provider-name {
        font-size: 1rem;
    }
    
    .rate-value {
        font-size: 1.125rem;
    }
    
    /* ===== COMPREHENSIVE MOBILE RESPONSIVE FIXES ===== */
    /* Force all grids to single column */
    [style*="display: grid"],
    [style*="display:grid"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Investments - Retirement Calculator */
    .retirement-calc-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    /* Coaching - Timeline */
    .coaching-timeline-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .coaching-timeline-line {
        display: none !important;
    }
    
    /* Credit Services */
    .credit-process-grid {
        grid-template-columns: 1fr !important;
    }
    
    .credit-process-grid > div {
        padding-left: 0 !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Insurance Timeline - Hide on Mobile */
    .insurance-timeline {
        display: none !important;
    }
    
    /* Hide the entire section containing "When You Need Insurance Most" */
    section:has(.insurance-timeline) {
        display: none !important;
    }
    
    /* Text alignment */
    [style*="text-align: right"],
    [style*="text-align:right"] {
        text-align: left !important;
    }
    
    /* Section padding */
    section[style*="padding: 5rem 0"],
    section[style*="padding:5rem 0"] {
        padding: 3rem 0 !important;
    }
    
    /* Icon size reductions */
    [style*="width: 120px"][style*="height: 120px"],
    [style*="width:120px"][style*="height:120px"] {
        width: 80px !important;
        height: 80px !important;
        font-size: 1.8rem !important;
    }
    
    [style*="width: 80px"][style*="height: 80px"],
    [style*="width:80px"][style*="height:80px"] {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
    }
    
    [style*="width: 60px"][style*="height: 60px"],
    [style*="width:60px"][style*="height:60px"] {
        width: 50px !important;
        height: 50px !important;
    }
    
    /* Hide timeline connectors */
    [style*="position: absolute"][style*="height: 4px"],
    [style*="position:absolute"][style*="height:4px"] {
        display: none !important;
    }
    
    /* Font size adjustments - Mobile Headings */
    .section-title-v2,
    h1, h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    .section-subtitle-v2,
    h3 {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }
    
    h4 {
        font-size: 1rem !important;
    }
    
    h5 {
        font-size: 0.95rem !important;
    }
    
    /* Service hero heading */
    .service-hero-v2 h1 {
        font-size: 2rem !important;
    }
    
    /* Reduce all inline heading sizes */
    [style*="font-size: 3.5rem"],
    [style*="font-size:3.5rem"] {
        font-size: 2rem !important;
    }
    
    [style*="font-size: 3rem"],
    [style*="font-size:3rem"] {
        font-size: 1.8rem !important;
    }
    
    [style*="font-size: 2.5rem"],
    [style*="font-size:2.5rem"] {
        font-size: 1.5rem !important;
    }
    
    [style*="font-size: 2rem"],
    [style*="font-size:2rem"] {
        font-size: 1.3rem !important;
    }
    
    [style*="font-size: 1.8rem"],
    [style*="font-size:1.8rem"] {
        font-size: 1.2rem !important;
    }
    
    [style*="font-size: 1.6rem"],
    [style*="font-size:1.6rem"] {
        font-size: 1.1rem !important;
    }
    
    [style*="font-size: 1.5rem"],
    [style*="font-size:1.5rem"] {
        font-size: 1.05rem !important;
    }
    
    [style*="font-size: 1.4rem"],
    [style*="font-size:1.4rem"] {
        font-size: 1rem !important;
    }
    
    [style*="font-size: 1.3rem"],
    [style*="font-size:1.3rem"] {
        font-size: 0.95rem !important;
    }
    
    [style*="font-size: 1.2rem"],
    [style*="font-size:1.2rem"] {
        font-size: 0.9rem !important;
    }
    
    /* Hide arrows in before/after comparisons */
    [style*="font-size: 3rem"] {
        font-size: 2rem !important;
    }
    
    /* Max width containers */
    [style*="max-width: 1100px"],
    [style*="max-width: 1000px"],
    [style*="max-width: 900px"],
    [style*="max-width: 800px"],
    [style*="max-width: 700px"] {
        max-width: 100% !important;
        padding: 0 1rem !important;
    }
    
    /* Padding reductions */
    [style*="padding: 2.5rem"],
    [style*="padding:2.5rem"] {
        padding: 1.5rem !important;
    }
    
    [style*="padding: 3rem"],
    [style*="padding:3rem"] {
        padding: 2rem !important;
    }
    
    /* Gap reductions */
    [style*="gap: 3rem"],
    [style*="gap:3rem"] {
        gap: 1.5rem !important;
    }
    
    [style*="gap: 2.5rem"],
    [style*="gap:2.5rem"] {
        gap: 1.5rem !important;
    }
    
    /* Calculator-specific responsive styles */
    .retirement-calc-grid,
    .loan-calc-wrapper,
    .estate-calc-wrapper,
    .insurance-coverage-grid {
        grid-template-columns: 1fr !important;
    }
    
    .loan-calc-wrapper [style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Calculator inputs */
    .retirement-calc-grid input,
    .loan-calc-wrapper input,
    .estate-calc-wrapper input,
    .estate-calc-wrapper select {
        font-size: 1rem !important;
        padding: 0.875rem !important;
    }
    
    /* Calculator result displays */
    #monthly-payment-single,
    #ret-balance-display,
    #estate-tax-display {
        font-size: 2rem !important;
    }
    
    #ret-income-display {
        font-size: 1.5rem !important;
    }
}

/* === NUMBERED CIRCLES & BUTTONS FORCE WHITE TEXT === */
/* Force white text on ALL numbered circles with dark backgrounds */
div[style*="border-radius: 50%"][style*="#832B00"],
div[style*="border-radius: 50%"][style*="832B00"],
button[style*="#832B00"],
button[style*="832B00"] {
    color: white !important;
}

/* Force white on button text explicitly */
button[style*="background: #832B00"],
button[style*="background:#832B00"] {
    color: white !important;
}

/* === CALCULATOR & FORM INPUTS - FORCE VISIBLE TEXT === */
/* Ensure ALL input and select fields have dark text on white background */
input[type="number"],
input[type="text"],
input[type="email"],
select,
textarea {
    color: #2D1810 !important;
    background-color: white !important;
}

/* Ensure option elements are also visible */
select option {
    color: #2D1810 !important;
    background-color: white !important;
}

/* Placeholder text should be lighter but visible */
input::placeholder,
textarea::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

