/* ===================================
   CAMPUS PAGES - REDESIGNED STYLES
=================================== */

/* Facility Detail Card */
.facility-detail-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.facility-main-title {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-orange);
}

.facility-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.facility-photos-section {
    margin-top: 40px;
}

.photos-title {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 25px;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    aspect-ratio: 4/3;
}

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

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.modal-content-wrapper {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-image {
    display: none;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--white);
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-orange);
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    transition: all 0.3s ease;
    user-select: none;
}

.modal-prev:hover,
.modal-next:hover {
    background: var(--accent-orange);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
}

/* Event Detail Card */
.event-detail-card {
    background: var(--white);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--accent-orange);
    margin-bottom: 35px;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.event-main-title {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
}

.event-date {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
}

.event-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.event-gallery-section {
    margin-top: 35px;
}

.gallery-section-title {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.event-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.event-photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    aspect-ratio: 4/3;
}

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

.event-photo-item:hover img {
    transform: scale(1.1);
}

.photo-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-photo-item:hover .photo-hover-overlay {
    opacity: 1;
}

.photo-hover-overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* Gallery Album */
.gallery-album {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.album-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--accent-orange);
    flex-wrap: wrap;
    gap: 15px;
}

.album-header h3 {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
}

.photo-count {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-image-wrapper:hover .gallery-image {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image-wrapper:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    color: var(--white);
    font-size: 2.5rem;
}

/* Lightbox Modal for Gallery */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-slide {
    display: none;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--white);
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--accent-orange);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-orange);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 991px) {
    .photo-grid,
    .event-photo-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 767px) {
    .facility-detail-card {
        padding: 25px;
    }

    .facility-main-title {
        font-size: 1.5rem;
    }

    .event-detail-card {
        padding: 25px;
    }

    .event-main-title {
        font-size: 1.4rem;
    }

    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .photo-grid,
    .event-photo-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .modal-close,
    .lightbox-close {
        font-size: 35px;
        top: 10px;
        right: 20px;
    }

    .modal-prev,
    .modal-next,
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px 15px;
    }

    .modal-prev,
    .lightbox-prev {
        left: 10px;
    }

    .modal-next,
    .lightbox-next {
        right: 10px;
    }

    .gallery-album {
        padding: 20px;
    }

    .album-header h3 {
        font-size: 1.4rem;
    }
}

/* Campus Programs Common Styles */
.program-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
}

.program-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    padding: 40px;
    margin-bottom: 30px;
    border-left: 4px solid var(--program-color, #2563eb);
    transition: all 0.3s ease;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.program-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f7fafc;
}

.program-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--program-color, #2563eb) 0%, var(--program-color-dark, #1e40af) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.program-icon i {
    font-size: 32px;
    color: #fff;
}

.program-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
}

.program-content {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.8;
}

.program-content p {
    margin-bottom: 15px;
}

.program-content p:last-child {
    margin-bottom: 0;
}

.program-content h1, .program-content h2, .program-content h3, 
.program-content h4, .program-content h5, .program-content h6 {
    color: #2d3748;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 15px;
}

.program-content ul, .program-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.program-content li {
    margin-bottom: 8px;
}

.program-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.program-content strong {
    color: #2d3748;
    font-weight: 600;
}

.program-content a {
    color: var(--program-color, #2563eb);
    text-decoration: none;
    font-weight: 500;
}

.program-content a:hover {
    color: var(--program-color-dark, #1e40af);
    text-decoration: underline;
}

.program-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--program-color, #2563eb) 0%, var(--program-color-dark, #1e40af) 100%);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.section-intro {
    text-align: center;
    margin-bottom: 50px;
}

.section-intro h2 {
    font-size: 36px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.section-intro p {
    font-size: 18px;
    color: #718096;
    max-width: 700px;
    margin: 0 auto;
}

.empty-state {
    background: #fff;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #4a5568;
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-state p {
    color: #718096;
    font-size: 16px;
}

.read-more-toggle {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.read-more-btn {
    background: linear-gradient(135deg, var(--program-color, #2563eb) 0%, var(--program-color-dark, #1e40af) 100%);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-more-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(var(--program-shadow-rgb, 37, 99, 235), 0.4);
}

.read-more-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.read-more-btn.expanded i {
    transform: rotate(180deg);
}

/* Color Variants */
.program-ncc {
    --program-color: #dc2626;
    --program-color-dark: #991b1b;
    --program-shadow-rgb: 220, 38, 38;
}

.program-nss {
    --program-color: #2563eb;
    --program-color-dark: #1e40af;
    --program-shadow-rgb: 37, 99, 235;
}

/* Responsive Design */
@media (max-width: 768px) {
    .program-header {
        flex-direction: column;
        text-align: center;
    }
    
    .program-title {
        font-size: 20px;
    }
    
    .section-intro h2 {
        font-size: 28px;
    }
    
    .program-section {
        padding: 40px 0;
    }
    
    .program-card {
        padding: 25px;
    }
}