/* Premium Frontend Stylesheet for InfoPixal Media Gallery */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

.ip-gallery-container {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 30px auto;
    max-width: 1200px;
    box-sizing: border-box;
}

.ip-gallery-container * {
    box-sizing: border-box;
}

/* ════════════════════════════════════════════════════════════════════════
   TAB NAVIGATION SYSTEM (Photos & Videos)
   ════════════════════════════════════════════════════════════════════════ */
.ip-gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    border-bottom: 2px solid rgba(12, 117, 154, 0.08);
    padding-bottom: 15px;
}

.ip-tab-btn {
    border: none;
    background: #f1f5f9;
    color: #475569;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
}

.ip-tab-btn span.dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ip-tab-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ip-tab-btn.active {
    background: linear-gradient(135deg, #0c759a 0%, #084f6a 100%);
    color: #ffffff;
    border-color: #0c759a;
    box-shadow: 0 4px 15px rgba(12, 117, 154, 0.25);
}

.ip-gallery-tab-content {
    display: none;
    animation: ipFadeIn 0.4s ease;
}

.ip-gallery-tab-content.active {
    display: block;
}

@keyframes ipFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════════════
   PHOTO ALBUMS GRID LAYOUT
   ════════════════════════════════════════════════════════════════════════ */
.ip-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.ip-album-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(12, 117, 154, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ip-album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(12, 117, 154, 0.12);
    border-color: #0c759a;
}

.ip-album-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8fafc;
}

.ip-album-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ip-album-card:hover .ip-album-cover {
    transform: scale(1.05);
}

.ip-album-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 117, 154, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.35s ease;
    color: #ffffff;
}

.ip-album-card:hover .ip-album-overlay {
    opacity: 1;
}

.ip-album-zoom-icon {
    font-size: 32px !important;
    width: 32px !important;
    height: 32px !important;
    color: #ffffff;
}

.ip-album-photo-count {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ip-album-info {
    padding: 20px;
}

.ip-album-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px !important;
}

.ip-album-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* ════════════════════════════════════════════════════════════════════════
   VIDEO 4-COLUMN GRID LAYOUT (Strict object-fit cover sizing)
   ════════════════════════════════════════════════════════════════════════ */
.ip-videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 992px) {
    .ip-videos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .ip-videos-grid { grid-template-columns: 1fr; }
}

.ip-video-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(12, 117, 154, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ip-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(12, 117, 154, 0.12);
    border-color: #0c759a;
}

.ip-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9; /* Strict dimension rule */
    background: #000;
    overflow: hidden;
}

.ip-video-poster {
    transition: transform 0.5s ease;
}

.ip-video-card:hover .ip-video-poster {
    transform: scale(1.05);
}

.ip-video-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 117, 154, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
}

.ip-video-card:hover .ip-video-play-overlay {
    opacity: 1;
    background: rgba(12, 117, 154, 0.5);
}

.ip-video-play-overlay svg {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ip-video-card:hover .ip-video-play-overlay svg {
    transform: scale(1.15);
}

.ip-video-info {
    padding: 15px;
}

.ip-video-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 !important;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════════
   PHOTO ALBUM GRID LIGHTBOX POPUP MODAL
   ════════════════════════════════════════════════════════════════════════ */
.ip-gallery-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.ip-gallery-lightbox-modal.active {
    display: flex;
}

.ip-gallery-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ip-gallery-lightbox-content {
    background: #ffffff;
    width: 100%;
    max-width: 900px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: ipModalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ipModalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ip-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.ip-lightbox-album-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 !important;
}

.ip-lightbox-close-btn {
    border: none;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.ip-lightbox-close-btn:hover {
    color: #ef4444;
}

.ip-lightbox-grid-wrapper {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.ip-lightbox-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.ip-lightbox-photo-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1; /* Strict proportional crop */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ip-lightbox-photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ip-lightbox-photo-thumbnail:hover img {
    transform: scale(1.08);
}

/* ════════════════════════════════════════════════════════════════════════
   FULLSCREEN SINGLE PHOTO VIEW SYSTEM
   ════════════════════════════════════════════════════════════════════════ */
.ip-gallery-fullscreen-preview {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.ip-gallery-fullscreen-preview.active {
    display: flex;
}

.ip-fs-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    animation: ipImageZoom 0.25s ease;
}

@keyframes ipImageZoom {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ip-fs-close {
    position: absolute;
    top: 25px;
    right: 25px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 40px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.ip-fs-close:hover {
    opacity: 1;
}

.ip-fs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(255,255,255,0.05);
    color: #ffffff;
    font-size: 32px;
    padding: 15px 25px;
    cursor: pointer;
    border-radius: 8px;
    opacity: 0.5;
    transition: all 0.25s;
}

.ip-fs-nav:hover {
    opacity: 1;
    background: rgba(255,255,255,0.15);
}

.ip-fs-prev { left: 30px; }
.ip-fs-next { right: 30px; }

.ip-fs-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 25px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.ip-gallery-empty-notice {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.ip-gallery-empty-notice span.dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.ip-gallery-empty-notice p {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}
