/* =========================================
   UNIVERSITY OF LAYYAH - MASTER STYLE SHEET
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f5ead7;
    color: #333;
}

/* Navbar */
.navbar {
    background: #1f7a34;
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: white;
    padding: 5px;
    border-radius: 8px;
}

.logo-text h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.logo-text p {
    font-size: 14px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.nav-links li a:hover {
    color: #ffd27f;
}

/* --- Hamburger Icon (Hidden on Desktop) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: 0.3s;
}

/* Slider */
.slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.slide {
    display: none;
    position: relative;
}

.slide.active {
    display: block;
    animation: fade 1s ease-in-out;
}

.slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.caption {
    position: absolute;
    top: 40%;
    left: 10%;
    color: white;
    background: rgba(0,0,0,0.4);
    padding: 20px;
    border-radius: 10px;
}

.prev, .next {
    position: absolute;
    top: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 22px;
    border-radius: 50%;
    transform: translateY(-50%);
}

.prev { left: 20px; }
.next { right: 20px; }

/* Vision Mission */
.vision-mission {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 60px;
}

.box {
    background: white;
    border-left: 6px solid #1f7a34;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    line-height: 1.8;
}

.full-width { grid-column: span 2; }

/* Labs */
.labs-section {
    padding: 60px;
    text-align: center;
}

.labs-section h2 {
    margin-bottom: 40px;
    color: #1f7a34;
}

.lab-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lab-card {
    background: white;
    width: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: 0.4s;
}

.lab-card:hover { transform: translateY(-10px); }

.lab-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.lab-card h3 {
    padding: 15px;
    color: #1f7a34;
}

/* Footer */
footer {
    background: #1f7a34;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* Animation */
@keyframes fade { from {opacity: 0.5;} to {opacity: 1;} }

/* Page Banner */
.page-banner {
    background: #1f7a34;
    color: white;
    text-align: center;
    padding: 40px;
    margin: 40px;
    border-radius: 15px;
}

.page-banner h1 { font-size: 40px; }

/* PLO Section */
.plo-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 60px;
}

.plo-card {
    background: white;
    padding: 25px;
    border-left: 6px solid #1f7a34;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: 0.4s;
    line-height: 1.8;
}

.plo-card:hover { transform: translateY(-8px); }
.plo-card h2 { color: #1f7a34; margin-bottom: 15px; }

/* PEO Section */
.peo-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 60px;
}

.peo-card {
    background: white;
    padding: 25px;
    border-left: 6px solid #1f7a34;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: 0.4s;
    line-height: 1.8;
}

.peo-card:hover { transform: translateY(-8px); }
.peo-card h2 { color: #1f7a34; margin-bottom: 15px; }

/* Faculty Section */
.faculty-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 60px;
}

.faculty-card {
    background: white;
    width: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    transition: 0.4s;
    padding-bottom: 20px;
}

.faculty-card:hover { transform: translateY(-10px); }

.faculty-card img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    background: #f5f5f5;
    padding: 10px;
}

.faculty-card h3 { color: #1f7a34; margin: 15px 0 10px; }
.faculty-card p { margin: 5px 0; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    background: white;
    width: 70%;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    float: right;
    font-size: 30px;
    cursor: pointer;
    color: red;
}

/* Labs Page */
.labs-page-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 60px;
}

.lab-page-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    transition: 0.4s;
}

.lab-page-card:hover { transform: translateY(-10px); }

.lab-page-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.lab-page-card h3 { color: #1f7a34; margin: 15px 0; }
.lab-page-card p { padding: 0 20px 20px; }

/* Mapping Tables */
.mapping-section { padding: 5px; }

.mapping-section h2 {
    text-align: center;
    color: #1f7a34;
    margin-bottom: 25px;
    font-size: 32px;
}

.table-wrapper { overflow-x: auto; }

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mapping-table th,
.mapping-table td {
    border: 1px solid #ccc;
    padding: 15px;
    text-align: center;
}

.mapping-table th { background: #1f7a34; color: white; }
.mapping-table tr:nth-child(even) { background: #f9f9f9; }

/* Curriculum */
.curriculum-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 60px;
}

.semester-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.semester-card h2 {
    color: #1f7a34;
    margin-bottom: 20px;
    text-align: center;
}

/* Dean Section */
.dean-section {
    display: flex;
    justify-content: center;
    padding: 50px 60px 20px;
}

.dean-card {
    width: 70%;
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 25px;
    cursor: pointer;
    transition: 0.4s;
}

.dean-card:hover { transform: translateY(-5px); }

.dean-card img {
    width: 180px;
    height: 220px;
    object-fit: cover;
    border-radius: 15px;
}

.dean-info h2 { color: #1f7a34; margin-bottom: 10px; }
.dean-info p { margin-bottom: 8px; font-size: 18px; }

.dean-info button {
    margin-top: 15px;
    padding: 10px 18px;
    border: none;
    background: #1f7a34;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

/* Better Modal */
.beautiful-modal {
    width: 75%;
    border-radius: 20px;
    padding: 35px;
    line-height: 1.8;
}

.beautiful-modal h2 { color: #1f7a34; margin-bottom: 15px; }
.beautiful-modal p { margin-bottom: 12px; }
.beautiful-modal ul { margin-left: 25px; margin-bottom: 15px; }
.beautiful-modal li { margin-bottom: 8px; }

/* Unique Mission */
.mission-hub {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    padding: 40px 60px;
    align-items: center;
}

.mission-left {
    background: white;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    animation: missionGlow 4s ease-in-out infinite;
}

.mission-tag {
    color: #1f7a34;
    font-weight: bold;
    letter-spacing: 1px;
}

.mission-left h2 {
    font-size: 40px;
    margin: 15px 0;
    color: #222;
}

.mission-left p {
    font-size: 19px;
    line-height: 1.9;
    color: #555;
}

.mission-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mini-mission {
    background: linear-gradient(135deg, #1f7a34, #2ea84a);
    color: white;
    padding: 25px;
    border-radius: 16px;
    transition: 0.4s;
}

.mini-mission:nth-child(1) { animation: pulseCard 3s ease-in-out infinite; }
.mini-mission:nth-child(2) { animation: pulseCard 3s ease-in-out infinite 1s; }
.mini-mission:nth-child(3) { animation: pulseCard 3s ease-in-out infinite 2s; }

.mini-mission:hover { transform: translateX(8px) scale(1.02); }

@keyframes missionGlow {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
    50% { transform: scale(1.015); box-shadow: 0 0 35px rgba(31,122,52,0.25); }
}

@keyframes pulseCard {
    0%, 100% { transform: translateX(0); box-shadow: 0 0 0 rgba(255,255,255,0); }
    50% { transform: translateX(6px); box-shadow: 0 0 20px rgba(255,255,255,0.35); }
}

/* Life Hover Cards */
.life-hover-section {
    padding: 20px 60px;
    text-align: center;
}

.life-hover-section h2 { font-size: 42px; color: #1f7a34; }
.life-hover-section p { margin-bottom: 40px; font-size: 18px; }

.life-hover-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.life-hover-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    height: 320px;
}

.life-hover-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.life-hover-card:hover img { transform: scale(1.1); }

.hover-content {
    position: absolute;
    inset: 0;
    background: rgba(31,122,52,0.85);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 20px;
    transform: translateY(100%);
    transition: 0.4s;
}

.life-hover-card:hover .hover-content { transform: translateY(0); }

.top-profile-section { padding: 40px 60px; }
.section-title { text-align: center; color: #1f7a34; margin-bottom: 20px; font-size: 32px; }

.featured-profile {
    width: 70%;
    margin: auto;
    background: white;
    padding: 25px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.featured-profile img {
    width: 180px;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
}

.profile-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 22px;
    background: linear-gradient(135deg, #1f7a34, #2ea84a);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.profile-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(31,122,52,0.3);
}

/* Premium Faculty Profile */
.profile-container { width: 92%; margin: 20px auto; }

.faculty-hero {
    background: linear-gradient(135deg, #0d2346, #1b3d75);
    color: white;
    border-radius: 22px;
    padding: 35px;
    display: flex;
    align-items: center;
    gap: 35px;
}

.faculty-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #d4a73d;
    color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 52px;
    font-weight: bold;
}

.faculty-hero-info h1 { font-size: 48px; margin-bottom: 8px; }
.faculty-hero-info h3 { color: #ffbf47; margin-bottom: 10px; }
.faculty-contact-row { display: flex; gap: 25px; flex-wrap: wrap; margin-top: 18px; font-size: 18px; }

.profile-tabs { display: flex; gap: 15px; margin: 30px 0; }

.tab-pill {
    border: 2px solid #d8dee8;
    background: white;
    padding: 14px 24px;
    border-radius: 35px;
    cursor: pointer;
    font-size: 18px;
}

.tab-pill.active { background: #071a35; color: white; }

.profile-tab-content {
    display: none;
    background: white;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    font-size: 22px;
    line-height: 1.9;
}

.profile-tab-content.active { display: block; }

.expertise-tags { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 20px; }
.expertise-tags span { background: #e8eef8; padding: 10px 18px; border-radius: 20px; font-size: 18px; }

.info-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 15px;
    font-size: 20px;
}

.green-theme-hero { background: linear-gradient(135deg, #1f7a34, #2ea84a); }

.image-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #d4a73d;
    padding: 6px;
    overflow: hidden;
}

.image-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tab-pill.active { background: #1f7a34; color: white; }
.expertise-tags span { background: #e8f5eb; color: #1f7a34; }

.theme-card {
    background: white;
    border-left: 6px solid #1f7a34;
    padding: 22px 24px;
    border-radius: 14px;
    margin-bottom: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.theme-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(31,122,52,0.12); }
.theme-card h3 { color: #1f7a34; margin-bottom: 8px; font-size: 24px; }
.theme-card p { color: #555; margin-bottom: 8px; font-size: 18px; }
.theme-card span { color: #2ea84a; font-size: 17px; }

.dean-profile { width: 78%; }
.hod-profile { width: 62%; }

.faculty-hero { display: flex; justify-content: space-between; align-items: center; gap: 30px; }

.faculty-portrait {
    width: 240px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.faculty-portrait img { width: 100%; height: 100%; object-fit: cover; }

.hero-content {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: Green;
}

.hero-content h1 { color: #F58220; }

/* =========================================
   MOBILE RESPONSIVE OVERRIDES 
   ========================================= */

@media screen and (max-width: 768px) {
    body { padding: 0; }

    /* Updated Navbar Logic */
    .navbar {
        flex-direction: row; 
        padding: 15px 25px;
        position: relative;
    }

    .menu-toggle {
        display: flex; /* Hamburger visible */
    }

    .nav-links {
        display: none; /* Hidden by default */
        flex-direction: column;
        width: 100%;
        background-color: #1f7a34;
        position: absolute;
        top: 100%; 
        left: 0;
        padding: 20px 0;
        text-align: center;
        z-index: 1000;
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    }

    .nav-links.active {
        display: flex; /* Shown when toggled */
    }

    .logo-section {
        flex-direction: row;
        text-align: left;
    }

    .logo-text h2 { font-size: 18px; }

    /* Layout Collapses */
    .slider, .slide img { height: 300px; }
    .caption { top: 50%; left: 5%; width: 90%; transform: translateY(-50%); text-align: center; }

    .vision-mission, .plo-section, .peo-section, 
    .faculty-section, .labs-page-section, 
    .curriculum-section, .mission-hub {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .full-width { grid-column: 1; }
    .mission-left { padding: 25px; }
    .mission-left h2 { font-size: 32px; }

    .dean-section, .top-profile-section { padding: 20px; }
    .dean-card, .featured-profile, .dean-profile, .hod-profile {
        width: 100%;
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .faculty-hero { flex-direction: column; text-align: center; padding: 20px; }
    .faculty-portrait { width: 100%; max-width: 240px; margin: 0 auto; }
    .faculty-contact-row { justify-content: center; }

    .profile-tabs { flex-wrap: wrap; justify-content: center; }
    .life-hover-section { padding: 20px; }
    .life-hover-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-content, .beautiful-modal { width: 95%; padding: 20px; margin: 10% auto; }
    
    .page-banner h1 { font-size: 28px; }
    .page-banner { margin: 20px; padding: 20px; }
}

@media screen and (max-width: 480px) {
    .life-hover-grid { grid-template-columns: 1fr; }
    .faculty-hero-info h1 { font-size: 32px; }
    .mapping-section { padding: 10px; }
    .logo-text { display: none; }
}