/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@media (min-aspect-ratio: 16/9) {
    .video-container iframe {
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    .video-container iframe {
        width: 177.78vh;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-overlay h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-overlay .lead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* About Section */
#about img {
    max-height: 400px;
    object-fit: cover;
}

/* Campus Life Section */
.campus-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
    position: relative;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.campus-card:hover {
    transform: translateY(-10px);
}

.campus-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.campus-card:hover img {
    transform: scale(1.1);
}

.campus-content {
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
}

.campus-content h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.campus-content p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

#campusCarousel {
    padding-bottom: 50px;
}

#campusCarousel .carousel-control-prev,
#campusCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

#campusCarousel .carousel-control-prev {
    left: -50px;
}

#campusCarousel .carousel-control-next {
    right: -50px;
}

#campusCarousel .carousel-control-prev:hover,
#campusCarousel .carousel-control-next:hover {
    opacity: 1;
}

#campusCarousel .carousel-indicators {
    bottom: -40px;
}

#campusCarousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.5;
    margin: 0 5px;
}

#campusCarousel .carousel-indicators button.active {
    opacity: 1;
}

/* Facilities Section */
.facility-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.facility-card:hover {
    transform: translateY(-5px);
}

.facility-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.facility-content {
    padding: 1.5rem;
    text-align: center;
}

.facility-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.facility-content p {
    color: #666;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.facilities-section {
    margin-bottom: 60px;
}

/* Facilities Carousel Controls */
#facilitiesCarousel .carousel-control-prev,
#facilitiesCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: #007bff;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}

#facilitiesCarousel .carousel-control-prev:hover,
#facilitiesCarousel .carousel-control-next:hover {
    background-color: #0056b3;
}

#facilitiesCarousel .carousel-control-prev {
    left: -25px;
}

#facilitiesCarousel .carousel-control-next {
    right: -25px;
}

#facilitiesCarousel .carousel-indicators {
    position: absolute;
    bottom: -50px;
}

#facilitiesCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
}

#facilitiesCarousel .carousel-indicators button.active {
    background-color: #007bff;
}

#facilitiesCarousel .facility-card {
    margin-bottom: 30px;
}

#facilitiesCarousel .facility-card img,
#facilitiesCarousel .facility-card video {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .facility-card img {
        height: 200px;
    }
    
    .facility-content {
        padding: 1rem;
    }
}

/* Programs Section */
.program-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.program-card:hover {
    transform: translateY(-5px);
}

.program-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.program-card .btn {
    margin-top: 1rem;
}

/* Program Cards Styling */
.program-detail-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.program-detail-card:hover {
    transform: translateY(-5px);
}

.program-detail-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.program-overview {
    margin-bottom: 2rem;
}

.program-overview .lead {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.specialization-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.specialization-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: #444;
}

.specialization-list li:before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.affiliation-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.affiliation-info h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.affiliation-info p, .affiliation-info ul {
    margin-bottom: 0;
    color: #555;
}

.program-details {
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 2rem;
}

.program-details h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.program-details ul li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .program-detail-card {
        padding: 1.5rem;
    }
    
    .program-overview .lead {
        font-size: 1rem;
    }
}

/* Faculty Section */
#facultyCarousel {
    position: relative;
    padding: 0 50px;
}

#facultyCarousel .carousel-control-prev,
#facultyCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

#facultyCarousel .carousel-control-prev {
    left: 0;
}

#facultyCarousel .carousel-control-next {
    right: 0;
}

#facultyCarousel .carousel-control-prev:hover,
#facultyCarousel .carousel-control-next:hover {
    opacity: 1;
}

#facultyCarousel .carousel-indicators {
    bottom: -40px;
}

#facultyCarousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.5;
    margin: 0 5px;
}

#facultyCarousel .carousel-indicators button.active {
    opacity: 1;
}

.faculty-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

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

.faculty-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.faculty-card .text-muted {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.faculty-card .position {
    color: #666;
    font-weight: 500;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.qualification-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.faculty-group {
    margin-bottom: 2rem;
}

.faculty-section {
    background-color: #f8f9fa;
}

.faculty-category h3 {
    color: #007bff;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.faculty-category h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #007bff;
}

.faculty-category ul li {
    font-size: 1.1rem;
    color: #333;
    padding: 10px;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.faculty-category ul li:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .faculty-category .row {
        gap: 1rem;
    }
    
    .faculty-card {
        margin-bottom: 15px;
    }
}

/* Faculty Section Styles */
.admin-card {
    background: linear-gradient(to bottom right, #f8f9fa, #fff);
    border-left: 4px solid var(--primary-color);
}

#faculty h3 {
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
    margin-left: 1rem;
}

#faculty h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

.faculty-card p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .faculty-card {
        padding: 1.25rem;
    }
    
    .faculty-card h4 {
        font-size: 1rem;
    }
}

/* Dean's Message Section */
#dean-message {
    background-color: #f8f9fa;
    position: relative;
}

.dean-image {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 5px solid var(--primary-color);
}

.dean-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dean-image:hover img {
    transform: scale(1.05);
}

.dean-content {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
}

.dean-content h2 {
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.dean-content h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.dean-content .lead {
    color: #333;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.dean-signature {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
}

.dean-signature h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

/* Contact Section */
.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

.map-container {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.contact-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

/* Admission Form Styles */
.admission-card {
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
}

.admission-card .card-body {
    padding: 2rem;
}

.section-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-label {
    font-weight: 500;
    color: #444;
}

.form-control, .form-select {
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}

.btn-primary {
    padding: 0.75rem 2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-check-label {
    font-size: 0.9rem;
    color: #666;
}

/* Program Card Apply Button */
.program-card .apply-btn {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.program-card .apply-btn:hover {
    transform: translateY(-2px);
    background-color: #0056b3;
}

/* Image Loading Optimizations */
img {
    max-width: 100%;
    height: auto;
    transition: opacity 0.2s ease;
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

img[loading="lazy"] {
    opacity: 0;
    filter: blur(10px);
}

img.loaded {
    opacity: 1;
    filter: blur(0);
}

/* Optimize animations */
.carousel-item {
    will-change: transform;
    transform: translateZ(0);
}

/* Preload animation frames */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-item {
        height: 400px;
    }
    
    .facility-image,
    .campus-card img {
        height: 200px;
    }
    
    .faculty-image {
        width: 150px;
        height: 150px;
    }
    
    #facilitiesCarousel .carousel-item {
        height: 300px;
    }
    
    .program-card,
    .faculty-card {
        padding: 1.5rem;
    }
    
    .hero-overlay h1 {
        font-size: 2.5rem;
    }
    
    .hero-overlay .lead {
        font-size: 1.2rem;
    }
    
    .facility-card img {
        height: 200px;
    }
    
    .campus-life-card img {
        height: 250px;
    }
    
    #facultyCarousel {
        padding: 0 30px;
    }
    
    .facility-content h3 {
        font-size: 1.3rem;
    }

    .campus-content h4 {
        font-size: 1.2rem;
    }

    #campusCarousel .carousel-control-prev,
    #campusCarousel .carousel-control-next {
        display: none;
    }
}

/* Responsive Design for Dean's Section */
@media (max-width: 768px) {
    .dean-image {
        width: 200px;
        height: 200px;
        margin-bottom: 2rem;
    }

    .dean-content {
        padding: 1.5rem;
    }

    .dean-content h2 {
        font-size: 1.8rem;
    }
}

/* Fee Structure Table Styles */
.fee-table {
    border: 2px solid #dee2e6;
    margin-bottom: 2rem;
}

.fee-table thead th {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    text-align: center;
    vertical-align: middle;
    font-weight: 600;
    padding: 1rem;
}

.fee-table tbody td {
    border: 2px solid #dee2e6;
    padding: 0.75rem;
    vertical-align: middle;
}

.fee-table tbody td:first-child {
    background-color: #f8f9fa;
    font-weight: 500;
}

.program-section {
    padding: 2rem 0;
}

.program-section .section-title {
    color: #007bff;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 768px) {
    .fee-table {
        font-size: 0.9rem;
    }
    
    .fee-table tbody td {
        padding: 0.5rem;
    }
}

/* Footer */
footer {
    margin-top: 2rem;
}

footer a {
    text-decoration: none;
    transition: opacity 0.3s;
}

footer a:hover {
    opacity: 0.8;
}
