/* ============================================
   NGIS Premium Welcome Modal Stylesheet
   ============================================ */

/* CSS Custom Properties for Modal */
:root {
    --ngis-modal-backdrop: rgba(7, 27, 51, 0.7);
    --ngis-modal-bg: rgba(255, 255, 255, 0.95);
    --ngis-modal-gold: #D5AE63;
    --ngis-modal-navy: #071B33;
    --ngis-modal-royal: #123F70;
    --ngis-modal-text: #071B33;
    --ngis-modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ============================================
   Modal Container
   ============================================ */

.ngis-welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ngis-welcome-modal.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Modal Backdrop (Translucent)
   ============================================ */

.ngis-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7, 27, 51, 0.86), rgba(7, 27, 51, 0.68));
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(5px);
}

/* ============================================
   Modal Content
   ============================================ */

.ngis-modal-content {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(18, 63, 112, 0.98), rgba(7, 27, 51, 0.98));
    border-radius: 24px;
    padding: 3.5rem 3rem 2.75rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(213, 174, 99, 0.2);
    transform: scale(0.92) translateY(24px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(213, 174, 99, 0.42);
}

.ngis-welcome-modal.active .ngis-modal-content {
    transform: scale(1) translateY(0);
}

.ngis-modal-glow {
    position: absolute;
    width: 240px;
    height: 240px;
    top: -150px;
    right: -80px;
    border-radius: 50%;
    background: rgba(213, 174, 99, 0.2);
    filter: blur(12px);
    pointer-events: none;
}

.ngis-modal-content::after {
    content: '';
    position: absolute;
    width: 170px;
    height: 170px;
    left: -105px;
    bottom: -110px;
    border: 1px solid rgba(213, 174, 99, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

/* ============================================
   Modal Close Button
   ============================================ */

.ngis-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ngis-modal-close:hover {
    background: var(--ngis-modal-gold);
    border-color: var(--ngis-modal-gold);
    color: var(--ngis-modal-navy);
    transform: rotate(90deg);
}

.ngis-modal-close:focus {
    outline: 2px solid var(--ngis-modal-gold);
    outline-offset: 2px;
}

/* ============================================
   Modal Brand Details
   ============================================ */

.ngis-modal-brandline {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ngis-modal-brandmark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(213, 174, 99, 0.65);
    border-radius: 50%;
    color: var(--ngis-modal-gold);
    box-shadow: 0 0 22px rgba(213, 174, 99, 0.18);
}

.ngis-modal-kicker {
    color: var(--ngis-modal-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ngis-modal-rule {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 1px;
    margin: 0 auto 1.35rem;
    background: rgba(213, 174, 99, 0.45);
}

.ngis-modal-rule span {
    display: block;
    width: 7px;
    height: 7px;
    margin: -3px auto 0;
    background: var(--ngis-modal-gold);
    border-radius: 50%;
}

/* ============================================
   Modal Title
   ============================================ */

.ngis-modal-title {
    position: relative;
    z-index: 1;
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-family: 'Manrope', sans-serif;
}

/* ============================================
   Modal Message
   ============================================ */

.ngis-modal-message {
    position: relative;
    z-index: 1;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 1.1rem;
    line-height: 1.6;
    font-family: 'Manrope', sans-serif;
}

.ngis-modal-assurance {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    letter-spacing: 0.2px;
}

.ngis-modal-assurance i {
    margin-right: 0.35rem;
    color: var(--ngis-modal-gold);
}

/* ============================================
   Modal Button
   ============================================ */

.ngis-modal-button {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--ngis-modal-gold), #C49A4F);
    color: var(--ngis-modal-navy);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Manrope', sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ngis-modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
    background: linear-gradient(135deg, #E2C27E, var(--ngis-modal-gold));
}

.ngis-modal-button i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.ngis-modal-button:hover i {
    transform: translateX(4px);
}

.ngis-modal-button:focus {
    outline: 2px solid var(--ngis-modal-gold);
    outline-offset: 2px;
}

/* Full-image CMS mode */
.ngis-welcome-modal-image .ngis-modal-content {
    width: auto;
    max-width: min(900px, 94vw);
    padding: 0;
    background: #071B33;
    border-radius: 18px;
}

.ngis-modal-image-frame {
    position: relative;
    line-height: 0;
    max-height: 88vh;
}

.ngis-modal-full-image {
    display: block;
    width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 17px;
}

.ngis-welcome-modal-image .ngis-modal-close {
    z-index: 3;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(7, 27, 51, 0.78);
}

.ngis-modal-image-action {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    line-height: 1.2;
    text-decoration: none;
}

@media (max-width: 768px) {
    .ngis-modal-image-frame,
    .ngis-modal-full-image {
        max-height: 82vh;
    }

    .ngis-modal-image-action {
        right: 0.8rem;
        bottom: 0.8rem;
        padding: 0.75rem 1.1rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .ngis-modal-content {
        padding: 3rem 1.5rem 2rem;
        max-width: 90%;
    }

    .ngis-modal-title {
        font-size: 1.5rem;
    }

    .ngis-modal-message {
        font-size: 1rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .ngis-welcome-modal,
    .ngis-modal-content,
    .ngis-modal-close,
    .ngis-modal-button,
    .ngis-modal-button i {
        transition: none !important;
    }
}
