/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(22, 34, 63, 0.3);
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #C9A227;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 8px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #C9A227;
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a:hover {
    color: #C9A227;
}

.login-btn {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFFFF 100%);
    color: #16223F !important;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(22, 34, 63, 0.9) 0%, rgba(22, 34, 63, 0.9) 100%), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23ffffff" width="1200" height="600"/><circle cx="200" cy="200" r="150" fill="%23667eea" opacity="0.1"/><circle cx="1000" cy="400" r="200" fill="%23764ba2" opacity="0.1"/><circle cx="600" cy="300" r="100" fill="%23ffd700" opacity="0.1"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 120px 20px;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: pulse 15s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero > .hero-content > p:nth-child(2) {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    display: inline-block;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    color: #FFFFFF;
    box-shadow: 0 6px 20px rgba(22, 34, 63, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px);
    background: #C9A227 !important;
    background-image: none !important;
    color: #16223F !important;
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: white;
    color: #16223F;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* About Section */
.about {
    padding: 100px 20px;
    background: #F7F2E7;
}

.about h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #16223F;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    color: #16223F;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.about-text p {
    margin-bottom: 1.8rem;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #2c3e50;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2.5rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(22, 34, 63, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.stat:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(22, 34, 63, 0.3);
    border-color: #16223F;
}

.stat h3 {
    font-size: 2.5rem;
    color: #16223F;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.stat p {
    color: #16223F;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-image {
    display: flex;
    justify-content: center;
}

.placeholder-image {
    width: 100%;
    max-width: 500px;
    height: 400px;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: 0 20px 60px rgba(22, 34, 63, 0.4);
    text-align: center;
    padding: 20px;
}

/* Homepage identity and photo-ready visual treatment. */
.hero {
    text-align: left;
    min-height: 78vh;
    padding: 90px 20px;
    background: linear-gradient(120deg, #16223F 0%, #0f1a2f 52%, #0d152b 140%);
}

.hero::after {
    content: '';
    position: absolute;
    right: -10vw;
    bottom: -28vw;
    width: 55vw;
    height: 55vw;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.04), 0 0 0 80px rgba(255, 255, 255, 0.03);
}

.hero-content {
    max-width: 760px;
}

.hero-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    color: #FFFFFF;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-logo {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    background: white;
    padding: 4px;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 1.05;
    text-align: left;
}

.hero > .hero-content > p:first-of-type {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero > .hero-content > p.hero-subtitle {
    max-width: 630px;
}

.campus-placeholder {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 500px;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 24px;
    color: white;
    text-align: center;
    border: 8px solid white;
    border-radius: 28px 28px 28px 6px;
    background: linear-gradient(145deg, #16223F 0%, #0f1a2f 58%, #0d152b 150%);
    box-shadow: 20px 24px 0 rgba(201, 162, 39, 0.18), 0 24px 60px rgba(22, 34, 63, 0.28);
}

.campus-placeholder::before,
.campus-placeholder::after {
    content: '';
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
}

.campus-placeholder::before {
    width: 280px;
    height: 280px;
    top: -150px;
    right: -90px;
}

.campus-placeholder::after {
    width: 210px;
    height: 210px;
    bottom: -120px;
    left: -80px;
}

.campus-placeholder-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    filter: blur(35px);
}

.campus-logo {
    position: relative;
    width: 128px;
    height: 128px;
    object-fit: cover;
    border: 6px solid white;
    border-radius: 50%;
    background: white;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.campus-placeholder-label {
    margin-top: 14px;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.campus-placeholder strong {
    font-size: 1.8rem;
}

.campus-placeholder small {
    color: rgba(255, 255, 255, 0.78);
}

/* Vision & Mission Section */
.vision-mission {
    padding: 100px 20px;
    background: #FFFFFF;
}

.vision-mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.vision-card,
.mission-card,
.philosophy-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(22, 34, 63, 0.15);
    border: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFFFF 100%);
}

.mission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
}

.philosophy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.vision-card:hover,
.mission-card:hover,
.philosophy-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 60px rgba(22, 34, 63, 0.25);
}

.vision-card:hover {
    border-color: #FFFFFF;
}

.mission-card:hover {
    border-color: #16223F;
}

.philosophy-card:hover {
    border-color: #28a745;
}

.vision-icon,
.mission-icon,
.philosophy-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s;
}

.vision-card:hover .vision-icon,
.mission-card:hover .mission-icon,
.philosophy-card:hover .philosophy-icon {
    transform: scale(1.2) rotate(5deg);
}

.vision-card h3,
.mission-card h3,
.philosophy-card h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.vision-card h3 {
    color: #FFFFFF;
}

.mission-card h3 {
    color: #16223F;
}

.philosophy-card h3 {
    color: #28a745;
}

.vision-card p,
.mission-card p,
.philosophy-card p {
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Commitments Section */
.commitments {
    padding: 100px 20px;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    color: white;
}

.commitments h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.commitments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.commitment-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.commitment-item:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    border-color: #FFFFFF;
}

.commitment-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s;
}

.commitment-item:hover .commitment-icon {
    transform: scale(1.3) rotate(-5deg);
}

.commitment-item h3 {
    color: #16223F;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.commitment-item p {
    color: #555;
    font-size: 1rem;
    line-height: 1.7;
}

/* Programs Section */
.programs {
    padding: 100px 20px;
    background: #FFFFFF;
}

.programs h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #16223F;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.program-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(22, 34, 63, 0.15);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
}

.program-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(22, 34, 63, 0.25);
    border-color: #16223F;
}

.program-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s;
}

.program-card:hover .program-icon {
    transform: scale(1.2) rotate(5deg);
}

.program-card h3 {
    color: #16223F;
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.program-card p {
    color: #555;
    line-height: 1.7;
    font-size: 1rem;
}

/* Facilities Section */
.facilities {
    padding: 100px 20px;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    color: white;
}

.facilities h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.facility-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 3px solid transparent;
}

.facility-item:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    border-color: #FFFFFF;
}

.facility-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s;
}

.facility-item:hover .facility-icon {
    transform: scale(1.3) rotate(-5deg);
}

.facility-item h3 {
    color: #16223F;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.facility-item p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
}

/* News & Achievements Section */
.news-section {
    padding: 100px 20px;
    background: #F7F2E7;
}

.news-section h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #16223F;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.news-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.news-tab {
    padding: 15px 40px;
    background: white;
    border: 3px solid #16223F;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #16223F;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-tab:hover {
    background: #16223F;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(22, 34, 63, 0.3);
}

.news-tab.active {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    color: white;
    border-color: #16223F;
    box-shadow: 0 6px 20px rgba(22, 34, 63, 0.4);
}

.news-content {
    display: none;
}

.news-content.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(22, 34, 63, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.news-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(22, 34, 63, 0.25);
    border-color: #16223F;
}

.news-card.featured {
    grid-column: span 2;
    border: 3px solid #FFFFFF;
}

.news-image {
    height: 200px;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-placeholder {
    font-size: 4rem;
    color: white;
    opacity: 0.8;
}

.news-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFFFF 100%);
    color: #16223F;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}

.news-content-inner {
    padding: 2rem;
}

.news-category {
    display: inline-block;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    color: white;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.news-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
}

.news-card p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}

.news-date {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

.read-more {
    color: #16223F;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.read-more:hover {
    color: #16223F;
    transform: translateX(5px);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.achievement-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(22, 34, 63, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

.achievement-card.gold::before {
    background: linear-gradient(135deg, #C9A227 0%, #a78120 100%);
}

.achievement-card.gold {
    border-color: #C9A227;
}

.achievement-card.silver::before {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
}

.achievement-card.silver {
    border-color: #c0c0c0;
}

.achievement-card.bronze::before {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
}

.achievement-card.bronze {
    border-color: #cd7f32;
}

.achievement-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 50px rgba(22, 34, 63, 0.25);
}

.achievement-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s;
}

.achievement-card:hover .achievement-icon {
    transform: scale(1.2) rotate(10deg);
}

.achievement-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.achievement-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.achievement-year {
    display: inline-block;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    color: white;
    padding: 8px 25px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .news-card.featured {
        grid-column: span 1;
    }
    
    .news-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .news-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .news-tab {
        width: 100%;
        max-width: 300px;
    }
}

.hero-photo-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
}

.hero-photo-frame,
.gallery-media {
    position: relative;
    overflow: hidden;
    border-radius: 28px 28px 28px 8px;
    background: linear-gradient(145deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

.hero-photo-frame {
    min-height: 360px;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.hero-photo-frame img,
.gallery-media img,
.campus-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;
    gap: 16px;
    color: #fff;
    background: linear-gradient(135deg, rgba(22, 34, 63, 0.9), rgba(201, 162, 39, 0.82));
}

.image-placeholder span {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFFFFF;
}

.image-placeholder small {
    max-width: 240px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.gallery-section {
    padding: 100px 20px;
    background: #FFFFFF;
}

.gallery-section h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #16223F;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.gallery-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(22, 34, 63, 0.12);
    border: 2px solid rgba(22, 34, 63, 0.08);
}

.gallery-card.wide {
    grid-column: span 2;
}

.gallery-media {
    height: 260px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
}

.gallery-caption {
    padding: 1rem 1.25rem 1.5rem;
    color: #16223F;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
}

.campus-placeholder-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    color: white;
    z-index: 1;
}

.empty-state {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    color: #555;
    box-shadow: 0 10px 30px rgba(22, 34, 63, 0.08);
}

.admissions {
    padding: 100px 20px;
    background: #F7F2E7;
}

.admissions h2,
.testimonials h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #16223F;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.admissions-grid,
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.admission-card,
.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(22, 34, 63, 0.12);
    border: 2px solid rgba(22, 34, 63, 0.08);
}

.admission-card h3 {
    color: #16223F;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.admission-card ul {
    list-style: none;
    display: grid;
    gap: 0.8rem;
}

.admission-card li {
    position: relative;
    padding-left: 1.5rem;
    color: #555;
    line-height: 1.7;
}

.admission-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #16223F;
    font-size: 1.5rem;
    line-height: 1;
}

.testimonials {
    padding: 100px 20px;
    background: #FFFFFF;
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
}

.testimonial-quote {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 1rem;
    border-top: 2px solid #eaeef6;
}

.testimonial-author strong {
    color: #16223F;
}

.testimonial-author span {
    color: #16223F;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
}

.map-wrapper {
    margin-top: 1.5rem;
    overflow: hidden;
    border-radius: 18px;
    border: 2px solid #dfe8ff;
    box-shadow: 0 15px 35px rgba(22, 34, 63, 0.12);
}

.map-wrapper iframe {
    width: 100%;
    min-height: 280px;
    border: 0;
    display: block;
}

/* Contact Section */
.contact {
    padding: 100px 20px;
    background: #F7F2E7;
}

.contact h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #16223F;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(22, 34, 63, 0.2);
    border: 2px solid #16223F;
}

.contact-info h3 {
    color: #16223F;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.contact-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-item strong {
    color: #16223F;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.contact-item p {
    color: #555;
    font-size: 1rem;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(22, 34, 63, 0.2);
    border: 2px solid #16223F;
}

.contact-form h3 {
    color: #16223F;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #16223F;
    box-shadow: 0 0 0 3px rgba(22, 34, 63, 0.1);
    background: white;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    color: white;
    padding: 80px 20px 30px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: #F7F2E7;
    transform: skewY(-3deg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFFFFF;
}

.footer-logo {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 1rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    display: inline-block;
}

.footer-section a:hover {
    color: #FFFFFF;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 25px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

.social-links a:hover {
    background: rgba(255,215,0,0.2);
    border-color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
        padding: 1rem 0;
        gap: 0;
        box-shadow: 0 4px 20px rgba(22, 34, 63, 0.3);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 15px 20px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-brand h1 {
        font-size: 1.2rem;
    }

    .logo {
        height: 40px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero > .hero-content > p:nth-child(2) {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
    }

    .programs-grid,
    .facilities-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .contact-info,
    .contact-form {
        padding: 2rem;
    }

    .vision-mission-grid {
        grid-template-columns: 1fr;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0 15px;
    }

    .nav-brand h1 {
        font-size: 1rem;
    }

    .logo {
        height: 35px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero > .hero-content > p:nth-child(2) {
        font-size: 1.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .container {
        padding: 0 15px;
    }

    .about,
    .programs,
    .facilities,
    .contact,
    .vision-mission,
    .commitments {
        padding: 60px 15px;
    }

    .about h2,
    .programs h2,
    .facilities h2,
    .contact h2,
    .commitments h2 {
        font-size: 2rem;
    }

    .stat h3 {
        font-size: 2rem;
    }

    .vision-card,
    .mission-card,
    .philosophy-card,
    .commitment-item {
        padding: 2rem;
    }

    .vision-icon,
    .mission-icon,
    .philosophy-icon,
    .commitment-icon {
        font-size: 3rem;
    }
}

.sidebar-toggle {
    display: none;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
        flex: 0 0 auto;
        background: #16223F;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.program-card,
.facility-item,
.stat {
    animation: fadeInUp 0.6s ease-out;
}

.program-card:nth-child(1) { animation-delay: 0.1s; }
.program-card:nth-child(2) { animation-delay: 0.2s; }
.program-card:nth-child(3) { animation-delay: 0.3s; }
.program-card:nth-child(4) { animation-delay: 0.4s; }
.program-card:nth-child(5) { animation-delay: 0.5s; }
.program-card:nth-child(6) { animation-delay: 0.6s; }

.facility-item:nth-child(1) { animation-delay: 0.1s; }
.facility-item:nth-child(2) { animation-delay: 0.2s; }
.facility-item:nth-child(3) { animation-delay: 0.3s; }
.facility-item:nth-child(4) { animation-delay: 0.4s; }
.facility-item:nth-child(5) { animation-delay: 0.5s; }
.facility-item:nth-child(6) { animation-delay: 0.6s; }

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }
.stat:nth-child(4) { animation-delay: 0.4s; }

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    color: white;
    padding: 20px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 0.8rem;
    opacity: 0.7;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    background: #f8f9fa;
    min-width: 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-bar h1 {
    color: #16223F;
    font-size: 1.8rem;
}

.table-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #16223F;
    color: white;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.sidebar {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%) !important;
    box-shadow: 0 10px 30px rgba(22, 34, 63, 0.3);
}

.sidebar-header h2 {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.3) 100%) !important;
    border-left: 4px solid #FFFFFF;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 2px solid #16223F;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(22, 34, 63, 0.3);
    border-color: #16223F;
}

.stat-card h3 {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.info-card {
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.info-card:hover {
    border-color: #16223F;
    box-shadow: 0 10px 30px rgba(22, 34, 63, 0.2);
}

.info-card h3 {
    color: #16223F;
    font-weight: 700;
}

.login-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #16223F;
    box-shadow: 0 20px 60px rgba(22, 34, 63, 0.3);
}

.login-header h1 {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.login-btn {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 20px rgba(22, 34, 63, 0.3);
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
    background: #C9A227 !important;
    color: #16223F !important;
}

.password-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #16223F;
    box-shadow: 0 20px 60px rgba(22, 34, 63, 0.3);
}

.password-header h1 {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.password-btn {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 20px rgba(22, 34, 63, 0.3);
}

.password-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
    background: #C9A227 !important;
    color: #16223F !important;
}

.student-info-card,
.teacher-info-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #16223F;
    box-shadow: 0 15px 40px rgba(22, 34, 63, 0.2);
}

.student-avatar,
.teacher-avatar {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    box-shadow: 0 10px 30px rgba(22, 34, 63, 0.4);
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.stat-item:hover {
    border-color: #16223F;
    transform: translateY(-5px);
}

.stat-item h3 {
    color: #16223F;
    font-weight: 800;
}

.results-table,
.assignments-table,
.requests-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(22, 34, 63, 0.15);
}

.results-table th,
.assignments-table th,
.requests-table th {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    font-weight: 700;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.form-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #16223F;
    box-shadow: 0 15px 40px rgba(22, 34, 63, 0.2);
}

.form-card h2 {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #16223F;
    box-shadow: 0 20px 60px rgba(22, 34, 63, 0.4);
}

.modal-header h3 {
    background: linear-gradient(135deg, #16223F 0%, #0f1a2f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.empty-state {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px dashed #16223F;
    border-radius: 15px;
}

.empty-state h3 {
    color: #16223F;
    font-weight: 700;
}
/* ===== Mobile responsiveness: global table + dashboard fixes ===== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive table {
    min-width: 600px;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 600px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100% !important;
        position: relative !important;
        height: auto !important;
        padding: 15px !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 15px !important;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stats-grid,
    .info-cards {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    input, select, textarea, button {
        max-width: 100%;
    }

    .contact-content {
        grid-template-columns: 1fr !important;
    }
}

/* Keep dashboard content usable on phones. */
@media (max-width: 768px) {
    .dashboard-container {
        display: block !important;
    }

    .sidebar {
        width: min(280px, 85vw) !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        padding: 15px !important;
        z-index: 1000 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
    }

    .sidebar.active {
        transform: translateX(0) !important;
    }

    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 15px !important;
        min-width: 0 !important;
    }

    .top-bar,
    .notification-header,
    .student-info-header,
    .user-info {
        flex-wrap: wrap;
        gap: 10px;
    }

    .top-bar {
        align-items: flex-start !important;
        padding: 15px !important;
    }

    .top-bar h1 {
        font-size: 1.35rem !important;
        overflow-wrap: anywhere;
    }

    .table-container,
    .table-responsive {
        max-width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .table-container table,
    .table-responsive table {
        min-width: 620px;
    }

    .form-row,
    .form-grid,
    .dashboard-grid,
    .content-grid {
        grid-template-columns: 1fr !important;
    }

    .card,
    .info-card,
    .student-info-card,
    .notifications-container {
        max-width: 100%;
    }

    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px !important;
    }

    .sidebar-nav a {
        padding: 10px !important;
    }

    .top-bar,
    .notifications-container,
    .student-info-card,
    .info-card {
        padding: 12px !important;
    }

    .btn,
    button,
    input,
    select,
    textarea {
        font-size: 16px;
    }
}

/* ============================================================
   Mobile Enhancements
   ============================================================ */

/* Keep anchor sections clear of the sticky navbar when using
   in-page menu links on small screens. */
#home, #about, #gallery, #vision-mission, #commitments, #programs,
#facilities, #admissions, #testimonials, #news-section, #contact {
    scroll-margin-top: 90px;
}

/* Homepage hero: stack the text and photo card on tablets/phones. */
@media (max-width: 900px) {
    .hero {
        flex-direction: column !important;
        text-align: center !important;
        gap: 40px;
        padding: 70px 20px;
    }

    .hero-content {
        max-width: 100% !important;
    }

    .hero h1 {
        max-width: 100% !important;
        text-align: center !important;
    }

    .hero > .hero-content > p:first-of-type,
    .hero > .hero-content > p.hero-subtitle {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .hero-brand-mark {
        justify-content: center;
    }

    .hero-photo-card {
        width: min(420px, 100%) !important;
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 56px 16px;
        min-height: auto;
    }

    .hero h1 {
        font-size: clamp(1.9rem, 7vw, 2.4rem) !important;
    }

    .hero > .hero-content > p:first-of-type {
        font-size: 1.05rem !important;
    }

    .hero > .hero-content > p.hero-subtitle {
        font-size: 0.95rem !important;
    }

    .hero-photo-frame {
        min-height: 260px !important;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
    }
}

/* Gallery: wide cards should not span two columns on phones. */
@media (max-width: 768px) {
    .gallery-card.wide {
        grid-column: span 1 !important;
    }

    .login-card,
    .password-card {
        padding: 24px !important;
    }

    /* Safety net: public events/news grids never overflow on phones. */
    .events-grid,
    .news-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 400px) {
    .login-card,
    .password-card {
        padding: 18px !important;
    }

    .login-card h1,
    .password-card h1 {
        font-size: 1.5rem !important;
    }

    .login-container,
    .password-container {
        padding: 12px !important;
    }

    /* Keep the school name from pushing the hamburger off screen. */
    .nav-brand {
        gap: 0.5rem !important;
    }

    .nav-brand h1 {
        font-size: 0.85rem !important;
        white-space: nowrap;
    }

    .nav-brand .logo {
        height: 32px !important;
    }
}
