/**
 * Bootstrap 5 modal — base structure.
 * The template's compiled CSS does not ship the modal component,
 * so the required layout rules are included here.
 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100001;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-dialog-scrollable {
    height: calc(100% - 1rem);
}

.modal-dialog-scrollable .modal-content {
    max-height: 100%;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-clip: padding-box;
    outline: 0;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
}

.modal-footer {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100000;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.6;
    transition: opacity 0.15s linear;
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
    .modal-dialog-scrollable {
        height: calc(100% - 3.5rem);
    }
    .modal-dialog-centered {
        min-height: calc(100% - 3.5rem);
    }
}

@media (min-width: 992px) {
    .modal-lg,
    .modal-xl {
        max-width: 800px;
    }
}

@media (min-width: 1200px) {
    .modal-xl {
        max-width: 1140px;
    }
}

/**
 * HARNOVA — branded modal (Bootstrap 5)
 * Dark theme matching the Growla demo-3 palette.
 */
.harnova-modal {
    --hm-bg: #111111;
    --hm-border: #1f1f1f;
}

.harnova-modal .modal-content {
    background-color: var(--hm-bg);
    border: 1px solid var(--hm-border);
    border-radius: 1.2rem;
    color: var(--color-white);
    overflow: hidden;
}

/* Header */
.harnova-modal .modal-header {
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    padding: 3rem 3.5rem 1.5rem;
    border-bottom: 1px solid var(--hm-border);
}

.harnova-modal .modal-sub-heading {
    color: var(--color-primary);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.harnova-modal .modal-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-white);
}

.harnova-modal .modal-close {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border-2);
    border-radius: 50%;
    background: transparent;
    color: var(--color-white);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.harnova-modal .modal-close:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-black);
    transform: rotate(90deg);
}

/* Body */
.harnova-modal .modal-body {
    padding: 2.5rem 3.5rem;
}

.harnova-modal .modal-intro {
    font-size: 1.7rem;
    line-height: 1.7;
    color: var(--color-paragraph);
    margin-bottom: 3rem;
}

.harnova-modal .modal-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hm-border);
}

/* Services grid */
.harnova-modal .modal-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.harnova-modal .modal-service {
    display: flex;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 2rem;
    background-color: #1a1a1a;
    border: 1px solid var(--hm-border);
    border-radius: 0.8rem;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.harnova-modal .modal-service:hover {
    border-color: var(--color-primary);
    transform: translateY(-3px);
}

.harnova-modal .modal-service-icon {
    flex-shrink: 0;
    width: 4.4rem;
    height: 4.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    background-color: rgba(204, 255, 0, 0.1);
    color: var(--color-primary);
    font-size: 1.8rem;
}

.harnova-modal .modal-service-text h6 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.8rem;
}

.harnova-modal .modal-service-text p {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--color-paragraph);
}

/* Benefits list */
.harnova-modal .modal-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.4rem;
}

.harnova-modal .modal-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 1.4rem;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-white);
}

.harnova-modal .modal-benefits li i {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Footer */
.harnova-modal .modal-footer {
    justify-content: flex-start;
    padding: 2rem 3.5rem 3rem;
    border-top: 1px solid var(--hm-border);
}

/* Map modal */
.harnova-modal .modal-map-address {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--color-paragraph);
    margin-top: 1.2rem;
}

.harnova-modal .modal-body--map {
    padding: 0;
}

.harnova-map-modal .map-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a;
}

.harnova-map-modal .map-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(0.25) contrast(1.05);
}

/* Responsive */
@media (max-width: 767px) {
    .harnova-map-modal .map-embed {
        aspect-ratio: 4 / 3;
    }
    .harnova-modal .modal-header {
        padding: 2.5rem 2rem 1.5rem;
    }
    .harnova-modal .modal-body {
        padding: 2rem;
    }
    .harnova-modal .modal-footer {
        padding: 1.5rem 2rem 2.5rem;
    }
    .harnova-modal .modal-title {
        font-size: 2.2rem;
    }
    .harnova-modal .modal-services-grid {
        grid-template-columns: 1fr;
    }
}
