/**
 * ACF Modal Window - Frontend Styles
 * Modern, responsive modal design
 */

/* ============================================
   MODAL OVERLAY
   ============================================ */

.acf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.acf-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* ============================================
   MODAL CONTAINER
   ============================================ */

.acf-modal-container {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.acf-modal-overlay.active .acf-modal-container {
    transform: scale(1);
}

/* ============================================
   MODAL CLOSE BUTTON
   ============================================ */

 .acf-modal-close {
     position: absolute;
     top: 20px;
     right: 20px;
     background: rgba(0, 0, 0, 0.5);
     color: #ffffff;
     border: none;
     width: 25px;
     height: 25px;
     border-radius: 50%;
     cursor: pointer;
     font-size: 24px;
     line-height: 1;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.2s ease;
     z-index: 10;
     padding: 0;
 }

.acf-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.acf-modal-close:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* ============================================
   MODAL IMAGE
   ============================================ */

.acf-modal-image {
    width: 100%;
    height: auto;
    border-radius: 12px 12px 0 0;
    display: block;
    /* object-fit: cover; */
    padding: 5px;
    max-height: 300px;
}

/* ============================================
   MODAL CONTENT
   ============================================ */

.acf-modal-content {
    padding: 40px;
}

.acf-modal-image + .acf-modal-content {
    padding-top: 30px;
}

.acf-modal-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.acf-modal-text {
    margin: 0 0 30px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #4a4a4a;
}

.acf-modal-text p {
    margin: 0 0 15px 0;
}

.acf-modal-text p:last-child {
    margin-bottom: 0;
}

.acf-modal-text a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.acf-modal-text a:hover {
    color: #357abd;
    text-decoration: underline;
}

/* ============================================
   MODAL CTA BUTTON
   ============================================ */

.acf-modal-cta {
    display: inline-block;
    padding: 14px 32px;
    background: #4a90e2;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid #4a90e2;
    text-align: center;
}

.acf-modal-cta:hover {
    background: #357abd;
    border-color: #357abd;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.acf-modal-cta:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 4px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .acf-modal-overlay {
        padding: 10px;
    }

    .acf-modal-container {
        max-height: 95vh;
        border-radius: 8px;
    }

    .acf-modal-content {
        padding: 30px 20px;
    }

    .acf-modal-title {
        font-size: 24px;
    }

    .acf-modal-text {
        font-size: 15px;
    }

    .acf-modal-close {
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .acf-modal-image {
        max-height: 200px;
        border-radius: 8px 8px 0 0;
    }
}

@media (max-width: 480px) {
    .acf-modal-content {
        padding: 25px 15px;
    }

    .acf-modal-title {
        font-size: 22px;
    }

    .acf-modal-cta {
        display: block;
        width: 100%;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.acf-modal-overlay:focus-within {
    outline: none;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .acf-modal-overlay,
    .acf-modal-container,
    .acf-modal-close,
    .acf-modal-cta {
        transition: none;
    }

    .acf-modal-close:hover {
        transform: none;
    }

    .acf-modal-cta:hover {
        transform: none;
    }
}

/* Print styles - hide modal when printing */
@media print {
    .acf-modal-overlay {
        display: none !important;
    }
}
