/* global.css */

/* --- Reset & Base Styles --- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    
    /* FIX: Added 80px padding so content starts BELOW the fixed header */
    padding-top: 80px; 
}

/* --- Layout Utilities --- */
main {
    flex: 1; /* Pushes footer to bottom */
    width: 100%;
}

.container {
    max-width: 1400px; /* Standardized to match calculator width */
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

/* For text-heavy pages like Terms/Privacy */
.container-narrow {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    line-height: 1.6;
    background: transparent;
}

/* --- Typography --- */
h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #1e3a8a;
}

h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #1e3a8a;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.5rem;
    color: #334155;
}

p, li {
    color: #334155;
    margin-bottom: 1rem;
    line-height: 1.6;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Hero Section --- */
.hero { 
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 40px;
    min-height: 200px;
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
}

.hero h1 {
    color: white;
    font-size: 3rem; 
    margin: 0 0 16px 0;
}

.hero p {
    font-size: 1.25rem; 
    opacity: 0.9; 
    max-width: 800px;
    color: white;
}

/* --- Forms & Cards --- */
.card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.form-row { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1rem; 
}

label { 
    display: block; 
    font-weight: 700; 
    margin-bottom: 0.5rem; 
    color: #1e3a8a; 
    font-size: 0.9rem; 
    margin-top: 1rem; 
}

.required::after { 
    content: "*"; 
    color: #ef4444; 
    margin-left: 3px; 
}

input, textarea, select { 
    width: 100%; 
    padding: 0.8rem; 
    border: 2px solid #e2e8f0; 
    border-radius: 8px; 
    font-family: inherit; 
    font-size: 1rem;
    background-color: white;
}

input:focus, textarea:focus, select:focus { 
    outline: none; 
    border-color: #10b981; 
}

button.primary-btn { 
    background: #1e3a8a; 
    color: white; 
    width: 100%; 
    padding: 1rem; 
    border: none; 
    border-radius: 8px; 
    font-weight: 800; 
    cursor: pointer; 
    font-size: 1.1rem; 
    margin-top: 2rem; 
    transition: background 0.2s; 
}

button.primary-btn:hover { 
    background: #1e40af; 
}

button.secondary-btn {
    width: auto; 
    padding: 0.8rem 2rem; 
    margin-top: 1rem; 
    background: #f1f5f9; 
    color: #334155;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* --- Success/Thank You States --- */
.center-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.success-icon {
    font-size: 3rem; 
    margin-bottom: 1rem;
}

.link-back {
    display: inline-block; 
    margin-top: 1.5rem; 
    color: #16a34a; 
    text-decoration: none; 
    font-weight: bold;
}

/* --- Mobile Adjustments --- */
@media(max-width: 600px) { 
    .form-row { grid-template-columns: 1fr; } 
    .hero h1 { font-size: 2rem; } 
    .container { padding: 1.5rem; margin: 1rem; }
    .card { padding: 1.5rem; }
}
/* SEO & UX: Fix Anchor Link Offsets for Sticky Header */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Ensures links don't hide behind the 80px header */
}

/* Accessibility: Ensure focus states are visible for keyboard users */
:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* SEO: Ensure images never overflow */
img {
    max-width: 100%;
    height: auto;
}

/* --- Logo Grid (Clients/Partners) --- */
.logo-box { 
    margin-top: 40px; 
    text-align: center; 
    padding-top: 20px; 
    border-top: 1px solid #e2e8f0; 
}

.logo-header { 
    font-size: 0.85rem; 
    font-weight: 700; 
    color: #64748b; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 20px; 
}

.logo-grid { 
    display: flex; 
    justify-content: center; 
    gap: 30px; 
    flex-wrap: wrap; 
    align-items: center; 
    opacity: 0.8; 
}

.client-logo {
    width: 140px; 
    height: auto; 
    max-height: 70px; 
    object-fit: contain; 
    filter: grayscale(100%); 
    transition: all 0.3s ease;
    opacity: 0.7;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* --- Reusable Content Blocks (Tables, FAQs, Sections) --- */

/* Data Tables */
.data-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
    background: white; 
    border-radius: 8px; 
    overflow: hidden; 
    border: 1px solid #e2e8f0; 
}
.data-table th { 
    background: #f8fafc; 
    color: #1e3a8a; 
    font-weight: 700; 
    text-align: left; 
    padding: 15px; 
    border-bottom: 2px solid #e2e8f0; 
}
.data-table td { 
    padding: 12px 15px; 
    border-bottom: 1px solid #f1f5f9; 
    color: #334155; 
    font-size: 0.95rem; 
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: #fdfdfd; }

/* Content Sections */
.content-section { 
    padding: 60px 0; 
    border-top: 1px solid #e2e8f0; 
}
.content-section h2 { 
    text-align: center; 
    color: #1e3a8a; 
    font-size: 2rem; 
    margin-bottom: 40px; 
}
.content-wrapper { 
    max-width: 1400px; /* UPDATED: Match .container width */
    margin: 0 auto; 
    padding: 0 20px;
}
.content-block { margin-bottom: 40px; }
.content-block h3 { 
    color: #2563eb; 
    font-size: 1.4rem; 
    margin-bottom: 15px; 
    border-bottom: 1px solid #e2e8f0; 
    padding-bottom: 10px; 
}

/* FAQ Styling */
.faq-item { 
    background: white; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    margin-bottom: 15px; 
    padding: 20px; 
}
.faq-question { 
    font-weight: 700; 
    color: #1e3a8a; 
    font-size: 1.1rem; 
    margin-bottom: 10px; 
    display: block; 
}
.faq-answer { 
    color: #475569; 
    line-height: 1.6; 
    margin: 0; 
}

/* Timeline/Steps Grid */
.timeline-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
    margin: 40px 0; 
}
.time-box { 
    background: white; 
    padding: 20px; 
    border-radius: 12px; 
    border: 1px solid #e2e8f0; 
    text-align: center; 
}
.time-num { 
    display: block; 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: #1e3a8a; 
    margin-bottom: 5px; 
}
.time-label { 
    font-size: 0.8rem; 
    font-weight: 700; 
    color: #64748b; 
    text-transform: uppercase; 
}

/* Glossary Text Fix */
.glossary-text p, .glossary-text li, .glossary-text strong {
    color: white !important;
}

/* Mobile Adjustments for Tables/Grid */
@media(max-width: 900px) { 
    .timeline-grid { grid-template-columns: 1fr 1fr; }
    .data-table { display: block; overflow-x: auto; }
}

/* =========================================
   HOMEPAGE SPECIFIC STYLES (Added 12/31)
   ========================================= */

/* Layout Wrapper for Calculator + Sidebar */
.layout-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 350px; 
    gap: 40px; 
    align-items: start; 
    margin-bottom: 60px; 
}

/* Calculator Box Styles */
.calc-box { 
    background: white; 
    padding: 40px; 
    border-radius: 24px; 
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.1); 
    border: 1px solid #e2e8f0; 
}

.btn-calc { 
    width: 100%; 
    padding: 18px; 
    background: #15803d; /* --green */
    color: white; 
    border: none; 
    border-radius: 10px; 
    font-size: 18px; 
    font-weight: 800; 
    cursor: pointer; 
    margin-top: 10px; 
    transition: background 0.2s;
}
.btn-calc:hover { background: #166534; }

.result-box { 
    margin-top: 24px; 
    padding: 24px; 
    background: #f0fdf4; 
    border: 2px solid #15803d; 
    border-radius: 12px; 
    display: none; 
    text-align: center; 
}
.big-cost { 
    font-size: 48px; 
    font-weight: 800; 
    color: #0f172a; 
    display: block; 
    line-height: 1; 
    margin: 10px 0; 
}

/* Lead Capture (HubSpot) */
.lead-capture {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px dashed #cbd5e1;
    text-align: left;
}
.lead-capture h4 { margin: 0 0 10px 0; color: #1e3a8a; font-size: 1.1rem; }
.lead-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lead-submit-btn {
    width: 100%; padding: 12px; background: #3b82f6; color: white; border: none; 
    border-radius: 8px; font-weight: 700; cursor: pointer; margin-top: 10px;
}
.lead-submit-btn:hover { background: #2563eb; }

/* Sidebar Components */
.sidebar-box { 
    background: white; 
    padding: 25px; 
    border-radius: 12px; 
    border: 1px solid #e2e8f0; 
    margin-bottom: 20px; 
}
.stat-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 10px 0; 
    border-bottom: 1px solid #f1f5f9; 
    font-size: 0.9rem; 
}
.stat-row:last-child { border-bottom: none; }

.program-grid { display: grid; grid-template-columns: 1fr; gap: 15px; margin-top: 15px; } 
.prog-card { 
    background: #fff; 
    border: 1px solid #e2e8f0; 
    padding: 15px; 
    border-radius: 12px; 
    transition: transform 0.2s; 
}
.prog-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.prog-title { font-weight: 800; color: #1e3a8a; margin-bottom: 5px; font-size: 1rem; }
.prog-desc { font-size: 0.85rem; color: #64748b; margin-bottom: 8px; line-height: 1.4; }
.prog-link { display: inline-block; font-size: 0.85rem; font-weight: 700; color: #2563eb; text-decoration: none; }
.prog-link:hover { text-decoration: underline; }

/* Rankings Grid */
.rankings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 60px; }
.ranking-card { background: white; border-radius: 16px; border: 1px solid #e2e8f0; overflow: hidden; }
.ranking-header { padding: 20px; font-weight: 800; font-size: 1.2rem; text-align: center; color: white; }
.ranking-list { list-style: none; padding: 0; margin: 0; }
.ranking-item { display: flex; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid #f1f5f9; font-size: 0.95rem; color: #334155; }
.ranking-item:last-child { border-bottom: none; }
.ranking-item strong { color: #1e3a8a; }

/* State Directory Grid */
.all-states-section { margin-top: 60px; padding-top: 40px; border-top: 1px solid #e2e8f0; }
.states-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; margin-top: 30px; }
.state-mini-card { 
    background: white; 
    border: 1px solid #e2e8f0; 
    padding: 15px; 
    border-radius: 8px; 
    font-size: 0.9rem; 
    transition: all 0.2s; 
    cursor: pointer; 
}
.state-mini-card:hover { border-color: #3b82f6; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.st-name { font-weight: 700; color: #1e3a8a; display: block; margin-bottom: 4px; }
.st-cost { color: #15803d; font-weight: 600; }

/* Tax Section */
.tax-section { background: white; padding: 60px 0; border-top: 1px solid #e2e8f0; margin-top: 60px; }
.tax-content { width: 100%; max-width: 900px; margin: 0 auto; }
.tax-highlight { background: #fff7ed; border-left: 4px solid #f97316; padding: 25px; border-radius: 8px; margin: 30px 0; }

/* Educational Content */
.edu-content-section { padding: 60px 0; background: #f8fafc; border-top: 1px solid #e2e8f0; }
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.edu-card { background: white; padding: 30px; border-radius: 16px; border: 1px solid #e2e8f0; }
.edu-card h3 { color: #1e3a8a; margin-top: 0; font-size: 1.25rem; margin-bottom: 15px; }
.edu-card p { font-size: 0.95rem; color: #475569; line-height: 1.6; }

/* Responsive Adjustments */
@media(max-width: 1024px) { 
    .layout-wrapper { grid-template-columns: 1fr; } 
    .states-grid { grid-template-columns: repeat(3, 1fr); }
    .rankings-grid { grid-template-columns: 1fr; }
}
@media(max-width: 600px) {
    .states-grid { grid-template-columns: 1fr; }
    .lead-form-grid { grid-template-columns: 1fr; }
}