:root {
    --primary-blue: #0066a0;
    --secondary-blue: #0099cc;
    --accent-teal: #00a3a1;
    --light-gray: #f5f7fa;
    --medium-gray: #e1e5eb;
    --dark-gray: #333333;
    --success-green: #28a745;
    --warning-orange: #ff9800;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    
    /* Aqua Blue Theme Colors */
    --aqua-light: #7FDBFF;
    --aqua-medium: #39CCCC;
    --aqua-deep: #0074D9;
    --aqua-dark: #0056a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 160px; /* Adjusted padding for fixed header to reduce empty space */
}

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

/* ==================== HEADER STYLES ==================== */
header {
    background: linear-gradient(135deg, var(--aqua-deep), var(--aqua-medium), var(--aqua-light), var(--aqua-medium));

    background-size: 400% 400%;
    color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    animation: headerGradient 15s ease infinite;
}

@keyframes headerGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header-top {
    padding: 15px 0;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.logo {
    background-color: rgba(255, 255, 255, 0.9);
    width: 90px;
    height: 90px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(127, 219, 255, 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.institution-name {
    flex: 1;
    min-width: 0;
}

.institution-name h1 {
    font-size: 22px;
    margin-bottom: 3px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.institution-name p {
    opacity: 0.9;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

nav {
    background-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    padding: 18px 20px;
    display: block;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.7);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.nav-links a:hover::before {
    transform: translateX(0);
}

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

.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-links a.active::before {
    transform: translateX(0);
    background-color: white;
}

.nav-links i {
    margin-right: 8px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.login-btn {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.3));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
    white-space: nowrap;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.7s;
    z-index: -1;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all 0.3s;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ==================== CAROUSEL STYLES ==================== */
.library-search-container, 
.library-search-section,
.search-container,
.search-wrapper {
    display: none !important; /* Removes search container as requested */
}

.library-carousel-section {
    background-color: var(--white);
    padding: 0 0 30px; /* Removed top padding to fix empty space */
    margin-top: -10px;
    margin-bottom: 0;
}

.library-carousel-section + .container {
    margin-top: 0; /* Pulls the media cards/files grid up */
}

/* Remove top margin from the inner carousel to sit flush under header */
.library-carousel-section .carousel-section {
    margin-top: 0;
}

.carousel-section {
    margin: 30px 0;
    position: relative;
}

.carousel-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    height: 380px;
}

/* Scoped to avoid conflict with Bootstrap .carousel on library/other pages */
.carousel-container .carousel {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.carousel-container .carousel-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.carousel-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    filter: brightness(0.9);
    transition: transform 12s linear;
}

.carousel-slide.active .carousel-media {
    transform: scale(1.05);
}

.carousel-content {
    position: relative;
    z-index: 2;
    padding: 25px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    max-width: 550px;
    margin-left: 60px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.3s ease;
}

.carousel-slide.active .carousel-content {
    animation: slideUp 0.8s 0.3s forwards;
    z-index: 10;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.carousel-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.carousel-content p {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

.carousel-btn {
    background-color: rgba(127, 219, 255, 0.9);
    color: var(--aqua-dark);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--aqua-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    font-size: 18px;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
    border-color: var(--aqua-light);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    padding: 15px;
    gap: 10px;
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

.dot.active {
    background-color: var(--aqua-light);
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(127, 219, 255, 0.9);
}

.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, var(--aqua-light), var(--aqua-medium));
    width: 100%;
    transform-origin: left;
    transform: scaleX(0);
}

/* ==================== CONTENT SECTIONS ==================== */
.welcome-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.welcome-section h2 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 28px;
    line-height: 1.3;
}

.welcome-section p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.action-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 5px solid var(--aqua-medium);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.action-card:hover, .document-card:hover {
    animation: floatingCard 3s ease-in-out infinite;
    box-shadow: 0 20px 40px rgba(57, 204, 204, 0.3);
    z-index: 5;
}

@keyframes floatingCard {
    0%, 100% { transform: translateY(-8px); }
    50% { transform: translateY(-18px); }
}

.action-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.action-card h3 i {
    color: var(--aqua-medium);
    flex-shrink: 0;
}

.action-card p {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.action-btn {
    background-color: var(--light-gray);
    color: var(--aqua-dark);
    border: 1px solid var(--aqua-medium);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    width: fit-content;
}

.action-btn:hover {
    background-color: var(--aqua-medium);
    color: white;
}

.courses-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 40px 0;
    box-shadow: var(--shadow);
}

.courses-section h2 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.courses-section h2 i {
    color: var(--aqua-medium);
    flex-shrink: 0;
}

.courses-section > p {
    margin-bottom: 20px;
    color: #666;
}

/* ==================== TABLE STYLES ==================== */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--medium-gray);
    -webkit-overflow-scrolling: touch;
}

.courses-table,
.program-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.courses-table thead,
.program-table thead {
    background: linear-gradient(to right, var(--aqua-dark), var(--aqua-deep));
    color: white;
}

.courses-table th,
.program-table th {
    padding: 16px 15px;
    text-align: left;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.courses-table th:last-child,
.program-table th:last-child {
    border-right: none;
}

.courses-table tbody tr,
.program-table tbody tr {
    border-bottom: 1px solid var(--medium-gray);
    transition: background-color 0.3s;
}

.courses-table tbody tr:hover,
.program-table tbody tr:hover {
    background-color: rgba(127, 219, 255, 0.05);
}

.courses-table td,
.program-table td {
    padding: 14px 15px;
    border-right: 1px solid var(--medium-gray);
    word-break: break-word;
}

.courses-table td:last-child,
.program-table td:last-child {
    border-right: none;
}

.date-cell {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.status-active {
    background-color: var(--success-green);
}

.status-upcoming {
    background-color: var(--warning-orange);
}

.status-closed {
    background-color: #dc3545;
}

.amount-cell {
    font-weight: 600;
    color: var(--success-green);
    white-space: nowrap;
}

.late-fee-cell {
    font-weight: 600;
    color: var(--warning-orange);
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-open {
    background-color: #d4edda;
    color: #155724;
}

.status-closed {
    background-color: #f8d7da;
    color: #721c24;
}

.program-link {
    color: var(--aqua-dark);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.program-link:hover {
    text-decoration: underline;
}

.program-link.closed {
    color: #999;
    cursor: not-allowed;
}

.table-note {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(127, 219, 255, 0.1);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--aqua-medium);
}

.table-note p {
    margin: 0;
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.5;
}

.admission-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 40px 0;
}

.admission-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--medium-gray);
    flex-wrap: wrap;
    gap: 15px;
}

.section-icon {
    background-color: var(--light-gray);
    color: var(--aqua-dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.section-header h2 {
    font-size: 22px;
    color: var(--dark-gray);
    line-height: 1.3;
    flex: 1;
    min-width: 250px;
}

.admission-section > p {
    margin-bottom: 20px;
    color: #666;
}

.program-note {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.info-link {
    color: var(--aqua-dark);
    text-decoration: none;
    font-weight: 500;
}

.info-link:hover {
    text-decoration: underline;
}

/* ==================== RESPONSIVE TABLES ==================== */
@media (max-width: 768px) {
    .table-container {
        border: 1px solid var(--medium-gray);
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    /* Hide table headers on mobile */
    .courses-table thead,
    .program-table thead {
        display: none;
    }
    
    /* Make table rows stack as cards */
    .courses-table tr,
    .program-table tr {
        display: block;
        margin-bottom: 15px;
        padding: 15px;
        background-color: var(--white);
        border: 1px solid var(--medium-gray);
        border-radius: 8px;
        position: relative;
    }
    
    /* Remove border from last row */
    .courses-table tr:last-child,
    .program-table tr:last-child {
        margin-bottom: 0;
    }
    
    /* Make table cells stack vertically */
    .courses-table td,
    .program-table td {
        display: block;
        text-align: right;
        padding: 12px 15px;
        border-bottom: 1px solid var(--light-gray);
        position: relative;
        padding-left: 50%;
        word-break: break-word;
        border-right: none;
    }
    
    /* Remove border from last cell in each row */
    .courses-table td:last-child,
    .program-table td:last-child {
        border-bottom: none;
    }
    
    /* Add data-label before each cell using pseudo-element */
    .courses-table td::before,
    .program-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        text-align: left;
        font-weight: 600;
        color: var(--primary-blue);
        font-size: 14px;
    }
    
    /* Adjust specific cell styles for mobile */
    .date-cell {
        white-space: normal;
    }
    
    .amount-cell,
    .late-fee-cell {
        white-space: normal;
        font-size: 14px;
    }
    
    /* Adjust status indicator alignment */
    .date-cell .status-indicator {
        margin-right: 5px;
        vertical-align: middle;
    }
    
    /* Adjust program links for mobile */
    .program-table td[data-label="Action"] {
        text-align: left;
        padding-left: 15px;
    }
    
    .program-table td[data-label="Action"]::before {
        display: none;
    }
    
    .program-link {
        display: inline-block;
        padding: 8px 16px;
        margin: 5px 0;
    }
    
    /* Adjust status badges for mobile */
    .status-badge {
        display: inline-block;
        margin: 5px 0;
        padding: 6px 12px;
    }
    
    /* Fix the courses table min-width issue */
    .courses-table,
    .program-table {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    .courses-table th,
    .program-table th {
        padding: 12px 10px;
        white-space: normal;
    }
    
    .courses-table td,
    .program-table td {
        padding: 10px;
        border-right: none;
        word-break: break-word;
    }
    
    /* Table notes adjustment */
    .table-note,
    .program-note {
        font-size: 13px;
        padding: 12px;
    }
    
    .table-note .status-indicator {
        margin-right: 5px;
    }
}

/* Medium screens (tablets) */
@media (max-width: 992px) and (min-width: 769px) {
    .courses-table,
    .program-table {
        font-size: 14px;
    }
    
    .courses-table th,
    .program-table th,
    .courses-table td,
    .program-table td {
        padding: 12px 10px;
    }
    
    .table-container {
        overflow-x: auto;
    }
}

/* Very small screens (phones) */
@media (max-width: 576px) {
    .courses-table td,
    .program-table td {
        padding-left: 45%;
    }
    
    .courses-table td::before,
    .program-table td::before {
        width: 40%;
        font-size: 13px;
    }
    
    .program-link {
        padding: 6px 12px;
        font-size: 13px;
        display: block;
        text-align: center;
    }
    
    .status-badge {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .courses-section,
    .admission-section {
        padding: 15px;
    }
}

/* Animated Aqua Blue Footer */
footer {
    background: linear-gradient(135deg, var(--aqua-dark), var(--aqua-deep), var(--aqua-medium), var(--aqua-dark));
    background-size: 400% 400%;
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: auto;
    animation: footerGradient 20s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes footerGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Add a subtle wave effect at the top of footer */
footer::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%230074D9'%3E%3C/path%3E%3C/svg%3E");
    background-size: 1200px 100%;
    animation: wave 25s linear infinite;
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1200px;
    }
}

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

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--aqua-light);
}

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

.footer-column ul li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s;
    line-height: 1.4;
}

.footer-column ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-column i {
    color: var(--aqua-light);
    width: 20px;
    flex-shrink: 0;
    margin-top: 3px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

/* Floating bubbles animation for footer */
.bubble {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

/* Mobile menu scroll fix */
.nav-links.active {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}
/* Existing styles... */

/* UNESCO header button */
.btn-black{
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000;
    padding: 8px 18px;
    border-radius: 8px;
}

.btn-black:hover{
    background: #111 !important;
    color: #fff !important;
}


/* Chatbot Animation */
@keyframes chatBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.chatbot-toggle {
    animation: chatBounce 2s infinite;
}

/* Loading indicator for bot messages */
.chatbot-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1e5799;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ==================== RESPONSIVE DESIGN ==================== */

/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .carousel-container {
        height: 350px;
    }
    
    .carousel-content {
        margin-left: 40px;
        max-width: 500px;
    }
    
    .admission-sections {
        gap: 25px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium tablets and small laptops */
@media (max-width: 992px) {
    .carousel-container {
        height: 320px;
    }
    
    .carousel-content {
        margin-left: 30px;
        max-width: 450px;
        padding: 20px;
    }
    
    .carousel-content h3 {
        font-size: 22px;
    }
    
    .carousel-content p {
        font-size: 14px;
    }
    
    .section-header h2 {
        font-size: 20px;
        min-width: 200px;
    }
}

/* MOBILE RESPONSIVE STYLES */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }
    
    /* Header mobile styles */
    .header-content {
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .logo-container {
        flex: 1;
        min-width: 0;
        gap: 10px;
    }
    
    .logo {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }
    
    .institution-name h1 {
        font-size: 18px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
    }
    
    .institution-name p {
        font-size: 12px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Navigation mobile styles */
    .nav-container {
        flex-direction: column;
        padding: 0;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }
    
    .nav-links.active {
        max-height: 500px;
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
    }
    
    .user-actions {
        width: 100%;
        justify-content: center;
        margin: 15px 0;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: none;
    }
    
    .user-actions.active {
        display: flex;
    }
    
    .login-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
    }
    
    /* Carousel mobile styles */
    .carousel-container {
        height: 280px;
    }
    
    .carousel-content {
        padding: 15px;
        margin: 10px;
        max-width: 100%;
        backdrop-filter: blur(5px);
    }
    
    .carousel-content h3 {
        font-size: 18px;
    }
    
    .carousel-content p {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    /* Content mobile styles */
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .welcome-section,
    .courses-section,
    .admission-section {
        padding: 20px;
    }
    
    .welcome-section h2,
    .courses-section h2 {
        font-size: 22px;
    }
    
    .section-header h2 {
        font-size: 18px;
        min-width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    body {
        padding-top: 110px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .institution-name h1 {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .institution-name p {
        font-size: 11px;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .carousel-container {
        height: 250px;
    }
    
    .carousel-content {
        padding: 12px;
        margin: 8px;
    }
    
    .carousel-content h3 {
        font-size: 16px;
        margin-bottom: 5px;
    }
    
    .carousel-content p {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .carousel-btn {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    .welcome-section h2,
    .courses-section h2 {
        font-size: 20px;
    }
    
    .action-card h3 {
        font-size: 18px;
    }
    
    .action-card p {
        font-size: 14px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    body {
        padding-top: 100px;
    }
    
    .logo-container {
        gap: 8px;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
    
    .institution-name h1 {
        font-size: 14px;
    }
    
    .institution-name p {
        font-size: 10px;
    }
    
    .carousel-container {
        height: 220px;
    }
    
    .carousel-content h3 {
        font-size: 14px;
    }
    
    .carousel-content p {
        font-size: 11px;
    }
    
    .welcome-section h2,
    .courses-section h2 {
        font-size: 18px;
    }
    
    .action-card {
        padding: 15px;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    header, footer, .carousel-section, .carousel-nav, .action-btn, .program-link {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .courses-table, .program-table {
        width: 100% !important;
        font-size: 12px !important;
        min-width: 100% !important;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .welcome-section, .courses-section, .admission-section {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    /* Force table to not be responsive in print */
    .courses-table thead,
    .program-table thead {
        display: table-header-group !important;
    }
    
    .courses-table tr,
    .program-table tr {
        display: table-row !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .courses-table td,
    .program-table td {
        display: table-cell !important;
        text-align: left !important;
        padding: 8px !important;
        border: 1px solid #ddd !important;
        padding-left: 8px !important;
    }
    
    .courses-table td::before,
    .program-table td::before {
        display: none !important;
    }
    
    .courses-table,
    .program-table {
        border: 1px solid #ddd !important;
    }
    
    .table-container {
        overflow-x: visible !important;
        border: none !important;
    }
    
    .courses-table thead,
    .program-table thead {
        background: #f0f0f0 !important;
        color: black !important;
    }
    
    .amount-cell,
    .late-fee-cell {
        color: black !important;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile menu scroll fix */
.nav-links.active {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

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

.welcome-section, 
.courses-section, 
.admission-section, 
.calendar-container, 
.contact-container, 
.action-card,
.table-container {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

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

/* ==================== PAGE SPECIFIC STYLES ==================== */

/* Calendar Page */
.calendar-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.calendar-container h2 {
    color: var(--primary-blue);
    margin-bottom: 25px;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.calendar-container h2 i {
    color: var(--aqua-medium);
}

.calendar-year-selector {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.year-btn {
    padding: 8px 20px;
    background-color: var(--light-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.year-btn.active {
    background-color: var(--aqua-dark);
    color: white;
    border-color: var(--aqua-dark);
}

.year-btn:hover:not(.active) {
    background-color: var(--aqua-medium);
    color: white;
    border-color: var(--aqua-medium);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.calendar-table thead {
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

.calendar-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--medium-gray);
}

.calendar-table td {
    padding: 15px;
    border-bottom: 1px solid var(--medium-gray);
}

.calendar-event {
    background-color: rgba(127, 219, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    border-left: 3px solid var(--aqua-medium);
}

.calendar-event.holiday {
    background-color: rgba(255, 152, 0, 0.1);
    border-left-color: var(--warning-orange);
}

.calendar-event.exam {
    background-color: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
}

/* Calendar table mobile responsive */
@media (max-width: 768px) {
    .calendar-table {
        min-width: 550px;
        font-size: 14px;
    }
    
    .calendar-table th,
    .calendar-table td {
        padding: 12px 10px;
    }
}

@media (max-width: 576px) {
    .calendar-table {
        min-width: 500px;
        font-size: 13px;
    }
    
    .calendar-table th,
    .calendar-table td {
        padding: 10px 8px;
    }
}

/* Contact Page */
.contact-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.contact-container h2 {
    color: var(--primary-blue);
    margin-bottom: 25px;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.contact-container h2 i {
    color: var(--aqua-medium);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}

.contact-info {
    padding: 25px;
    background-color: rgba(127, 219, 255, 0.05);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--aqua-medium);
}

.contact-info h3 {
    color: var(--dark-gray);
    margin-bottom: 20px;
    font-size: 20px;
    line-height: 1.3;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-detail i {
    color: var(--aqua-medium);
    font-size: 20px;
    margin-top: 3px;
    flex-shrink: 0;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 16px;
    min-height: 150px;
    resize: vertical;
    transition: border-color 0.3s;
}

.contact-form textarea:focus {
    outline: none;
    border-color: var(--aqua-medium);
    box-shadow: 0 0 0 3px rgba(57, 204, 204, 0.1);
}

.contact-submit-btn {
    padding: 12px 30px;
    background: linear-gradient(to right, var(--aqua-dark), var(--aqua-deep));
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.contact-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 116, 217, 0.3);
}

.map-container {
    margin-top: 40px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-placeholder {
    background-color: var(--light-gray);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-gray);
    font-size: 18px;
    text-align: center;
    padding: 20px;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 40px 20px;
}

.login-box {
    background-color: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 102, 160, 0.1);
    width: 100%;
    max-width: 380px;
    border: 1px solid rgba(0, 102, 160, 0.1);
    border-top: 6px solid var(--aqua-deep);
    transition: transform 0.3s ease;
}

.login-box h2 {
    color: var(--primary-blue);
    margin-bottom: 25px;
    text-align: center;
    font-size: 28px;
    line-height: 1.3;
}

.login-box h2 i {
    color: var(--aqua-medium);
    margin-right: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-gray);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--aqua-medium);
    box-shadow: 0 0 0 3px rgba(57, 204, 204, 0.1);
}

.login-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--aqua-deep), var(--aqua-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 86, 160, 0.2);
}

.login-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 86, 160, 0.3);
}

.login-links {
    margin-top: 20px;
    text-align: center;
}

.login-links a {
    color: var(--aqua-dark);
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 5px;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Admission Modal Styles - University Standard */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 20, 45, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.modal-active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #fff;
  width: 95%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-overlay.modal-active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header-elegant {
  padding: 20px 25px;
  background: linear-gradient(135deg, #0077cc, #005a9a);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #00c0ff;
}

.modal-header-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.modal-logo {
  height: 35px;
  width: auto;
  filter: brightness(0) invert(1);
  border-radius: 6px;
}

.modal-header-elegant h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.modal-close-elegant {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.modal-close-elegant:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

.elegant-padding {
  padding: 30px 25px;
  overflow-y: auto;
}

.admission-announcement {
  margin-bottom: 30px;
  text-align: center;
}

.admission-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0077cc;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.admission-session {
  font-size: 0.9rem;
  color: #5b6b7a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.divider {
  width: 60px;
  height: 3px;
  background: #00c0ff;
  margin: 15px auto;
  border-radius: 2px;
}

.admission-desc {
  font-size: 1rem;
  color: #5b6b7a;
  line-height: 1.5;
  max-width: 100%;
  margin: 0 auto;
}

.btn-university-standard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #0077cc;
  color: #fff !important;
  padding: 14px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(0, 119, 204, 0.2);
  width: 100%;
}

.btn-university-standard:hover {
  background: #005a9a;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 119, 204, 0.3);
}

.modal-footer-minimal {
  padding: 15px;
  background: #fcfdfe;
  border-top: 1px solid #f0f4f8;
  text-align: center;
}

.modal-footer-minimal p {
  margin: 0;
  font-size: 0.75rem;
  color: #a0aec0;
  font-weight: 500;
}

@media (max-width: 480px) {
  .admission-title {
    font-size: 1.5rem;
  }
  .modal-header-elegant {
    padding: 15px 20px;
  }
  .elegant-padding {
    padding: 30px 20px;
  }
  .btn-university-standard {
    padding: 12px 25px;
    font-size: 1rem;
  }
}

/* ==================== JOURNAL FAQ & CONTENT STYLES ==================== */
.faq-content-area {
    max-width: 900px;
    margin: 2rem auto;
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.faq-content-area h3 {
    color: var(--primary-blue);
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-weight: 700;
}

.faq-content-area h3::before {
    content: "Q";
    background: var(--aqua-medium);
    color: white;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin-right: 15px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.faq-content-area p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 43px; /* Align with text after the Q badge */
}
