/* Permit Page Styles */

#permit {
    background: linear-gradient(180deg, #ECF5FF 0%, #FFF 100%), #D9D9D9;
    overflow: hidden;
    position: relative;
    padding-top: 144px;
}

#permit .bg-pattern {
    width: 100%;
    position: absolute;
    z-index: 1;
    top: -60px;
}

.permit-hero {
    position: relative;
    z-index: 2;
    padding-bottom: 20px;
    scroll-margin-top: 150px;
}

/* Permit Types Section */
.permit-types {
    padding: 25px 0;
    position: relative;
    z-index: 2;
}

.permit-types .section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
    font-weight: 700;
    color: #000;
}

.permit-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /*grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));*/
    gap: 15px;
    justify-items: stretch;
}

.permit-card {
    width: calc((100% - 15px) / 6);
    background: #fff;
    border-radius: 16px;
    padding: 62px 10px 41px 10px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2EFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 991px) {
    .permit-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .permit-card {
        width: 100%;
    }
}

.permit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.permit-card .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.permit-card .permit-name {
    font-size: 16.5px;
    color: #000;
    margin: 0;
    padding-top: 8px;
}

.permit-card .divider {
    margin: 0;
    height: 1px;
    background: #DEE2E6;
}

/* Application Steps Section */
.app-steps-section {
    padding-top: 24px;
    padding-bottom: 20px;
    background: white;
    position: relative;
    z-index: 2;
}

@media (min-width: 992px) {
    .app-steps-section {
        padding-top: 40px;
    }
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 24px;
    position: relative;
    align-items: stretch;
    /*display: flex;*/
    /*justify-content: space-between;*/
    /*align-items: stretch;*/
    /*position: relative;*/
    /*margin-top: 40px;*/
}

.step-card {
    border-radius: 12px;
    background-color: #F5F7F9;
    padding: 13px 10px 35px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.step-card .icon-wrapper {
    padding: 40px 10px;
    border-radius: 11px;
    background: #FFF;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-text {
    margin-top: 25px;
    font-size: 15px;
    font-weight: 510;
    color: #333;
    max-width: 140px;
}

/* --- Mobile Number Indicator (Hidden on Desktop) --- */
.step-number-mobile {
    display: none;
}

/* ==========================================================================
   DESKTOP TIMELINE (Horizontal)
   ========================================================================== */

@media (min-width: 992px) {
    .timeline-container {
        display: flex;
        justify-content: space-between;
        position: relative;
        margin: 25px 0 35px 0;
        padding: 0 10%; /* Aligns circles with the center of the grid cards */
    }

    .timeline-container::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 10%;
        right: 10%;
        height: 1px;
        border-top: 1px dashed #DEE2E6;
        z-index: 1;
        transform: translateY(-50%);
    }

    .timeline-step {
        width: 35px;
        height: 35px;
        background-color: #FF0000;
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 16px;
        position: relative;
        z-index: 2;
        box-shadow: 0 0 0 4px white; /* Cleans the line around the circle */
    }
}

/* ==========================================================================
   MOBILE TIMELINE (Vertical & Right-Aligned)
   ========================================================================== */

@media (max-width: 991px) {
    /* Hide the standalone desktop timeline row */
    .timeline-container {
        display: none;
    }

    .steps-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-right: 70px; /* Crucial: Creates space for the timeline on the right */
        padding-left: 55px;
        margin-top: 30px;
        position: relative;
    }

    /* The Vertical Dashed Line */
    .steps-container::after {
        content: '';
        position: absolute;
        right: 27px; /* Matches center of the 35px circles */
        top: 20px;
        bottom: 20px;
        width: 1px;
        border-right: 1px dashed #DEE2E6;
        z-index: 1;
    }

    /* Card Adjustment for Mobile List View */
    .step-card {
        /*flex-direction: row;*/
        text-align: left;
        padding: 15px;
        width: 100%;
        justify-content: flex-start;
    }

    .step-card .icon-wrapper {
        padding: 30px 10px;
        /*width: 75px;*/
        /*height: 75px;*/
        /*margin-right: 20px;*/
        width: 100%;
        flex-shrink: 0;
    }

    .step-card .icon-wrapper svg {
        width: 30px;
        height: auto;
    }

    .step-text {
        margin-top: 10px;
        max-width: 100%;
        font-size: 14px;
    }

    /* Right-aligned Number Circles */
    .step-number-mobile {
        display: flex;
        position: absolute;
        right: -60px; /* Pushes the circle out onto the dashed line */
        top: 50%;
        transform: translateY(-50%);
        width: 35px;
        height: 35px;
        background-color: #FF0000;
        color: white;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        z-index: 2;
        box-shadow: 0 0 0 6px white; /* White halo to break the dashed line */
    }
}

/* Description Section */
.permit-description {
    padding-top: 24px;
    padding-bottom: 20px;
}

@media (min-width: 992px) {
    .permit-description {
        padding-top: 40px;
    }
}

.description-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2EFFF;
}

.description-card h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.description-card .text {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

/* FAQ Section integration styles - matching insurance */
.permit-info {
    padding: 60px 0;
}
