/* --- 1. Global Styles & Variables --- */
:root {
    --primary-color: #0a2540;   /* Deep Blue */
    --secondary-color: #f0f4f8; /* Light Gray Background */
    --accent-color: #00d4ff;    /* Bright Cyan */
    --text-color: #333;
    --text-light: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}


/* --- 2. Header & Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    min-height: 70px;
    background-color: var(--text-light);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative; /* Needed for z-index to work */
    z-index: 100; /* Ensures navbar is above other content */
}

.nav-brand-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 48px;
    width: 48px;
    object-fit: contain;
}

.nav-branding {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Hamburger Menu Icon Styles */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--primary-color);
}


/* --- 3. Homepage Styles --- */
.hero-banner {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    background: url('images/ips-banner-v3.jpg') no-repeat center center/cover;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 37, 64, 0.7);
}

.hero-content {
    position: relative;
    max-width: 900px;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-content p.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.academy-promo {
    margin-bottom: 2rem;
    padding: 1rem;
}

.academy-promo h2 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.academy-promo p {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.features-list {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-top: 1rem;
}

.features-list h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.features-list ul {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.features-list li {
    font-size: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list strong {
    color: var(--accent-color);
}

.cta-section {
    padding: 4rem 2rem;
}

.cta-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: #555;
}


/* --- 4. IPS Academy Page --- */
.page-container {
    padding: 3rem 2rem;
}

.page-container h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
}

.page-container .section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    text-align: center;
}

.academy-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    text-align: left;
}

.toc-panel {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.toc-chapter {
    border-bottom: 1px solid #eee;
    margin-bottom: 0.5rem;
}

.chapter-title {
    font-size: 1.2rem;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
}

.chapter-title::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.toc-chapter.active .chapter-title::after {
    content: '−';
    transform: none;
}

.subchapter-list {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.toc-chapter.active .subchapter-list {
    max-height: 500px;
}

.subchapter-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 4px;
}

.start-learning-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--accent-color);
    background-color: transparent;
    color: var(--accent-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.start-learning-btn:hover:not(:disabled) {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.start-learning-btn:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

.content-viewer {
    flex: 2;
    display: none;
}

.video-player-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #222;
    color: #fff;
    border-radius: 8px;
    padding: 2rem;
    min-height: 300px;
}

.download-materials-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}


/* --- 5. About Page Styles --- */
.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    text-align: center;
}

.expert-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.expert-card .profile-picture {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    border: 5px solid var(--text-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.expert-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.expert-card .expert-title {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.expert-card .expert-summary {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.about-content {
    text-align: left;
    max-width: 1000px;
    margin: 0 auto;
}

.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.expert-bio p {
    text-align: justify;
}

.expert-bio h4 {
    margin-top: 1rem;
    color: var(--primary-color);
}

.bio-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
}

.expert-bio ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.disclaimer {
    text-align: center;
    margin-top: 4rem;
    color: #777;
    font-size: 0.9em;
    font-style: italic;
}

/* Other Shared Styles */
.cta-button {
    padding: 0.8rem 1.5rem;
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    background-color: #00b8d4;
}

.cta-button[href="calculator.html"] {
    background-color: #aaa;
    cursor: not-allowed;
}
.cta-button[href="calculator.html"]:hover {
    transform: none;
    background-color: #aaa;
}

.coming-soon-container {
    text-align: center;
}

.coming-soon-content {
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
}

.gear-icon {
    font-size: 4rem;
    animation: spin 8s linear infinite;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.coming-soon-content h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
}

.coming-soon-content p {
    font-size: 1.2rem;
    color: #555;
    margin-top: 1rem;
    line-height: 1.7;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* --- 6. Footer --- */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--text-light);
    margin-top: 4rem;
}


/* --- 7. Responsive Design --- */
@media (max-width: 992px) {
    .academy-layout {
        flex-direction: column;
    }
    .toc-panel {
        max-width: 100%;
    }
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px; /* Aligns with the bottom of the navbar */
        gap: 0;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 99; /* Ensures menu is above content but below navbar */
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .nav-link {
        color: var(--text-light);
        font-size: 1.2rem;
    }

    .nav-link:hover {
        color: var(--accent-color);
    }
    
    .hero-content h1, .coming-soon-content h1 { 
        font-size: 2.2rem; 
    }

    .hero-content p.hero-subtitle, .coming-soon-content p { 
        font-size: 1rem; 
    }
}

