/* Business licenses and registrations */
.business-licenses-hero {
    background: linear-gradient(135deg, #4e1219 0%, #7a1f2b 62%, #9b3d31 100%);
}

.business-licenses-hero .page-hero-inner {
    max-width: 930px;
}

.business-licenses-hero h1 {
    max-width: 850px;
    font-size: clamp(2.25rem, 5vw, 4.1rem);
    overflow-wrap: anywhere;
}

.licenses-section {
    padding: clamp(70px, 9vw, 120px) 0;
    background: #fffaf3;
}

.licenses-heading {
    margin-bottom: clamp(38px, 5vw, 64px);
}

.licenses-heading h2 {
    margin-bottom: 12px;
}

.license-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.license-card {
    position: relative;
    height: clamp(280px, 28vw, 360px);
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(122, 31, 43, 0.13);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(36, 22, 17, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.license-preview {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0.22;
    pointer-events: none;
    transform: scale(1.12);
}

.license-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(
        110deg,
        rgba(255, 250, 243, 0.98) 10%,
        rgba(255, 250, 243, 0.86) 58%,
        rgba(122, 31, 43, 0.55) 100%
    );
    pointer-events: none;
}

.license-card-button {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 34px 30px 28px;
    color: var(--ink);
    background: transparent;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.license-card:hover,
.license-card:has(.license-card-button:focus-visible) {
    color: var(--ink);
    border-color: var(--saffron);
    box-shadow: 0 18px 38px rgba(36, 22, 17, 0.13);
    transform: translateY(-6px);
}

.license-card-button:focus-visible {
    outline: 3px solid var(--saffron);
    outline-offset: -5px;
}

.certificate-viewer {
    margin-top: 58px;
    padding: clamp(22px, 3vw, 34px);
    background: #fff;
    border: 1px solid rgba(122, 31, 43, 0.13);
    border-top: 4px solid var(--saffron);
    box-shadow: 0 12px 28px rgba(36, 22, 17, 0.07);
}

.certificate-viewer[hidden] {
    display: none;
}

.certificate-viewer-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.certificate-viewer-heading .eyebrow {
    margin-bottom: 8px;
}

.certificate-viewer-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.certificate-close {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: var(--maroon);
    background: var(--saffron-pale);
    border: 1px solid rgba(224, 147, 44, 0.45);
    border-radius: 50%;
    font-size: 1rem;
}

.certificate-close:hover {
    color: #fff;
    background: var(--maroon);
}

#certificate-frame {
    display: block;
    width: 100%;
    height: min(78vh, 900px);
    border: 1px solid rgba(36, 22, 17, 0.16);
    background: #f5eee4;
}

.license-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 28px;
    color: #fff;
    background: var(--maroon);
    border-radius: 50%;
    font-size: 1.25rem;
    box-shadow: 0 5px 14px rgba(78, 18, 25, 0.18);
}

.license-number {
    margin-bottom: 12px;
    color: var(--saffron);
    font-family: "Space Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.license-card h3 {
    max-width: 280px;
    margin-bottom: 24px;
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.license-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: auto;
    color: var(--maroon);
    font-size: 0.88rem;
    font-weight: 700;
}

.license-action i {
    color: var(--saffron);
    transition: transform 0.3s ease;
}

.license-card:hover .license-action i,
.license-card-button:focus-visible .license-action i {
    transform: translate(3px, -3px);
}


/* Tablet */
@media (max-width: 1050px) {
    .license-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Mobile */
@media (max-width: 700px) {
    .license-grid {
        grid-template-columns: 1fr;
        max-width: 620px;
        margin: 0 auto;
    }

    /*
     * Mobile browsers may render the PDF iframe with
     * their own PDF viewer UI, filename and Open button.
     * Hide the embedded PDF preview on mobile.
     */
    .license-preview {
        display: none;
    }

    /*
     * Use a clean certificate-style background instead
     * of the PDF preview on mobile.
     */
    .license-card {
        height: 280px;
        background:
            radial-gradient(
                circle at 88% 18%,
                rgba(122, 31, 43, 0.14),
                transparent 38%
            ),
            linear-gradient(
                135deg,
                #fffaf3 0%,
                #f8eee2 100%
            );
    }

    .license-card-button {
        height: 100%;
        min-height: 0;
    }

    .business-licenses-hero .page-hero-inner {
        padding-right: 18px;
        padding-left: 18px;
    }

    .certificate-viewer-heading {
        gap: 14px;
    }
}


/* Small mobile */
@media (max-width: 520px) {
    .business-licenses-hero h1 {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .license-card {
        height: 250px;
    }

    .license-card-button {
        height: 100%;
        min-height: 0;
        padding: 28px 24px 24px;
    }

    .license-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 20px;
    }

    .license-card h3 {
        max-width: 235px;
        margin-bottom: 18px;
        font-size: 1.12rem;
    }

    .certificate-viewer {
        margin-top: 42px;
        padding: 18px;
    }

    .certificate-viewer-heading h2 {
        max-width: 230px;
        font-size: 1.25rem;
        overflow-wrap: anywhere;
    }

    #certificate-frame {
        height: 70vh;
    }
}


/* Very small mobile */
@media (max-width: 360px) {
    .license-card-button {
        padding-right: 18px;
        padding-left: 18px;
    }

    .license-action {
        font-size: 0.8rem;
    }

    #certificate-frame {
        height: 62vh;
    }
}