/**
 * Eshaa Infrastructure Widget Styles
 */

/* Container */
.eshaa-infra-container {
    width: 100%;
    padding: 0;
}

/* Grid */
.eshaa-infra-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

/* Card */
.eshaa-infra-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.eshaa-infra-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
    transform: translateY(-6px);
}

/* Card Image Wrapper */
.eshaa-infra-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f0f0f0;
    border: 1px solid #00684d;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.eshaa-infra-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.eshaa-infra-card:hover .eshaa-infra-card-image {
    transform: scale(1.05);
}

/* Zoom Overlay */
.eshaa-infra-zoom-overlay,
.eshaa-infra-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.eshaa-infra-card:hover .eshaa-infra-zoom-overlay {
    background-color: rgba(0, 104, 77, 0.85);
}

.eshaa-infra-card:hover .eshaa-infra-video-overlay {
    background-color: rgba(0, 104, 77, 0.85);
}

/* Zoom / Play Icon Wrapper */
.eshaa-infra-zoom-icon,
.eshaa-infra-play-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(6px) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.eshaa-infra-zoom-icon .auxicon2,
.eshaa-infra-play-icon .auxicon2 {
    font-size: 24px;
    line-height: 1;
    color: #ffffff;
}

/* Zoom icon: green */
.eshaa-infra-zoom-icon {
    background-color: #f36b1f!important;
    box-shadow: 0 10px 20px rgba(0, 104, 77, 0.45);
}

/* Play icon: orange */
.eshaa-infra-play-icon {
    background-color: #f36b1f!important;
    box-shadow: 0 10px 20px rgba(243, 107, 31, 0.45);
}

.eshaa-infra-card:hover .eshaa-infra-zoom-icon,
.eshaa-infra-card:hover .eshaa-infra-play-icon {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Card Content */
.eshaa-infra-card-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f36b1f;
    border: solid 1px #00684d;
}

/* Title */
.eshaa-infra-card-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    background-color: #f36b1f;
    color: #fff;
    line-height: 1.4;
    padding: 0px;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-bottom: 15px;
}

.eshaa-infra-card:hover .eshaa-infra-card-title {
    background-color: #f36b1f;
    color: #222222;
}

/* Description */
.eshaa-infra-card-description {
    margin: 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    flex: 1;
}

/* ========================
   Lightbox / Modal Styles
   ======================== */

.eshaa-infra-modal,
.eshaa-infra-global-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eshaa-infra-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
    animation: fadeIn 0.3s ease;
}

.eshaa-infra-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    max-width: 1100px;
    width: 90vw;
    max-height: 90vh;
    overflow: auto;
    z-index: 2;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .eshaa-infra-modal-content {
        padding: 20px;
        max-width: 95vw;
    }
}

/* Close Button */
.eshaa-infra-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    background-color: #f36b1f;
}

.eshaa-infra-modal-close:hover {
    color: #f36b1f;
    background-color: #fff;
}

/* Modal Body */
.eshaa-infra-modal-body {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Lightbox Image */
.eshaa-infra-lightbox-image {
    max-width: 100%;
    max-height: 600px;
    height: auto;
    border-radius: 4px;
    display: block;
    margin-bottom: 15px;
}

/* Video Container */
.eshaa-infra-video-container {
    width: 100%;
    max-width: 960px;
}

.eshaa-infra-video-container iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
}

/* Lightbox Description */
.eshaa-infra-lightbox-description {
    width: 100%;
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

.eshaa-infra-lightbox-description p {
    margin: 0;
    color: #666666;
    font-size: 14px;
    line-height: 1.6;
}

/* Gallery Navigation */
.eshaa-infra-gallery-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.eshaa-infra-prev-btn,
.eshaa-infra-next-btn {
    background: #00684d;
    border: 1px solid #00684d;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0px;
}

.eshaa-infra-prev-btn:hover,
.eshaa-infra-next-btn:hover {
    background: #f36b1f;
    color: #ffffff;
    border-color: #f36b1f;
    transform: scale(1.1);
}

.eshaa-infra-gallery-counter {
    font-size: 14px;
    color: #00684d;
    white-space: nowrap;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================
   Responsive Design
   ======================== */

/* Tablet */
@media (max-width: 1024px) {
    .eshaa-infra-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .eshaa-infra-grid {
        grid-template-columns: 1fr;
    }

    .eshaa-infra-card-content {
        padding: 15px;
    }

    .eshaa-infra-card-title {
        font-size: 16px;
    }

    .eshaa-infra-card-description {
        font-size: 13px;
    }

        .eshaa-infra-video-container {
        max-width: 100%;
    }

/* Small Mobile */
@media (max-width: 480px) {
    .eshaa-infra-modal-content {
        padding: 15px;
    }

    .eshaa-infra-gallery-nav {
        gap: 10px;
        margin-top: 15px;
    }

    .eshaa-infra-prev-btn,
    .eshaa-infra-next-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .eshaa-infra-gallery-counter {
        font-size: 12px;
    }
}
