/* --- 1. Variables and Global Reset (UPDATED COLORS) --- */
:root {
    --color-primary: #1A4B9F; /* Darker Blue from Logo - Primary Brand Color */
    --color-secondary: #3598D8; /* Lighter Blue from Logo - Accent/Secondary Brand Color */
    --color-text: #333333;
    --color-light: #f4f7f6;
    --color-white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Open Sans', sans-serif;
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin-bottom: 0.5em;
    color: var(--color-primary);
}

/* --- 2. Top CTA Bar (UPDATED COLORS) --- */
.top-cta-bar {
    background-color: var(--color-primary); /* Dark Blue */
    color: var(--color-white);
    padding: 8px 0;
    font-size: 0.9em;
}

.top-cta-bar .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.top-cta-bar span {
    margin-right: auto;
}

.btn-top {
    text-decoration: none;
    color: var(--color-white);
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.btn-top-primary {
    background-color: var(--color-secondary); /* Light Blue Accent */
    font-weight: 600;
}

.btn-top-primary:hover {
    background-color: #2a81c0; /* Darker Light Blue */
}

.btn-top:hover:not(.btn-top-primary) {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- 3. Header and Navigation (Updated) --- */
header {
    background-color: var(--color-white);
    padding: 0.8em 0;
    border-bottom: 3px solid var(--color-light);
}

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

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    padding-right: 20px; 
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

nav ul li a {
    text-decoration: none;
    color: var(--color-text);
    padding: 0.5em 0.2em;
    font-weight: 600;
    transition: color 0.3s, border-bottom 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
}

/* --- 4. Buttons and CTAs --- */
.btn {
    display: inline-block;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
}

.btn-primary:hover {
    background-color: #153b82; /* Darker Primary Blue */
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* --- 5. Hero Section --- */
.hero {
    background-color: #333; 
    color: var(--color-white);
    padding: 120px 0;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center 30%; 
}

.hero-home {
    background-image: url('/images/hero-care-placeholder.png'); 
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.55); 
}

.hero-content {
    position: relative;
    z-index: 10;
    /* Increase max-width for the containment */
    max-width: 1000px;
    /* Increased from 900px */
    margin-left: auto;
    margin-right: auto;
    padding: 0 40px;
    /* Increased padding on the sides for desktop view */
}

.slogan {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #FFD700;
    /* NEW: Add a background or subtle effect to give it visual width */
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(0, 0, 0, 0.4);
    /* Subtle transparent background for width */
    border-radius: 5px;
}

.hero h2 {
    font-size: 3.5em; 
    color: var(--color-white);
    line-height: 1.3;
    margin-bottom: 1em;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); 
}

/* --- 6. Homepage Sections --- */
.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
    text-align: center;
}

.mv-card {
    padding: 30px;
    background-color: var(--color-light);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.mv-card h3 {
    color: var(--color-secondary); /* Light Blue Accent */
}

.quick-links {
    padding: 50px 0;
    text-align: center;
    background-color: #e3f2fd;
}

.link-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.link-card {
    flex-basis: 30%;
    text-decoration: none;
    color: var(--color-white);
    padding: 40px 20px;
    border-radius: 8px;
    font-size: 1.5em;
    font-weight: 700;
    transition: transform 0.3s, opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-card:hover {
    transform: translateY(-5px);
    opacity: 0.9;
}

.admissions { background-color: var(--color-primary); }
.programs { background-color: var(--color-secondary); } /* Light Blue Accent */
.contact { background-color: #ff9800; } /* Keeping Orange for the urgent Contact CTA */

.news-snippet {
    padding: 60px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

article {
    border-left: 5px solid var(--color-secondary); /* Light Blue Accent */
    padding-left: 15px;
}

article h4 {
    color: var(--color-text);
    font-size: 1.2em;
}

.date {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}

/* --- 7. Programs Page Specific Styling (Table) --- */
.program-detail {
    padding: 60px 0;
}

.program-meta {
    font-style: italic;
    color: #555;
    margin-bottom: 2em;
}

.academic-calendar {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.academic-calendar th, .academic-calendar td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.academic-calendar th {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
}

.academic-calendar tr:nth-child(even) {
    background-color: var(--color-light);
}

.academic-calendar ul {
    list-style: disc;
    padding-left: 20px;
}

/* --- 8. About Us Page Styling --- */
.about-us {
    padding: 60px 0;
}
.story-content p {
    margin-bottom: 1.5em;
    font-size: 1.1em;
}

.team-section, .faculty-section {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--color-light);
    border-radius: 8px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.profile-card {
    background-color: var(--color-white);
    padding: 20px;
    border-left: 4px solid var(--color-secondary); /* Light Blue Accent */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-style: italic;
}

.specialized-modules {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.specialized-modules li {
    background-color: var(--color-secondary); /* Light Blue Accent */
    color: var(--color-white);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

/* --- 9. Contact Page Styling (REVISED) --- */
.contact-us {
    padding: 60px 0;
}
/* --- 9. Contact Page Styling (REVISED) --- */
/* ... (Existing code for .contact-us and .contact-grid) ... */

/* --- 9. Contact Page Styling (REVISED) --- */
/* ... (Existing code for .contact-us and .contact-grid) ... */

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    /* <-- Target all form fields explicitly */
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    /* Ensure the textarea has a height */
    min-height: 120px;
    resize: vertical;
}

.contact-form input[type="text"],
.contact-form input[type="email"] {
    min-height: 40px;
    /* Standardize input height */
}


/* ... (Rest of section 9 remains the same) ... */

/* ... (Rest of section 9 remains the same) ... */
/* FIX: Main grid is now 50/50 for form and info on desktop */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 50% Form | 50% Info */
    gap: 40px;
}

/* New: Container for the full-width map below the 50/50 grid */
.map-full-width-container {
    padding: 40px 0;
    text-align: center;
}

/* FIX: Styling for the Info Section to be clean */
.contact-info-area {
    /* Ensure info fields stack cleanly */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.details-list {
    padding: 15px;
    border: 1px solid var(--color-light);
    border-radius: 8px;
}

.details-list p {
    margin-bottom: 15px;
    font-size: 1.05em;
    line-height: 1.4;
}

.map-placeholder {
    /* Centralizes map and provides the clean border */
    border: 3px solid var(--color-secondary);
    overflow: hidden;
    border-radius: 8px;
    width: 100%;
    /* Ensure the iframe/content is centered */
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-placeholder iframe {
    /* Ensure the iframe fills its container */
    width: 100%;
    height: 350px;
    /* Increased map height */
}

/* --- Media Queries --- */
@media (max-width: 900px) {

    /* Below 900px, everything stacks */
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Mobile adjustments */
    .map-full-width-container {
        padding: 20px 0;
    }
}
/* --- 10. Portal Page Styling (Student/Admin Login/Register) --- */
.student-portal, .admin-portal {
    padding: 80px 0;
    text-align: center;
}
.login-form {
    max-width: 450px;
    margin: 30px auto;
    padding: 40px;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    background-color: var(--color-white);
}
.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.warning-text {
    color: #d32f2f;
    font-size: 0.9em;
    margin-top: 15px;
}
.dashboard-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* --- 11. News & Events Page Styling --- */
.news-events-full {
    padding: 60px 0;
}
.events-list {
    margin-top: 40px;
}
.event-item {
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #eee;
    border-left: 5px solid var(--color-primary);
    border-radius: 5px;
}
.event-category {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-bottom: 10px;
}
.event-date {
    color: #777;
    font-size: 0.9em;
    margin-bottom: 10px;
}
.event-item.graduation { border-left-color: var(--color-secondary); } 
.event-item.workshop { border-left-color: #ff9800; }
.event-item.blog { border-left-color: #795548; }

/* --- 12. Gallery Page Styling --- */
.gallery-section {
    padding: 60px 0;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.gallery-img-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover; 
    border-radius: 5px;
    margin-top: 10px;
    background-color: #ddd; 
}
.gallery-item {
    background-color: var(--color-light);
    padding: 15px;
    border-radius: 8px;
}
.gallery-item h4 {
    font-size: 1.1em;
}


/* --- 13. Footer --- */
footer {
    background-color: var(--color-text);
    color: var(--color-white);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9em;
}

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

/* --- 14. Media Queries (Responsiveness) --- */
@media (max-width: 768px) {
    .top-cta-bar .container {
        flex-direction: column;
        align-items: center;
    }
    .top-cta-bar span {
        margin-right: 0;
        margin-bottom: 5px;
    }
    header .container {
        flex-direction: column;
    }
    nav ul {
        margin-top: 1em;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .mission-vision, .contact-grid {
        grid-template-columns: 1fr;
    }
    .link-grid {
        flex-direction: column;
    }
    .link-card {
        flex-basis: 100%;
    }
}

/* --- Admin Dashboard Specific Styling --- */
.admin-dashboard {
    padding: 60px 0;
}
.admin-card {
    background-color: var(--color-light);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.admin-card h3 {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.admin-form input[type="text"],
.admin-form input[type="date"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
}
.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.admin-form button {
    width: auto;
    display: block;
    margin-top: 10px;
}
.admin-card-summary p {
    font-size: 1.1em;
    margin-bottom: 5px;
}

/* Admin Table Styling */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9em;
}
.admin-table th, .admin-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}
.admin-table th {
    background-color: var(--color-secondary);
    color: var(--color-white);
}
.admin-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.btn-delete {
    background-color: #d32f2f;
    color: var(--color-white);
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Status Messages */
.success-message {
    padding: 10px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 15px;
}
.error-message {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* --- New Admin Student/Assignment Styling --- */
.btn-grant {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Student Assignment Card */
.assignment-card {
    background-color: var(--color-light);
    padding: 20px;
    border-left: 5px solid var(--color-primary);
    border-radius: 5px;
    margin-bottom: 25px;
}
.assignment-card h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--color-primary);
}
.assignment-card .due-date {
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
}
.assignment-description {
    font-size: 1em;
}

/* --- New LMS/Upload Styling --- */
.admin-form .form-row select {
    padding: 10px;
}
.submission-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}
.submission-item h4 {
    color: var(--color-primary);
    margin-bottom: 5px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}
.grading-form {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
}
.grading-form textarea {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.btn-grade {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Student Assignment Styling */
.module-card {
    background-color: var(--color-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.module-card ul {
    list-style: none;
    padding: 0;
}
.module-card li {
    background-color: var(--color-white);
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.module-card li a {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}
.submission-form {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.submission-form input[type="file"] {
    flex-grow: 1;
    border: 1px dashed #ccc;
    padding: 8px;
    border-radius: 4px;
}
.status-label {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 10px;
}
.status-submitted { background-color: #fff3cd; color: #856404; }
.status-graded { background-color: #d4edda; color: #155724; }
.status-pending { background-color: #f8d7da; color: #721c24; }
.grade-area {
    margin-top: 15px;
    padding: 10px;
    border-top: 1px solid #ddd;
}

/* --- 15. Hamburger Menu and Mobile Navigation (NEW) --- */

/* Hide the checkbox itself */
.menu-toggle {
    display: none;
}

/* Hamburger Icon Styling */
.hamburger-menu {
    display: none; /* Hide by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 100;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    transition: all 0.3s linear;
    border-radius: 2px;
}

/* Navigation Menu on Mobile */
.main-nav {
    display: block; /* Default to block for desktop */
}

/* --- Mobile Breakpoint (768px) --- */
@media (max-width: 768px) {

    /* 1. TOP CTA BAR/BUTTONS FIX (Reduced Height) */
    .top-cta-bar .container {
        /* Keep as row, but allow wrapping and reduce padding/margins */
        flex-direction: row; 
        flex-wrap: wrap; 
        justify-content: center;
        gap: 8px; /* Reduced gap */
    }
    .top-cta-bar {
        padding: 5px 0; /* Reduced vertical padding */
        font-size: 0.85em; /* Reduced font size */
    }
    .btn-top {
        padding: 4px 8px; /* Reduced button padding */
    }
    

    /* 2. HEADER LAYOUT FIX (Ensures all elements are present) */
    .hamburger-menu {
        display: flex; /* Ensure the hamburger is always shown on mobile */
    }

    header .container {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between; 
        align-items: center;
        padding: 10px 0;
    }

    /* Reduce logo size to ensure it fits with the hamburger */
    .logo-img {
        height: 50px; 
    }

    /* 3. NAVIGATION SLIDE-IN FIX (Retained from previous step) */
    .main-nav {
        position: fixed; 
        top: 65px; /* Adjusting top to be just below the main header (logo height + padding) */
        left: -100%; 
        width: 100%; 
        height: 100%; 
        overflow: auto; 
        background-color: var(--color-primary);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease-in-out; 
        z-index: 99;
    }

    .menu-toggle:checked ~ .main-nav {
        left: 0; 
    }
    
    /* ... (rest of the mobile menu and layout styles) ... */

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        padding: 0;
        margin: 0;
        gap: 0;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 15px 20px;
        color: var(--color-white);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-weight: 500;
    }
    
    .main-nav ul li a:hover, .main-nav ul li a.active {
        background-color: var(--color-secondary);
        border-bottom: none;
    }
    
    /* Hamburger Animation: X (Close icon) */
    .menu-toggle:checked ~ .hamburger-menu .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle:checked ~ .hamburger-menu .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked ~ .hamburger-menu .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* General Mobile Layout Adjustments */
    .mission-vision {
        grid-template-columns: 1fr;
    }
    .link-grid {
        flex-direction: column;
    }
    .academic-calendar {
        display: block; 
        overflow-x: auto;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
        /* NEW FIX: Homepage description text size/fit */
        .hero-content p:not(.slogan) {
            font-size: 0.9em;
            /* Reduce font size */
            padding: 1px;
            /* Add slight horizontal padding */
            line-height: 1.3;
        }
    
        /* ... (Rest of mobile media query remains the same) ... */
        }
}