/* ===================================================================
   2. PAGE COMPONENTS (From working template)
   =================================================================== */

/* --- Intro Title Card --- */
.intro-title-card {
    background-color: rgba(36, 128, 32, 0.05);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    text-align: center;
    border-bottom: 3px solid var(--color-secondary);
}
.intro-title-card h2 {
    color: var(--color-dark);
    margin-top: 0;
    margin-bottom: var(--space-sm);
}
.intro-title-card p {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* ===================================================================
   2B. ANIMATED PROCESS STEPS (Replaces the image-based cards)
   =================================================================== */

/* Set up a counter for the steps */
.repairs-grid {
    counter-reset: step-counter; /* Initialize the counter */
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.repair-card {
    position: relative;
    z-index: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px; /* Slightly shorter since no image */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
    color: var(--color-light);
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: var(--space-lg);
    /* Create the number using the counter */
    counter-increment: step-counter;
}

/* The animated number */
.repair-card::before {
    content: counter(step-counter);
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15); /* Very faint number */
    line-height: 1;
    z-index: -1;
    transition: all 0.4s ease;
}

/* Hover effects for the entire card */
.repair-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.repair-card:hover::before {
    color: rgba(255, 255, 255, 0.2); /* Number becomes more visible on hover */
    transform: scale(1.1) rotate(5deg);
}

.repair-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center; /* Center content vertically */
}

.repair-card-content h3 {
    color: var(--color-light);
    margin-top: 0;
    border-bottom: var(--border-thick) var(--color-accent);
    padding-bottom: var(--space-md);
    font-size: 1.4rem;
}

.repair-card-content ul {
    flex-grow: 1;
    margin-top: var(--space-lg);
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}

.repair-card .check-item {
    color: var(--color-light);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Desktop layout */
@media (min-width: 992px) {
    .repairs-grid {
        grid-template-columns: 1fr 1fr 1fr; /* 3 columns for 6 items = 2 rows */
        gap: var(--space-lg);
    }
}

/* Optional: Add a different color for even items to create a subtle pattern */
.repair-card:nth-child(even) {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #2c6e2c 100%);
}

/* ===================================================================
   2C. STORM DAMAGE IMAGE GRID (2x2 layout for Lightbox)
   =================================================================== */
.storm-damage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
    gap: var(--space-md);
    margin-left: var(--space-xl);
}

.damage-image-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer; /* Indicate it's clickable for lightbox */
    position: relative;
}

.damage-image-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.damage-image-item::after {
    content: '🔍'; /* Magnifying glass icon */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.damage-image-item:hover::after {
    opacity: 1;
}

.damage-image-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.damage-image-item:hover img {
    transform: scale(1.05);
}

/* ===================================================================
   3. INSURANCE PAGE ADDITIONS
   - Styles for components unique to this page, merged into the template.
   =================================================================== */

/* --- Insurance Panels --- */
.insurance-panel {
    background: linear-gradient(to right, var(--color-light), #f0f9ff);
    border-left: 6px solid var(--color-accent);
    padding: var(--space-xl);
    border-radius: 0.75rem;
}
.insurance-panel--warning {
    border-left-color: #e53e3e;
    background: linear-gradient(to right, #fef2f2, #fef2f2);
}
.insurance-panel h3 {
    color: var(--color-dark);
    margin-top: 0;
}

/* --- Coverage Checklist --- */
.coverage-checklist .checklist-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}
.coverage-checklist .checklist-item svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    fill: var(--color-secondary);
    margin-right: var(--space-md);
    margin-top: 2px;
}
.coverage-checklist .checklist-item strong { color: var(--color-primary); }

/* --- Accordion --- */
.accordion-question {
    width: 100%;
    background-color: #2d7a2a;
    color: var(--color-light);
    border: none;
    border-radius: var(--border-radius);
    padding: var(--space-md) var(--space-lg);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.accordion-question.active {
    background-color: var(--color-dark);
}
.accordion-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 var(--space-lg);
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}
.accordion-answer p { padding: var(--space-lg) 0; }

/* ===================================================================
   4. FINAL CTA SECTION
   - These rules are from the working template for consistency.
   - The dark blue background will now work correctly.
   =================================================================== */
.final-cta-section .final-cta-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: rgba(26, 54, 93, 0.75);
}

/* ===================================================================
   5. DESKTOP & RESPONSIVE ENHANCEMENTS
   =================================================================== */
@media (max-width: 992px) {
    .roofing-content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .storm-damage-grid {
        margin-left: 0;
        margin-top: var(--space-lg);
        order: 2;
    }
}

@media (max-width: 767px) {
    .coverage-checklist .checklist-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .coverage-checklist .checklist-item svg {
        margin-right: 0;
        margin-bottom: var(--space-sm);
    }
    
    /* Mobile adjustments for the new repair cards */
    .repair-card {
        min-height: 240px; /* Slightly shorter on mobile */
        padding: var(--space-md);
    }
    
    .repair-card::before {
        font-size: 6rem; /* Smaller number on mobile */
        top: -15px;
        right: -15px;
    }
    
    .repair-card-content h3 {
        font-size: 1.2rem;
    }

    /* Mobile adjustments for storm damage grid */
    .storm-damage-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: var(--space-md);
    }
}


