* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #222222;
    background-color: #f5f7fa;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: #1a4d8c;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; border-left: 5px solid #c62828; padding-left: 1rem; margin: 1.5rem 0 1rem; }
h3 { font-size: 1.3rem; color: #1a4d8c; }

p { margin-bottom: 1rem; }

a {
    text-decoration: none;
    color: #1a4d8c;
    transition: color 0.3s ease;
}

a:hover {
    color: #c62828;
}

/* ---------- STICKY DOUBLE HEADER ---------- */
.name{
    animation: typing 4s steps(20) infinite, blink .6s infinite;
    color: red;
}
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: linear-gradient(135deg, #1a4d8c 0%, #0f3a6b 100%);
    color: white;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.left-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 60px;
    height: 60px;
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 0 var(--navbar-blue));
}

.text-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.school-name-area h1 {
    color: white;
    margin-bottom: 0;
    font-size: 1.6rem;
    letter-spacing: 1px;
    line-height: 1.2;
}

.motto {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.motto span {
    color: #c62828;
    font-weight: bold;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: linear-gradient(135deg, #1a4d8c 0%, #0f3a6b 100%);
    color: white;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.left-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 60px;
    height: 60px;
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.text-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.school-name-area h1 {
    color: white;
    margin-bottom: 0;
    font-size: 1.6rem;
    letter-spacing: 1px;
    line-height: 1.2;
}

.motto {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.motto span {
    color: #c62828;
    font-weight: bold;
}

/* ---------- HAMBURGER MENU (Mobile First) ---------- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

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

/* Animation for when menu is open */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Navigation Links - Desktop view */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

.nav-links li a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    text-decoration: none;
}

.nav-links li a:hover,
.nav-links li a.active {
    border-bottom-color: #c62828;
    color: #1a1a1a;
}

/* Mobile view - show hamburger, hide nav links by default */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .nav-links li a.active {
        border-bottom-color: #c62828;
        color: #1a4d8c;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        width: auto;
        min-width: 200px;
        height: auto;
        /* background: linear-gradient(135deg, #1a4d8c 0%, #0f3a6b 100%); */
        background: lightgray;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 0.5rem;
        z-index: 1000;
        transition: all 0.3s ease;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        border-radius: 0 0 25px 25px;
        padding: 1rem 2rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links li a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        color: black;
        font-weight: bold;
    }
    
    .top-bar {
        position: relative;
        z-index: 1002;
    }
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 70vh;
}

.hero {
    background: linear-gradient(rgba(26,77,140,0.85), rgba(26,77,140,0.85)), url('https://via.placeholder.com/1200x400?text=Crest+College+Students');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h2, .hero p {
    color: white;
}

.btn {
    display: inline-block;
    background-color: #c62828;
    color: white;
    padding: 0.75rem 1.8rem;
    border-radius: 40px;
    font-weight: bold;
    margin-top: 1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #8b0000;
    transform: scale(1.02);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #c62828;
    color: #c62828;
}

.btn-outline:hover {
    background-color: #c62828;
    color: white;
}

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

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    border-top: 4px solid #c62828;
}

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

.card h3 {
    margin-top: 0;
    color: #1a4d8c;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #1a1a1a;
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198,40,40,0.2);
}

/* Table styling for subjects */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

th, td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

th {
    background-color: #0a2f44;
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: #f5f7fa;
}

/* Responsive table - horizontal scroll on mobile */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
/* Subjects Table - With Vertical Lists */
.subjects-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
}

.subjects-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.subjects-table th,
.subjects-table td {
    padding: 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e0e0e0;
}

.subjects-table th {
    background-color: #0a2f44;
    color: white;
    font-weight: 600;
}

.subject-area {
    background-color: #1a4d8c;
    color: white;
    font-weight: bold;
    width: 30%;
    vertical-align: top;
}

.subjects-list ul {
    margin: 0;
    padding-left: 1.2rem;
}

.subjects-list li {
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.subjects-list li:last-child {
    margin-bottom: 0;
}

.subjects-table tr:hover {
    background-color: #f5f7fa;
}

.subjects-table tr:hover .subject-area {
    background-color: #0f3a6b;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .subjects-table th,
    .subjects-table td {
        padding: 0.7rem;
    }
    
    .subject-area {
        width: 35%;
        font-size: 0.85rem;
    }
    
    .subjects-list ul {
        padding-left: 1rem;
    }
    
    .subjects-list li {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
}

footer {
    background-color: #1a1a1a;
    color: #ccc;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

footer p {
    color: white;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        text-align: center;
    }
    .logo-container {
        flex-direction: column;
        text-align: center;
    }
    .motto {
        text-align: center;
        border-left: none;
        border-top: 1px solid #c62828;
        padding-top: 0.5rem;
    }
    .nav-bar ul {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    main {
        padding: 1rem;
    }

    .hero {
    background: linear-gradient(rgba(26,77,140,0.25), rgba(26,77,140,0.25)), url('images/learners.jpg');
    background-size: cover;
    background-position: center 30%;
    color: white;
    padding: 5rem 3rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
    
    min-height: 480px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease-out;
}

.hero h2, .hero p {
    color: white;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.4rem; }
}

/* ---------- DIRECTORS SECTION STYLES ---------- */
.directors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.director-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 1.5rem 1rem 1.5rem 1rem;
}

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

/* Circular image styling */
.director-image {
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem auto;
    border-radius: 50%;
    overflow: hidden;
    background-color: #1a4d8c;
    border: 3px solid #c62828;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.director-card h3 {
    color: #1a4d8c;
    margin: 0.75rem 0 0.25rem;
    font-size: 1.3rem;
}

.director-title {
    color: #c62828;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.director-bio {
    color: #555;
    font-size: 0.85rem;
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
}

/* Portfolio button*/
/* .btn-director {
    display: inline-block;
    background-color: #1a4d8c;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-director:hover {
    background-color: #c62828;
    transform: scale(1.02);
    color: white;
} */

.directors-note {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 1rem;
    font-style: italic;
}

/* Responsive for directors section */
@media (max-width: 600px) {
    .director-image {
        width: 110px;
        height: 110px;
    }
    .director-card h3 {
        font-size: 1.1rem;
    }
    .director-bio {
        font-size: 0.8rem;
    }
}

/* Resources Page - Form Groups */
.subject-resource-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid #c62828;
}

.subject-resource-card h4 {
    color: #1a4d8c;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
    padding-left: 0.5rem;
}

.form-group h5 {
    color: #0a2f44;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    display: inline-block;
    background-color: #e8f0f5;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

.resource-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.file-link {
    display: inline-block;
    background-color: #f5f7fa;
    color: #1a4d8c;
    padding: 0.4rem 0.9rem;
    border-radius: 25px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #ddd;
}

.file-link:hover {
    background-color: #1a4d8c;
    color: white;
    border-color: #1a4d8c;
}

/* Mobile view */
@media (max-width: 768px) {
    .resource-files {
        margin-left: 0;
    }
    
    .file-link {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
    }
    
    .form-group h5 {
        font-size: 0.85rem;
    }
}