html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

:root {
    --primary-blue: #122340; /* Deep, rich Oxford Navy */
    --primary-light: #1d4ed8; /* Vibrant interactive blue */
    --accent-gold: #d4af37; /* Metallic premium gold */
    --accent-red: #991b1b; /* Refined sharp crimson */
    --bg-main: #ffffff; /* Pure professional white, overriding grey */
    --border-gray: #e2e8f0;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Noto Sans Sinhala', sans-serif;
}

body {
    background-color: #e8eef5;
    background-image: 
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.08), transparent 50%),
        radial-gradient(circle at bottom left, rgba(18, 35, 64, 0.06), transparent 50%);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Typography */
.eng-title { font-family: 'Times New Roman', serif; font-size: clamp(1.1rem, 2.5vw, 1.8rem); color: var(--primary-blue); font-weight: 700; margin-bottom: 5px; }
.sin-title { font-size: clamp(0.95rem, 2vw, 1.4rem); font-weight: 600; margin-bottom: 5px; color: #222; }
.tam-title { font-size: clamp(0.85rem, 1.8vw, 1.2rem);   color: #444; }

/* Top Utility */
.top-utility-bar {
    background-color: #0d1b2a;
    border-bottom: 2px solid var(--accent-gold);
    font-size: 0.9em;
    color: #e2e8f0;
}
.utility-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
}
.lang-selector a {
    color: #cbd5e1;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s;
}
.lang-selector a.active, .lang-selector a:hover {
    color: var(--accent-gold);
    font-weight: bold;
}
.utility-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.search-bar {
    display: flex;
}
.search-bar input {
    padding: 6px 12px;
    border: 1px solid #1e293b;
    background: #1e293b;
    color: white;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 220px;
    transition: background 0.3s;
}
.search-bar input:focus {
    background: #334155;
    border-color: var(--accent-gold);
}
.search-bar input::placeholder {
    color: #94a3b8;
}
.search-bar button {
    border: none;
    background: var(--accent-gold);
    padding: 6px 14px;
    cursor: pointer;
    color: #0d1b2a;
    font-weight: bold;
    border-radius: 0 4px 4px 0;
    transition: 0.3s;
}
.search-bar button:hover {
    background: #c5a028;
}
.member-login-btn {
    background-color: #dc2626;
    padding: 6px 15px;
    border-radius: 3px;
    font-weight: 500;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(220,38,38,0.3);
}
.member-login-btn:hover {
    background-color: #b91c1c;
    box-shadow: 0 2px 6px rgba(220,38,38,0.5);
}

/* Header */
.branding-header {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 3px solid var(--accent-gold);
}
.branding-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 50px;
}
.all-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}
.emblem {
    height: 85px;
    width: 85px;
    object-fit: contain;
}
.dept-logo {
    /* Removed specific height to ensure all logos are equal size */
}
.department-titles {
    text-align: center;
    flex-grow: 0;
}

/* Horizontal Navigation */
.horizontal-nav {
    background: linear-gradient(to bottom, #4b5563, #374151);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-menu > li {
    position: relative;
    flex: 1;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.nav-menu > li:last-child {
    border-right: none;
}
.nav-menu a {
    display: block;
    padding: 14px 10px;
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
}
.nav-menu a:hover, .nav-menu a.active {
    background: var(--accent-gold);
    color: var(--primary-blue);
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.1);
}
.hamburger {
    display: none;
    color: white;
    padding: 15px;
    cursor: pointer;
}

/* Dropdown styling */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f5f9;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    text-align: left;
    border-top: 3px solid var(--primary-blue);
}
.dropdown-content li {
    border-bottom: 1px solid #e2e8f0;
}
.dropdown-content li a {
    color: var(--text-dark);
    padding: 10px 15px;
}
.dropdown-content li a:hover {
    background-color: #e2e8f0;
    color: var(--primary-blue);
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* Banner Slider */
.main-banner {
    position: relative;
    width: 100%;
    height: clamp(280px, calc(100vh - 280px), 500px); /* Fits banner + header + nav + news strip in first viewport */
    overflow: hidden;
    background: #000;
}
.banner-slider {
    width: 100%;
    height: 100%;
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}
.slide.active {
    opacity: 1;
}
.banner-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.5rem;
}
.banner-controls button:hover {
    background: rgba(0,0,0,0.8);
}
#prevBtn { left: 10px; }
#nextBtn { right: 10px; }

/* Welcome Strip */
.welcome-strip {
    background: linear-gradient(135deg, var(--primary-blue), #1e3a8a);
    color: white;
    padding: 12px 0;
    font-size: 1.05rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
    border-bottom: 2px solid var(--accent-gold);
}
.welcome-strip marquee {
    padding: 2px 0;
}

/* Content sections */
.main-content {
    margin-top: 30px;
    margin-bottom: 40px;
}
.content-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 25px;
    align-items: start;
}

/* Make columns flex so panels can grow to fill height */
.left-col,
.right-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Announcements grows to fill leftover height */
.left-col .announcements {
    flex: 1;
}

/* Announcements marquee fills the grown panel */
.left-col .announcements .announcement-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.left-col .announcements .announcement-content marquee {
    flex: 1;
    height: 100% !important;
    min-height: 250px;
}

.boxed-panel {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: box-shadow 0.3s ease;
}
.boxed-panel:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.06);
}
.panel-header {
    border-bottom: 2px solid var(--border-gray);
    padding-bottom: 12px;
    margin-bottom: 20px;
    color: var(--primary-blue);
    font-size: 1.3rem;
    position: relative;
}
.panel-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--accent-gold);
}

/* Vision Mission - Beautiful Redesign */
.beautiful-vm {
    background: linear-gradient(145deg, #e6f0fa, #d2e0f0);
    border: none;
    box-shadow: 0 10px 30px rgba(18, 35, 64, 0.08);
    position: relative;
    overflow: hidden;
    padding: 35px 30px;
    border-radius: 20px;
}
.beautiful-vm::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-gold), var(--primary-blue));
}
.vm-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.vm-item:last-child {
    margin-bottom: 0;
}
.vm-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(18, 35, 64, 0.1);
    background: #ffffff;
    border-color: rgba(212, 175, 55, 0.6); /* Gold border */
}
.vm-divider {
    display: none; /* Removed to prefer separate cards */
}
.vm-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-blue), #1e3a8a);
    color: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 15px rgba(29, 78, 216, 0.2);
}
.vision-card .vm-icon {
    background: linear-gradient(135deg, var(--accent-gold), #b38f22);
    color: var(--primary-blue);
    box-shadow: 0 8px 15px rgba(212, 175, 55, 0.3);
}
.vm-title {
    font-weight: 800;
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.vm-text {
    text-align: justify;
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.7;
    font-style: italic;
}

/* Announcements Section - Premium Highlight */
.announcements {
    margin-top: 25px;
    background: white;
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 15px 35px rgba(18, 35, 64, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}
.announcements:hover {
    box-shadow: 0 20px 45px rgba(18, 35, 64, 0.2);
    transform: translateY(-2px);
}
.announcements .panel-header {
    background: var(--primary-blue);
    color: var(--accent-gold);
    padding: 15px 25px;
    margin: -25px -25px 20px -25px;
    border-bottom: 3px solid var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 10px;
}
.announcements .panel-header::before {
    content: '\f0a1'; /* Megaphone icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}
.announcements .panel-header::after {
    display: none; /* Remove the old gold underline */
}
.announcement-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
/* Removed old tab-btn styles */
.announcement-list {
    list-style: none;
}
.announcement-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.announcement-list li:hover {
    transform: translateX(8px);
}
.announcement-list a {
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}
.announcement-list a i {
    color: var(--accent-gold);
}
.announcement-list a:hover {
    color: var(--primary-light);
}
.badge {
    background: var(--accent-red);
    color: white;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 900;
    text-transform: uppercase;
    animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(153, 27, 27, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(153, 27, 27, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(153, 27, 27, 0); }
}

/* News Section */
/* Latest News Section - Premium Cards */
.latest-news {
    margin-top: 25px;
}
.news-card {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 15px;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    width: 100%;
    box-sizing: border-box;
    align-items: center;
}
.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(18, 35, 64, 0.08);
    border-color: var(--accent-gold);
}
.news-card img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.news-card:hover img {
    transform: scale(1.05);
}
.news-info {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.news-info h4 {
    font-size: 0.95rem;
    color: var(--primary-blue);
    margin-bottom: 4px;
    line-height: 1.3;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.news-date i {
    color: var(--accent-gold);
}
.news-info p {
    font-size: 0.82rem;
    color: #4b5563;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    align-self: flex-start;
}
.read-more::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.2s;
}
.read-more:hover {
    color: var(--accent-red);
}
.read-more:hover::after {
    transform: translateX(3px);
}
.pd-courses {
    background: #fdfdfd;
    padding: 15px;
    border: 1px solid #eee;
    border-left: 3px solid var(--accent-red);
}
.courses-list {
    list-style: none;
    padding: 10px 0;
}
.course-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}
.course-item:hover {
    background: white;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: var(--accent-gold);
}
.course-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-blue);
    color: var(--accent-gold);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.course-info {
    display: flex;
    flex-direction: column;
}
.course-info strong {
    font-size: 0.95rem;
    color: var(--primary-blue);
    margin-bottom: 4px;
}
.course-info span {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* External Links - Premium Style */
.external-links {
    list-style: none;
    padding: 10px 20px;
}
.external-links li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}
.external-links li:last-child {
    border-bottom: none;
}
.external-links li:hover {
    transform: translateX(10px);
}
.external-links img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.external-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    line-height: 1.4;
}
.external-links li:hover a {
    color: var(--primary-blue);
}
.external-links a:hover {
    color: var(--primary-blue);
}

/* Footer & Maps */
.main-footer {
    background: #0f172a;
    border-top: 4px solid var(--accent-gold);
    margin-top: 40px;
    color: #e2e8f0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 25px 15px; /* Reduced from 50px */
}
.footer-box h4 {
    color: var(--accent-gold);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
    margin-bottom: 15px; /* Reduced from 20px */
    font-size: 1.1rem;
}
.footer-list {
    list-style: none;
}
.footer-list li {
    margin-bottom: 8px; /* Reduced from 12px */
    font-size: 0.9rem; /* Slightly smaller text */
}
.footer-list a {
    color: #cbd5e1;
    transition: color 0.2s;
}
.footer-list a:hover {
    color: var(--accent-gold);
}
.footer-list i {
    width: 25px;
    color: var(--accent-gold);
}
.map-placeholder iframe {
    border-radius: 4px;
}
.visitor-counter {
    color: white;
    font-size: 0.9rem;
}

/* Ultra-Premium Glassmorphic Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.modal.active {
    display: flex;
    opacity: 1;
}
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 0;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.4);
}
.modal.active .modal-content {
    transform: scale(1);
}
.modal-header {
    background: linear-gradient(135deg, var(--primary-blue), #1e3a8a);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--accent-gold);
}

/* Boxed Panel Styling - Standardized */
.boxed-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.panel-header {
    background: linear-gradient(135deg, var(--primary-blue), #1e3a8a);
    color: var(--accent-gold);
    padding: 18px 20px;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--accent-gold);
}

.panel-header i {
    font-size: 1.2rem;
    opacity: 0.9;
}

.announcement-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 5px;
    gap: 5px;
}

.tab-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    color: #64748b;
    transition: all 0.3s ease;
    border-radius: 8px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.tab-btn.active {
    background: #fff;
    color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.close-btn {
    cursor: pointer;
    font-size: 1.8rem;
    transition: color 0.3s, transform 0.3s;
}
.close-btn:hover {
    color: var(--accent-gold);
    transform: rotate(90deg);
}
.modal-body {
    padding: 35px 30px;
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
}
.form-group {
    margin-bottom: 25px;
    position: relative;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}
.form-control {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}
.form-control:focus {
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1);
}
.input-icon {
    position: absolute;
    bottom: 16px;
    left: 15px;
    color: #94a3b8;
    font-size: 1.1rem;
    transition: color 0.3s;
}
.form-control:focus + .input-icon, .form-control:not(:placeholder-shown) + .input-icon {
    color: var(--primary-light);
}
.login-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-gold), #c59b27);
    color: var(--primary-blue);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transition: all 0.3s;
    margin-top: 10px;
}
.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, #e5c353, #d4af37);
}

/* About Us Modal Specific Styles */
.about-modal-content {
    max-width: 1150px;
    width: 95%;
    height: 80vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
}
.about-modal-body {
    display: flex;
    padding: 0;
    flex: 1;
    overflow: hidden; /* Sidebar and Content Area handle their own scrolling */
}
.about-sidebar {
    width: 250px;
    flex-shrink: 0; /* Prevent sidebar from squishing */
    background: #f8f9fa;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
}
.about-sidebar .sidebar-nav {
    list-style: none;
}
.about-sidebar .sidebar-nav li {
    border-bottom: 1px solid #e2e8f0;
}
.about-sidebar .sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: var(--text-dark);
    font-weight: 500;
}
.about-sidebar .sidebar-nav a.active, .about-sidebar .sidebar-nav a:hover {
    background: var(--primary-blue);
    color: white;
}
.about-sidebar .sidebar-nav a i {
    margin-right: 10px;
    width: 20px;
}
.about-sidebar .sidebar-nav a[data-tab="achievements"] i {
    color: var(--accent-gold);
}
.about-sidebar .sidebar-nav a[data-tab="achievements"].active i {
    color: var(--accent-gold) !important;
}
.about-content-area {
    flex-grow: 1;
    min-width: 0; /* Crucial to let the table wrapper scroll instead of stretching the flex item */
    padding: 25px 30px;
    overflow-y: auto; /* Vertically scrollable area for table/content */
}
.about-content-area p {
    text-align: justify;
    margin-bottom: 15px;
    line-height: 1.7;
    font-size: 1.05rem;
    color: #475569;
}
.content-title {
    color: var(--primary-blue);
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Premium Table Styles for Modal Content Area */
.premium-table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
    border-radius: 10px;
    border: 1px solid rgba(18, 35, 64, 0.12);
    box-shadow: 0 8px 24px rgba(18, 35, 64, 0.05);
    background: var(--white);
}

/* Custom premium scrollbar for the table wrapper */
.premium-table-wrapper::-webkit-scrollbar {
    height: 8px;
}
.premium-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 0 10px 10px;
}
.premium-table-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.premium-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
    background-color: var(--white);
    min-width: 800px; /* Reduced min-width to allow better fit */
}

.premium-table th {
    background: linear-gradient(135deg, var(--primary-blue), #1e3a8a) !important;
    color: var(--white) !important;
    font-weight: 700;
    padding: 12px 10px; /* Optimized padding */
    text-transform: uppercase;
    font-size: 0.775rem;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--accent-gold);
}

.premium-table th:first-child {
    color: var(--accent-gold) !important; /* Gold highlight for Serial No */
}

.premium-table td {
    padding: 12px 10px; /* Optimized padding */
    border-bottom: 1px solid var(--border-gray);
    color: var(--text-dark);
    vertical-align: middle;
    white-space: nowrap; /* Prevents text from breaking into multiple messy lines */
}

/* Column Specific Alignments & Widths */
.premium-table th {
    text-align: center !important; /* Only headers are centered */
}

.premium-table td {
    text-align: left !important; /* All data cell contents are left-aligned */
}

.premium-table th:nth-child(1),
.premium-table td:nth-child(1) {
    width: 65px;
    min-width: 65px;
}
.premium-table th:nth-child(2),
.premium-table td:nth-child(2) {
    min-width: 180px;
}
.premium-table th:nth-child(3),
.premium-table td:nth-child(3) {
    white-space: normal;
    min-width: 160px;
    max-width: 220px;
}
.premium-table th:nth-child(4),
.premium-table td:nth-child(4) {
    min-width: 110px;
}
.premium-table th:nth-child(5),
.premium-table td:nth-child(5) {
    min-width: 220px;
}

.premium-table tr:last-child td {
    border-bottom: none;
}

.premium-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.premium-table tr:hover {
    background-color: #f1f5f9;
    transition: background-color 0.25s ease;
}

.premium-table td strong {
    color: var(--primary-blue);
    font-size: 0.95rem;
    font-weight: 700;
}

.premium-table a {
    color: var(--primary-light);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 0;
}

.premium-table a i {
    font-size: 0.95rem;
    color: var(--primary-light);
    transition: transform 0.25s ease;
}

.premium-table a:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

.premium-table a:hover i {
    color: var(--accent-red);
    transform: scale(1.15);
}

/* Utilities */
.mt-4 { margin-top: 1.5rem; }
.p-3 { padding: 1rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.responsive-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.before-after-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .before-after-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* =========================================================
   RESPONSIVE DESIGN — Full Viewport Coverage
   Breakpoints: 1200px | 992px | 768px | 576px | 375px
   ========================================================= */

/* --- Laptop (≤1200px) --- */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
    .main-banner {
        height: clamp(250px, calc(100vh - 300px), 420px);
    }
    .content-grid {
        grid-template-columns: 6fr 5fr;
    }
    .branding-container {
        gap: 30px;
    }
}

/* --- Tablet Landscape (≤992px) --- */
@media (max-width: 992px) {
    /* Branding Header */
    .branding-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 10px 15px;
    }
    .all-logos {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    /* Handled by fluid typography */

    /* Navigation */
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #374151;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu > li {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        text-align: left;
        flex: none;
    }
    .nav-menu > li > a {
        padding: 15px 25px;
    }
    .hamburger {
        display: block;
        font-weight: bold;
    }
    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        background: #1f2937;
        padding-left: 20px;
        display: none;
    }
    .dropdown.open .dropdown-content {
        display: block;
    }

    /* Utility Bar */
    .utility-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
        align-items: center;
    }
    .utility-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Layout */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .main-banner {
        height: clamp(220px, calc(100vh - 280px), 340px);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    .footer-box h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-list li i {
        float: none;
        margin-right: 5px;
    }
    .map-placeholder iframe {
        width: 100%;
    }

    /* Visitor Counter */
    .visitor-counter .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        align-items: center !important;
        justify-content: center !important;
    }

    /* About Modal Mobile */
    .about-modal-body {
        flex-direction: column;
    }
    .about-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        max-height: 160px;
    }
    .about-sidebar .sidebar-nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
    }
    .about-sidebar .sidebar-nav li {
        border-bottom: none;
        flex-shrink: 0;
    }
    .about-modal-content {
        height: 90vh;
        max-height: none;
    }
    .about-content-area {
        padding: 15px;
    }

    /* Modal */
    .modal-content {
        width: 96%;
        max-width: none;
        margin: 0 10px;
    }
}

/* --- Tablet Portrait (≤768px) --- */
@media (max-width: 768px) {
    /* Banner */
    .main-banner {
        height: clamp(180px, calc(100vh - 250px), 260px);
    }

    /* Vision / Mission */
    .vm-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 18px;
    }
    .vm-icon {
        margin-bottom: 12px;
    }
    .beautiful-vm {
        padding: 18px 12px;
    }
    .vm-title {
        font-size: 1.2rem;
    }
    .vm-text {
        font-size: 0.97rem;
    }

    /* News Cards */
    .news-card {
        flex-direction: column;
    }
    .news-card img {
        width: 100%;
        height: 180px;
        border-radius: 8px 8px 0 0;
    }
    .news-info {
        padding: 10px 0 0;
    }

    /* Courses */
    .course-item {
        flex-direction: row;
        gap: 10px;
    }

    /* Announcements marquee */
    .announcement-content marquee {
        height: 280px !important;
    }

    /* External Links */
    .external-links {
        padding: 8px 12px;
    }

    /* Panel header */
    .panel-header {
        font-size: 1rem;
        padding: 14px 15px;
    }

    /* Footer */
    .main-footer {
        margin-top: 25px;
    }
    .footer-grid {
        padding: 20px 15px;
    }

    /* Modals */
    .modal-header {
        padding: 14px 18px;
    }
    .modal-header h2 {
        font-size: 1.1rem;
    }
    .modal-body {
        padding: 18px 15px;
    }
}

/* --- Mobile (≤576px) --- */
@media (max-width: 576px) {
    /* Typography */
    .eng-title { line-height: 1.3; }

    /* Logos */
    .emblem {
        height: 55px;
        width: 55px;
    }
    .all-logos {
        gap: 8px;
    }

    /* Search */
    .search-bar { width: 100%; max-width: 320px; display: flex; }
    .search-bar input { flex: 1; min-width: 0; width: auto; }

    /* Login Button */
    .member-login-btn {
        width: auto;
        text-align: center;
        padding: 8px 20px;
    }

    /* Welcome Strip */
    .welcome-strip {
        font-size: 0.88rem;
        padding: 9px 0;
    }

    /* Banner */
    .main-banner {
        height: clamp(160px, calc(100vh - 220px), 200px);
    }
    .banner-controls button {
        padding: 10px;
        font-size: 1.1rem;
    }

    /* Content area */
    .main-content {
        margin-top: 18px;
        margin-bottom: 25px;
    }
    .boxed-panel {
        padding: 15px;
    }
    .beautiful-vm {
        padding: 14px 10px;
    }
    .vm-title {
        font-size: 1.05rem;
    }

    /* Announcements */
    .announcement-tabs {
        flex-wrap: wrap;
        gap: 6px;
    }
    .tab-btn {
        flex: none;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    .announcement-list a {
        font-size: 0.88rem;
    }

    /* News */
    .news-info h4 {
        font-size: 0.88rem;
    }
    .news-info p {
        font-size: 0.78rem;
    }
    .news-date {
        font-size: 0.68rem;
    }

    /* Courses */
    .course-item {
        padding: 10px;
    }
    .course-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .course-info strong {
        font-size: 0.85rem;
    }

    /* Footer */
    .footer-grid {
        padding: 18px 12px;
        gap: 15px;
    }
    .footer-box h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    .footer-list li {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    .map-placeholder iframe {
        height: 130px;
    }
    .visitor-counter {
        font-size: 0.82rem;
        padding: 10px 0;
    }

    /* Modals */
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 12px 12px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        max-height: 90vh;
        overflow-y: auto;
    }
    .modal {
        align-items: flex-end;
    }
    .modal-header {
        padding: 12px 15px;
    }
    .modal-header h2 {
        font-size: 1rem;
    }
    .modal-body {
        padding: 15px 12px;
    }
    .about-modal-content {
        border-radius: 12px 12px 0 0;
        max-height: 90vh;
        height: 90vh;
        width: 100%;
        max-width: none;
        margin: 0;
        position: fixed;
        bottom: 0;
        left: 0;
    }
    .about-content-area {
        padding: 12px;
    }
    .about-sidebar {
        max-height: 130px;
    }
}

/* --- Small Phone (≤400px) --- */
@media (max-width: 400px) {
    .emblem {
        height: 48px;
        width: 48px;
    }
    /* Handled by fluid typography */
    .main-banner {
        height: clamp(140px, calc(100vh - 200px), 170px);
    }
    .branding-container {
        gap: 10px;
    }
}


/* === Premium Achievements Tab Styling === */
.achievement-highlight-box {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    border: 1px solid rgba(18, 35, 64, 0.08);
    border-left: 4px solid var(--accent-gold);
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.achievement-highlight-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.highlight-trophy-icon {
    font-size: 2.4rem;
    color: var(--accent-gold);
    margin-right: 25px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 6px rgba(212, 175, 55, 0.2));
    animation: trophyFloat 3s ease-in-out infinite;
}

@keyframes trophyFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(3deg); }
}

#aboutAchievementsText {
    font-size: 1.15rem !important;
    font-weight: 500;
    color: var(--primary-blue) !important;
    line-height: 1.7 !important;
    margin: 0 !important;
    font-style: italic;
    text-align: justify !important;
}

/* --- Special Highlight for Division 07 (Puttalam Division) --- */
.division-07-item a {
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    position: relative;
}

/* Dropdown list item hover */
.dropdown-content li.division-07-item a:hover {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #FF8C00 100%) !important;
    color: var(--primary-blue) !important;
    transform: scale(1.06) translateX(8px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
    font-weight: 700;
    border-radius: 6px;
    padding-left: 22px !important;
}

/* Footer list item hover */
.footer-list li.division-07-item a:hover {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #FF8C00 100%) !important;
    color: var(--primary-blue) !important;
    transform: scale(1.06) translateX(8px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
    font-weight: 700;
    border-radius: 6px;
    padding: 6px 15px !important;
    display: inline-block;
}

