/* ============================================
    GALLERY PAGE STYLES
    Al-Madar Pharma - Events & Marketing Gallery
    ============================================ */

/* ============================================
    GALLERY SECTION
    ============================================ */
.gallery-section {
    padding: 80px 0;
    background: var(--off-white);
}

/* ============================================
    GALLERY FILTERS
    ============================================ */
.gallery-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 28px;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}

/* ============================================
    GALLERY GRID
    ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ============================================
    GALLERY ITEM
    ============================================ */
.gallery-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.gallery-item.hidden {
    display: none;
}

/* Gallery Image */
.gallery-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 113, 185, 0.9) 0%, rgba(0, 168, 150, 0.6) 50%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    transform: scale(0);
    transition: var(--transition);
}

.gallery-item:hover .gallery-icon {
    transform: scale(1);
}

/* Gallery Badge */
.gallery-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

[dir="ltr"] .gallery-badge {
    right: auto;
    left: 15px;
}

/* Gallery Content */
.gallery-content {
    padding: 25px;
}

.gallery-content h3 {
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
    transition: var(--transition);
}

.gallery-item:hover .gallery-content h3 {
    color: var(--primary);
}

.gallery-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.gallery-date,
.gallery-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray);
}

.gallery-date i,
.gallery-location i {
    color: var(--primary);
}

/* ============================================
    NO RESULTS
    ============================================ */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results p {
    font-size: 1.2rem;
}

/* ============================================
    NEWS SECTION
    ============================================ */
.news-section {
    padding: 80px 0;
    background: var(--white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* News Card */
.news-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

/* News Image */
.news-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

[dir="ltr"] .news-category {
    right: auto;
    left: 15px;
}

/* News Content */
.news-content {
    padding: 25px;
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.news-date i {
    color: var(--primary);
}

.news-content h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
    transition: var(--transition);
}

.news-card:hover .news-content h3 {
    color: var(--primary);
}

.news-content p {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 18px;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.news-link i {
    transition: var(--transition);
}

.news-link:hover {
    color: var(--secondary);
    gap: 12px;
}

[dir="ltr"] .news-link i {
    transform: rotate(180deg);
}

/* ============================================
    LIGHTBOX MODAL
    ============================================ */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lightbox Close */
.lightbox-close {
    position: fixed;
    top: 30px;
    left: 30px;
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--white);
    z-index: 10001;
}

[dir="ltr"] .lightbox-close {
    left: auto;
    right: 30px;
}

.lightbox-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

/* Lightbox Content */
.lightbox-content {
    text-align: center;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-image {
    max-width: 80vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

/* Lightbox Info */
.lightbox-info {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 35px;
    border-radius: var(--radius);
    margin-top: 20px;
    display: inline-block;
}

.lightbox-title {
    font-size: 1.3rem;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.lightbox-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.lightbox-date,
.lightbox-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray);
}

.lightbox-date i,
.lightbox-location i {
    color: var(--primary);
}

/* Lightbox Navigation */
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--white);
    font-size: 1.5rem;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    right: 30px;
}

.lightbox-next {
    left: 30px;
}

[dir="ltr"] .lightbox-prev {
    right: auto;
    left: 30px;
}

[dir="ltr"] .lightbox-next {
    left: auto;
    right: 30px;
}

/* Lightbox Counter */
.lightbox-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 25px;
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ============================================
    RESPONSIVE
    ============================================ */
@media (max-width: 991px) {
    .gallery-section,
    .news-section {
        padding: 60px 0;
    }

    .gallery-grid,
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }

    .gallery-filters {
        gap: 10px;
        margin-bottom: 40px;
    }

    .filter-btn {
        padding: 10px 22px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .gallery-image,
    .news-image {
        height: 220px;
    }

    .lightbox-close {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    [dir="ltr"] .lightbox-close {
        left: auto;
        right: 15px;
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        right: 15px;
    }

    .lightbox-next {
        left: 15px;
    }

    [dir="ltr"] .lightbox-prev {
        right: auto;
        left: 15px;
    }

    [dir="ltr"] .lightbox-next {
        left: auto;
        right: 15px;
    }

    .lightbox-image {
        max-width: 95vw;
        max-height: 60vh;
    }

    .lightbox-info {
        padding: 15px 25px;
        margin-top: 15px;
    }

    .lightbox-title {
        font-size: 1.1rem;
    }

    .lightbox-counter {
        bottom: 20px;
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .gallery-content,
    .news-content {
        padding: 20px;
    }

    .gallery-content h3,
    .news-content h3 {
        font-size: 1.05rem;
    }

    .gallery-meta {
        gap: 12px;
    }
}