/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #d4f1f9 0%, #e8f4f8 100%);
    min-height: 100vh;
}

/* Top Header */
.top-header {
    background: white;
    height: 70px;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.top-header .logo {
    height: 100%;
    display: flex;
    align-items: center;
}

.top-header .logo img {
    max-height: 155%;
    width: auto;
}

/* Top Navigation */
.top-nav {
    display: flex;
    gap: 35px;
    align-items: center;
}

.top-nav a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.top-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.3s ease;
}

.top-nav a:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.top-nav a:hover::after {
    width: 80%;
}

.top-nav a:active {
    transform: translateY(0);
}

/* Blue Navigation Bar */
.blue-navbar {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    padding: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-item {
    color: white;
    padding: 18px 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    border-right: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.nav-item:first-child {
    border-left: 1px solid rgba(255,255,255,0.1);
}

.nav-item:hover {
    background: rgba(255,255,255,0.15);
}

.nav-item::after {
    content: '▼';
    margin-left: 8px;
    font-size: 10px;
    opacity: 0.8;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 50px;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.menu-card {
    background: white;
    border-radius: 15px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
    border-color: #2563eb;
}

.menu-card.active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.menu-icon {
    font-size: 45px;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.menu-card:hover .menu-icon {
    transform: scale(1.1);
}

.menu-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.menu-card.active .menu-title {
    color: white;
}

/* Content Section */
.content-section {
    background: white;
    border-radius: 15px;
    padding: 45px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    min-height: 500px;
}

.content-item {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section h2 {
    color: #2563eb;
    font-size: 32px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #2563eb;
    font-weight: 700;
}

.content-section h3 {
    color: #1f2937;
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

.content-section p {
    color: #4b5563;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 15px;
}

.content-section ul {
    margin-left: 25px;
    line-height: 2;
    color: #4b5563;
}

.content-section li {
    margin-bottom: 8px;
}

.info-box {
    background: #f0f9ff;
    border-left: 4px solid #2563eb;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.info-box strong {
    color: #1e40af;
}

/* Resource Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.resource-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.resource-card:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
    transform: translateY(-5px);
}

.resource-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.resource-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 17px;
}

.resource-desc {
    font-size: 14px;
    color: #6b7280;
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .top-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .top-nav {
        gap: 20px;
    }

    .nav-items {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        padding: 15px 20px;
        font-size: 14px;
    }

    .container {
        padding: 30px 20px;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }

    .content-section {
        padding: 30px 20px;
    }

    .content-section h2 {
        font-size: 26px;
    }
}

/* ================= MEGA MENU ================= */
.mega-wrapper {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 900px;
    background: #f5fbfa;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    
    /* Using display none/block logic from script.js, or class based toggling */
    /* The script uses classList.add('active'), so we keep the opacity/visibility transition */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Active state */
.mega-wrapper.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Content layout */
.mega-content {
    display: flex;
    gap: 40px;
    padding: 30px;
}

.mega-col {
    min-width: 220px;
}

.mega-col h4 {
    color: #0b6f6d;
    margin-bottom: 10px;
}

.mega-col a {
    display: block;
    color: #333;
    text-decoration: none;
    margin-bottom: 8px;
}

.mega-col a:hover {
    color: #0b6f6d;
}
