/* Custom styles for college website PHP version */

/* Slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .slider-container { height: 600px; }
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 1;
}

.slide.active { opacity: 1; }

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 1rem;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.5);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s;
}

.slide-btn:hover { background: rgba(255,255,255,0.8); }
.slide-btn.prev { left: 1rem; }
.slide-btn.next { right: 1rem; }

.slide-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.slide-dot {
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.slide-dot.active {
    width: 32px;
    background: white;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -2rem;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* Dropdown nav */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 16rem;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    z-index: 50;
    display: none;
}

.nav-item:hover .nav-dropdown { display: block; }

/* Flash messages */
.flash-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Admin sidebar */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: #1e3a5f;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    overflow-y: auto;
    transition: transform 0.3s;
}

.admin-sidebar.collapsed { transform: translateX(-260px); }

.admin-content {
    margin-left: 260px;
    min-height: 100vh;
    background: #f8fafc;
    transition: margin-left 0.3s;
}

@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-260px); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-left: 0; }
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.gallery-item:hover .gallery-item-overlay { background: rgba(0,0,0,0.4); }

/* Responsive table */
.table-responsive { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #1e40af;
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.data-table tr:hover td { background: #f0f4ff; }

/* Testimonials slider */
.testimonial-slide {
    display: none;
}
.testimonial-slide.active {
    display: block;
}
