@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.installer-benefits {
    background-color: #E7F4FF;
    padding-top: 80px;
    padding-bottom: 80px;
    animation: fadeInUp 1.5s ease-out;
}

.installer-benefits .row {
    display: flex;
    align-items: stretch;
}

.installer-benefits .col-lg-6 {
    display: flex !important;
    flex-direction: column !important;
}

.certified-tag {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    margin-bottom: 16.5px;
}

.certified-tag img {
    width: 19px !important;
    height: 29px !important;
    flex-shrink: 0 !important;
    aspect-ratio: 19 / 29 !important;
    object-fit: contain !important;
}

.benefit-main-title {
    margin-bottom: 48px;
}

.benefit-main-title .text-blue {
    color: #024286;
}

.special-card {
    background: linear-gradient(112deg, #024286 2.7%, #001020 100.4%);
    padding: 32px;
    position: relative;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: var(--space-8);
    transition: all 0.3s ease;
    height: 356px;
}

.special-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.special-label {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    margin-bottom: 0;
}

.special-label svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.card-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.brand-name { margin: 0; }
.cert-name { margin: 0; }
.desc-text { margin: 0; }

.badge-overlay {
    position: absolute;
    right: 32px;
    top: 32px;
    width: 157px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.badge-overlay img {
    width: 100% !important;
    height: auto !important;
}

.stat-box {
    background: #FFFFFF;
    padding: 24px;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    transition: all 0.25s ease;
}

.stat-box:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.stat-val { margin: 0; }
.stat-label { margin: 0; }

.benefit-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

.list-item {
    background: #FFFFFF;
    padding: 32px;
    height: 225px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    transition: all 0.3s ease;
}

.list-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.icon-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.icon-wrap img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.text-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.text-wrap h3 { margin: 0; }
.text-wrap p { margin: 0; }

.btn-wrap-footer {
    text-align: center;
    margin-top: 48px;
}

.btn-submit-installer {
    background: #184382;
    padding: 12px 24px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    outline: none;
    box-shadow: none;
}

.btn-submit-installer:hover {
    background-color: #416995 !important;
}

/* ===== Modal ===== */
#installerModal .modal-dialog {
    max-width: 800px;
    margin: 1.75rem auto;
}

#installerModal .modal-content {
    border-radius: 12px !important;
    overflow: hidden;
    border: none;
    background-color: #FCFCFC;
    box-shadow: 0 0 4px 0 rgba(34, 34, 34, 0.08);
}

#installerModal .modal-header {
    border-bottom: none !important;
    padding: 24px !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#installerModal .modal-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background-color: #E9ECF0;
}

#installerModal .modal-title {
    margin: 0 !important;
    padding: 0 !important;
}

#installerModal .modal-body {
    padding: 24px !important;
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: stretch;
}

#installerModal .modal-top-image {
    display: none;
}

#installerModal .modal-left-image {
    width: 369.05px;
    height: 552px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 0 !important;
    display: block;
}

/* ===== Contact Info ===== */
#installerModal .installer-contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
    flex: 1 0 0;
    align-self: stretch;
}

#installerModal .contact-info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    align-self: stretch;
    width: 100%;
}

#installerModal .contact-icon-wrap {
    display: flex;
    width: 80px;
    min-width: 80px;
    min-height: 80px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

#installerModal .contact-text-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex: 1;
}

#installerModal .contact-label {
    color: #000;
    font-family: "IBM Plex Sans Thai", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    display: block;
}

#installerModal .contact-value {
    color: #000;
    font-family: "IBM Plex Sans Thai", sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    display: block;
}

#installerModal .contact-value-link {
    text-decoration: none;
    color: #000;
    transition: color 0.2s ease;
}

#installerModal .contact-value-link:hover {
    color: #184382;
    text-decoration: underline;
}

/* ===== Misc ===== */
.installer-benefits .special-card,
.installer-benefits .stat-box,
.installer-benefits .list-item,
.installer-benefits .icon-wrap,
.installer-benefits .btn-submit-installer {
    border-radius: 0 !important;
}

body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

body.modal-open .navbar {
    padding-right: 0 !important;
}

body.modal-open .container-fluid {
    padding-right: var(--bs-gutter-x, 0.75rem) !important;
}

.modal {
    padding-right: 0 !important;
}

#installerModal {
    padding-right: 0 !important;
    padding-left: 0 !important;
    overflow-x: hidden !important;
}

/* ===== Tablet ===== */
@media (min-width: 768px) and (max-width: 1024px) {
    .installer-benefits .col-lg-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .installer-benefits {
        padding: 60px 0 !important;
    }

    .benefit-main-title {
        margin-bottom: 24px !important;
    }

    .badge-overlay {
        width: 120px !important;
        right: 150px !important;
        top: 30% !important;
        transform: translateY(-50%) !important;
    }

    .special-card {
        height: 356px !important;
        padding: 32px !important;
        justify-content: center !important;
        align-items: flex-start !important;
        flex-shrink: 0 !important;
        align-self: stretch !important;
        width: 100% !important;
        margin: 0 0 24px 0 !important;
        box-sizing: border-box !important;
    }

    .stat-box {
        height: 140px !important;
        padding: 24px !important;
    }

    .benefit-stack {
        margin-top: 24px;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px !important;
    }

    .list-item {
        width: 100% !important;
        height: auto !important;
        min-height: 180px;
        padding: 24px !important;
    }

    #installerModal .modal-dialog {
        max-width: 600px !important;
        margin: 30px auto !important;
    }

    #installerModal .modal-content {
        width: 600px !important;
        height: auto !important;
        padding: 0 !important;
    }

    #installerModal .modal-body {
        flex-direction: column !important;
        padding: 24px !important;
        gap: 22px !important;
    }

    #installerModal .modal-top-image {
        display: block !important;
        width: 100% !important;
        height: 178px !important;
        object-fit: cover;
        flex-shrink: 0;
        align-self: stretch;
        border-radius: 0 !important;
    }

    #installerModal .modal-left-image {
        display: none !important;
    }

    #installerModal .installer-contact-info {
        flex-direction: row !important;
        justify-content: center;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }

    #installerModal .contact-info-item {
        flex-direction: column !important;
        align-items: center !important;
        flex: 1;
        gap: 8px;
    }

    #installerModal .contact-icon-wrap {
        width: 64px !important;
        min-width: 64px !important;
        height: 64px !important;
        min-height: 64px !important;
        aspect-ratio: 1 / 1;
    }

    #installerModal .contact-text-wrap {
        align-items: center;
        text-align: center;
    }

    #installerModal .contact-label {
        font-size: 18px !important;
        font-weight: 600 !important;
        line-height: 28px !important;
    }

    #installerModal .contact-value {
        font-size: 16px !important;
        font-weight: 400 !important;
        line-height: 24px !important;
    }

    #installerModal .contact-value-link {
        font-size: 16px !important;
        line-height: 24px !important;
        text-align: center;
    }
}

/* ===== Mobile ===== */
@media (max-width: 767px) {
    .installer-benefits {
        padding: 40px 0 !important;
    }

    .benefit-main-title {
        margin-bottom: 24px !important;
    }

    .special-card {
        height: auto !important;
        min-height: 200px !important;
        padding: 32px !important;
        margin-bottom: 24px !important;
    }

    .badge-overlay {
        display: none !important;
    }

    .stat-box {
        height: 120px !important;
        padding: 16px !important;
    }

    .benefit-stack {
        margin-top: 24px;
        gap: 16px !important;
    }

    .list-item {
        padding: 24px !important;
        height: auto !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .btn-wrap-footer {
        margin-top: 32px !important;
    }

    .btn-submit-installer {
        width: auto !important;
        min-width: unset !important;
        padding: 12px 24px !important;
    }

    #installerModal.show {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #installerModal .modal-dialog {
        max-width: 95% !important;
        width: 95% !important;
        margin: 0 auto !important;
        min-height: unset !important;
        display: block !important;
    }

    #installerModal .modal-content {
        flex-direction: column !important;
        height: auto !important;
        border-radius: 12px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    #installerModal .modal-header {
        padding: 16px 20px !important;
    }

    #installerModal .modal-header::after {
        left: 20px;
        right: 20px;
    }

    #installerModal .modal-title {
        font-size: 18px !important;
        line-height: 28px !important;
    }

    #installerModal .modal-body {
        flex-direction: column !important;
        padding: 0 0 24px 0 !important;
        gap: 20px !important;
        align-items: center;
    }

    #installerModal .modal-top-image {
        display: block !important;
        width: 100% !important;
        height: 178px !important;
        object-fit: cover;
        border-radius: 0 !important;
        margin: 0 !important;
        flex-shrink: 0;
        align-self: stretch;
        padding: 22px 24px 0 24px !important;
        box-sizing: border-box !important;
    }

    #installerModal .modal-left-image {
        display: none !important;
    }

    #installerModal .installer-contact-info {
        width: 100%;
        padding: 0 24px;
    }

    #installerModal .contact-icon-wrap {
        width: 80px !important;
        min-width: 80px !important;
        min-height: 80px !important;
    }

    #installerModal .contact-label {
        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 28px !important;
    }

    #installerModal .contact-value {
        font-size: 14px !important;
        font-weight: 400 !important;
        line-height: 20px !important;
    }

    #installerModal .contact-value-link {
        font-size: 14px !important;
        line-height: 20px !important;
    }
}