/* Page Header */
.page-header {
    background: linear-gradient(rgba(0, 58, 112, 0.85), rgba(0, 58, 112, 0.85)), url('images/smiling-patient.jpg') center/cover no-repeat;
    padding: 40px 0;
    text-align: center;
    color: var(--light, #ffffff);
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
}

.page-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif;
    color: var(--light-gray, #dfefff);
    line-height: 1.6;
}

/* Gallery Tabs - Toggle Switch Style */
.gallery-tabs {
    display: flex;
    width: max-content;
    margin: 0 auto 25px auto;
    background-color: #e2e8f0;
    padding: 6px;
    border-radius: 50px;
    border: 2px solid #fff;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.04);
    gap: 5px;
}

.gallery-tabs .tab-btn {
    padding: 6px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    color: #64748B;
    border-radius: 50px;
    transition: all 0.3s ease;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border: 1px solid transparent;
}

.gallery-tabs .tab-btn:hover {
    color: var(--primary, #003a70);
    background-color: rgba(165, 165, 165, 0.238);
    border: 1px solid #fff;
}

.gallery-tabs .tab-btn.active {
    background-color: #ffffff;
    color: var(--primary, #003a70);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Compact News Section */
.compact-news-section {
    padding: 70px 0;
    background-color: #f8fafc;
}

.compact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: start;
}

.compact-card {
    background: var(--light, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.compact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.img-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: transparent;
}

.img-wrapper img {
    width: 100%;
    height: auto; /* Full natural size, no cropping */
    display: block;
    transition: transform 0.5s ease;
}

.compact-card:hover .img-wrapper img {
    transform: scale(1.05);
}

/* Image Hover Overlay (Simple Dark Fade with Icon) */
.image-hover-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.compact-card:hover .image-hover-overlay {
    opacity: 1;
}

.image-hover-overlay i {
    color: white;
    font-size: 2.5rem;
    transform: scale(0.5);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.compact-card:hover .image-hover-overlay i {
    transform: scale(1);
}

/* Card Text Section - Clean below the image */
.card-text-wrapper {
    padding: 20px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.card-date-badge {
    color: var(--primary, #003a70);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-date-badge i {
    color: var(--primary, #003a70);
}

.card-text-wrapper h4 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Poppins', sans-serif;
    line-height: 1.3;
}

.card-text-wrapper p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748B;
    line-height: 1.5;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 8px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {transform:scale(0.8); opacity: 0;}
    to {transform:scale(1); opacity: 1;}
}

.close-lightbox {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--primary-2, #35b6b4);
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .compact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .page-header {
        padding: 50px 0;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }

    .compact-grid {
        grid-template-columns: 1fr;
    }
}
