/* Base styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #e6f2e6; /* light green background */
    color: #2e4d2e; /* dark green text */
}

/* Subtext styling for topic boxes */
.topic-subtext {
    font-size: 0.9rem;
    color: #4a6f4a;
    line-height: 1.4;
    margin-bottom: 1rem;
}

/* Header */
.main-header {
    background-color: #2e7d32; /* medium green */
    color: white;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* For individual pages (pages with page-container), center site-name and adjust layout */
body:has(.page-container) .main-header {
    justify-content: center; /* Center all items */
    gap: 1rem; /* Add spacing between items */
    padding: 1.5rem 1rem; /* Make header longer */
}

body:has(.page-container) .main-header .nav-buttons {
    position: absolute;
    left: 1rem; /* Position return to home button on the left */
    top: -0.5rem; /* Shift above */
}

body:has(.page-container) .main-header .site-name {
    text-align: center;
    flex-grow: 1;
    font-size: 1.2rem; /* Smaller */
    margin-left: 0; /* Remove margin since logo is gone */
}

body:has(.page-container) .hamburger-menu {
    display: none; /* Hidden by default, shown on mobile */
}

body:has(.page-container) .header-right {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

/* Night mode button in header for page-container */

.hamburger-menu {
    display: none; /* Hidden by default */
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0 1rem;
    user-select: none;
    z-index: 1001;
}

.sidebar {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: #2e7d32;
    padding: 2rem 1rem;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: transform 0.6s ease;
    transform: translateX(-100%); /* Off-screen by default */
}

.sidebar.active {
    display: flex;
    flex-direction: column;
    transform: translateX(0); /* Slide in */
}

.sidebar .nav-btn {
    margin-bottom: 1rem;
    text-align: left;
    padding: 1rem;
    width: 100%;
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar .nav-btn:first-of-type {
    margin-top: 3rem;
}

.sidebar .nav-btn:hover {
    background-color: #81c784;
    color: #2e4d2e;
}

.sidebar .icon-btn {
    margin-top: auto;
    padding: 1rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar .icon-btn:hover {
    background-color: #81c784;
    color: #2e4d2e;
}

.sidebar .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    display: none;
}

.sidebar.active .close-btn {
    display: block;
}

/* Night mode toggle switch */
.night-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.night-mode-toggle:hover {
    background-color: #81c784;
    color: #2e4d2e;
}

.toggle-switch {
    position: relative;
    width: 70px;
    height: 30px;
    background-color: #ccc;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.night-mode-toggle.active .toggle-switch {
    background-color: #2e7d32;
}

.night-mode-toggle.active .toggle-switch::before {
    transform: translateX(41px);
}

.logo-container {
    display: flex;
    align-items: center;
    margin-right: 0rem;
    margin-top: 5px;
}

.logo-image {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    margin-right: 1rem;
}

.site-name {
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    flex-grow: 1;
    text-align: center;
    margin-left: 60px; /* Offset for logo width to center text */
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: #81c784;
    color: #2e4d2e;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.icon-btn:hover {
    background-color: #81c784;
    color: #2e4d2e;
}

/* Auto-scroll banner styles */
.banners-scroll {
    display: flex;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 500px;
    background-color: #f0f8f0;
}

.banners-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    height: 500px;
}

.banner-item {
    flex: 0 0 100%;
    width: 100%;
    height: 500px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(46, 77, 46, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    position: relative;
}

/* Navigation arrows */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(46, 125, 50, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-arrow:hover {
    background-color: rgba(46, 125, 50, 0.9);
}

.banner-arrow.prev {
    left: 20px;
}

.banner-arrow.next {
    right: 20px;
}

.banner-arrow:focus {
    outline: none;
}

.banner-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #c8e6c9;
    border-radius: 10px;
    z-index: 0;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(46, 77, 46, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.banner-dot.active {
    background-color: #2e7d32;
}

/* Night Mode */
body.night-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.night-mode .main-header {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.night-mode .nav-btn {
    color: #e0e0e0;
}

body.night-mode .nav-btn:hover {
    background-color: #388e3c;
    color: #a5d6a7;
}

body.night-mode .header-right .icon-btn {
    color: #e0e0e0;
}

body.night-mode .banner-item {
    background-color: #2c2c2c;
    box-shadow: 0 0 8px rgba(165, 214, 167, 0.5);
}

body.night-mode .banner-image-placeholder {
    background-color: #388e3c;
}

body.night-mode .banner-dot {
    background-color: rgba(165, 214, 167, 0.3);
}

body.night-mode .banner-dot.active {
    background-color: #81c784;
}

/* Hide mobile banners by default */
.mobile-banners {
    display: none;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .nav-buttons {
        display: none; /* Hide nav buttons on mobile */
    }

    .hamburger-menu {
        display: block; /* Show hamburger menu on mobile */
        order: -1; /* Move hamburger to left */
    }

    body:has(.page-container) .hamburger-menu {
        display: block; /* Show hamburger on mobile for page-container pages */
    }

    .logo-container {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        order: unset;
    }

    .site-name {
        order: 0; /* Keep site name in center */
        text-align: center;
        flex: 1;
        margin-left: 0; /* Remove margin for centering */
    }

    body:has(.page-container) .site-name {
        font-size: 0.8rem; /* Smaller site name on mobile */
    }

    .header-right .icon-btn {
        display: none; /* Hide night mode button from header on mobile */
    }

    .meet-founder-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-us {
        margin-top: 1rem;
    }

    .special-education-topics.container {
        grid-template-columns: 1fr;
        margin: 1rem;
    }

    .banners-container {
        display: none !important;
    }

    .mobile-banners {
        display: block !important;
        position: relative;
        width: 100%;
        height: 500px;
        overflow: hidden;
    }

    .mobile-banner-item {
        display: none;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }



    .mobile-banner-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .mobile-banner-dots {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        z-index: 10;
    }

    .mobile-banner-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: rgba(46, 77, 46, 0.3);
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .mobile-banner-dot.active {
        background-color: #2e7d32;
    }

    .banner-arrow {
        display: none !important;
    }

    .banner-dots {
        display: none !important;
    }
}

/* Ensure hamburger menu is hidden on desktop */
@media (min-width: 769px) {
    .hamburger-menu {
        display: none !important;
    }

    .mobile-banners {
        display: none !important;
    }

    body:has(.page-container) .logo-container {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
}

@media (max-width: 600px) {
    .main-header {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0.5rem;
    }

    .logo-image {
        width: 35px;
        height: 35px;
    }

    .site-name {
        font-size: 1.4rem;
        margin-left: -35px;
    }
}

/* Know More Sections */
.know-more-section {
    display: none;
    background-color: white;
    padding: 2rem;
    margin: 1rem 0;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(46, 77, 46, 0.15);
}

.know-more-section h2 {
    color: #2e7d32;
    margin-top: 0;
}

.back-to-home {
    background-color: #2e7d32;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    font-weight: 600;
}

.back-to-home:hover {
    background-color: #1b5e20;
}

/* Focus Section */
.focus-section {
    background-color: white;
    padding: 2rem;
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.focus-content {
    max-width: 960px;
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.focus-content h2 {
    color: #2e7d32;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #a5d6a7;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.focus-content p {
    color: #4a6f4a;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.focus-content p:last-child {
    margin-bottom: 0;
}

/* Night mode for focus section */
body.night-mode .focus-section {
    background-color: #2c2c2c;
}

body.night-mode .focus-content h2 {
    color: #81c784;
    border-bottom-color: #388e3c;
}

body.night-mode .focus-content p {
    color: #e0e0e0;
}

/* Start Screen */
.start-screen {
    background-color: white;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.about-us-container {
    display: flex;
    justify-content: center;
    max-width: 960px;
    width: 100%;
}

.about-us-container .about-us {
    max-width: 960px;
    width: 100%;
    text-align: center;
}

.meet-founder-container {
    display: flex;
    align-items: flex-start;
    max-width: 960px;
    width: 100%;
    gap: 2rem;
}

.photo-circle {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(46, 77, 46, 0.3);
}

.photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-us {
    flex-grow: 1;
}

.about-us h2 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 0.5rem;
    text-align: center;
    border-bottom: 3px solid #a5d6a7;
    padding-bottom: 0.5rem;
    display: inline-block;
    width: 100%;
}

.about-us p {
    color: #4a6f4a;
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
}

/* Special Education Topics */
.special-education-topics.container {
    max-width: 960px;
    margin: 2rem auto 4rem auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.topic-box {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 0 10px rgba(46, 77, 46, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.topic-box h3 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.topic-box p {
    flex-grow: 1;
    color: #4a6f4a;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.btn-rectangle.know-more {
    background-color: #a5d6a7;
    border: none;
    color: #2e4d2e;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-rectangle.know-more:hover {
    background-color: #81c784;
}

/* Footer */
footer {
    background-color: #2e7d32;
    color: white;
    text-align: center;
    padding: 1rem 0;
    position: static;
    width: 100%;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .meet-founder-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .about-us {
        margin-top: 1rem;
    }
    .special-education-topics.container {
        grid-template-columns: 1fr;
        margin: 1rem;
    }
}

@media (max-width: 600px) {
    .top-articles-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .articles-scroll {
        margin: 1rem 0;
        width: 100%;
    }
    .btn-rounded.know-more-top {
        width: 100%;
        text-align: center;
    }
}

/* Additional styles for individual pages */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    background-color: #2e7d32;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 10px;
}

.page-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(46, 77, 46, 0.15);
    margin-bottom: 2rem;
}

.content-section {
    margin-bottom: 2rem;
}

.content-section h2 {
    color: #2e7d32;
    border-bottom: 2px solid #a5d6a7;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.content-section p {
    color: #4a6f4a;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.content-section ul {
    color: #4a6f4a;
    line-height: 1.6;
    margin-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

.return-home-container {
    text-align: center;
    margin: 3rem 0;
    margin-top: 5px;
}

.return-home-btn {
    background-color: #2e7d32;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.return-home-btn:hover {
    background-color: #1b5e20;
}

/* Data entry areas */
.data-entry-area {
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
    min-height: 100px;
}

.data-entry-area:focus {
    outline: 2px solid #2e7d32;
    background-color: white;
}

/* Night mode for pages */
body.night-mode .page-container {
    background-color: #1e1e1e;
}

body.night-mode .page-content {
    background-color: #2c2c2c;
    color: #e0e0e0;
}

body.night-mode .content-section h2 {
    color: #81c784;
    border-bottom-color: #388e3c;
}

body.night-mode .content-section p,
body.night-mode .content-section ul,
body.night-mode .content-section li {
    color: #e0e0e0;
}

body.night-mode .data-entry-area {
    background-color: #333;
    border-color: #555;
    color: #e0e0e0;
}

/* Appointment Section */
.appointment-section {
    background-color: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(46, 77, 46, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.appointment-text {
    flex: 1;
    text-align: left;
}

.appointment-section h2 {
    color: #2e7d32;
    margin-bottom: 1rem;
    font-size: 3rem;
}

.appointment-section p {
    color: #4a6f4a;
    margin-bottom: 2rem;
}

#calendar {
    flex: 1;
    max-width: 900px;
}

/* Night mode for appointment section */
body.night-mode .appointment-section {
    background-color: #2c2c2c;
}

body.night-mode .appointment-section h2 {
    color: #81c784;
}

body.night-mode .appointment-section p {
    color: #e0e0e0;
}

/* Popup overlay for time slot selection */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Popup content box */
.popup-content {
    background-color: white;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    width: 320px;
    max-width: 90%;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2e7d32;
    cursor: pointer;
}

/* Time slots container */
.time-slots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

/* Individual time slot buttons */
.time-slot {
    background-color: #a5d6a7;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    color: #2e4d2e;
    transition: background-color 0.3s ease;
    min-width: 80px;
}

.time-slot:hover {
    background-color: #81c784;
}

/* Selected time slot */
.time-slot.selected {
    background-color: #2e7d32;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Confirm booking button */
#confirmBooking {
    background-color: #2e7d32;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

#confirmBooking:hover {
    background-color: #1b5e20;
}

/* Night mode for start-screen (About Us and Meet Founder) */
body.night-mode .start-screen {
    background-color: #2c2c2c;
}

body.night-mode .about-us h2 {
    color: #81c784;
    border-bottom-color: #388e3c;
}

body.night-mode .about-us p {
    color: #e0e0e0;
}

body.night-mode .photo-circle {
    box-shadow: 0 0 10px rgba(165, 214, 167, 0.3);
}

/* Night mode for topic boxes */
body.night-mode .topic-box {
    background-color: #2c2c2c;
}

body.night-mode .topic-box h3 {
    color: #81c784;
}

body.night-mode .topic-box p {
    color: #e0e0e0;
}

body.night-mode .topic-subtext {
    color: #e0e0e0;
}

body.night-mode .btn-rectangle.know-more {
    background-color: #388e3c;
    color: #e0e0e0;
}

body.night-mode .btn-rectangle.know-more:hover {
    background-color: #81c784;
}

/* Responsive for appointment section */
@media (max-width: 768px) {
    .appointment-section {
        flex-direction: column;
        text-align: center;
    }
    .appointment-text {
        text-align: center;
    }
    .appointment-section h2 {
        font-size: 2rem;
    }
}

/* Holiday styling for calendar */
.fc-daygrid-day.holiday {
    background-color: #f0f0f0 !important;
    pointer-events: none;
    opacity: 0.5;
}

/* Night mode for holiday */
body.night-mode .fc-daygrid-day.holiday {
    background-color: #555 !important;
}

/* Night mode for calendar weekday headers */
body.night-mode .fc-col-header-cell {
    color: black !important;
}

/* Night mode for popup text */
body.night-mode .popup-content {
    color: black !important;
}

/* Mobile calendar styles */
.mobile-calendar {
    text-align: center;
}

#mobileDatePicker {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 200px;
    max-width: 90%;
}
