/*
Theme Name: GeneratePress NL School Child
Description: Child theme for GeneratePress styled like Nederlandse School Taipei
Author: Custom
Template: generatepress
Version: 1.0.0
*/

/* Import parent theme styles */
@import url("../generatepress/style.css");

/* CSS Variables for consistent theming */
:root {
    --nl-school-orange: #F15A22;
    --nl-school-blue: #3E4A99;
    --nl-school-gray: #6B6B6B;
    --nl-school-light-gray: #F5F5F5;
    --header-height: 120px;
}

/* Top Contact Bar */
.top-contact-bar {
    background: var(--nl-school-orange);
    color: white;
    font-size: 14px;
    padding: 8px 0;
    text-align: center;
}

.top-contact-bar .inside-top-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.top-contact-bar a {
    color: white;
    text-decoration: none;
}

.top-contact-bar a:hover {
    text-decoration: underline;
}

/* Font Awesome icon styling */
.top-contact-bar i {
    margin-right: 5px;
    font-size: 14px;
}

/* Header Styling */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.inside-header {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px;
}

/* Logo styling - using default GeneratePress branding */
.site-logo img {
    height: 80px;
    width: auto;
    padding: 15px;
    object-fit: contain;
}

/* Navigation Styling */
.main-navigation .inside-navigation {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 15px 20px;
    color: var(--nl-school-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: var(--nl-school-orange);
    color: white;
}

/* Non-clickable menu items - Desktop only */
@media (min-width: 769px) {
    .main-navigation .non-clickable-item > a.non-clickable {
        cursor: default;
        pointer-events: none;
    }

    .main-navigation .non-clickable-item > a.non-clickable:hover {
        background: transparent;
        color: var(--nl-school-blue);
    }

    /* Ensure dropdown still works for non-clickable parent items */
    .main-navigation .non-clickable-item:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Mobile: Make non-clickable items clickable to expand submenus */
@media (max-width: 768px) {
    .main-navigation .non-clickable-item > a.non-clickable {
        cursor: pointer;
        pointer-events: auto;
    }
}

/* Dropdown Menus */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    flex-direction: column;
}

.main-navigation li:hover > ul,
.main-navigation li.sfHover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul a {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
}

.main-navigation ul ul a:hover {
    background: var(--nl-school-light-gray);
    color: var(--nl-school-blue);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--nl-school-orange);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
}

/* Override parent theme mobile menu toggle background */
.mobile-menu-control-wrapper .menu-toggle {
    background-color: #FFF !important;
}

/* Sticky Header Adjustments */
.site-header.scrolled {
    padding: 10px 0;
}

.site-header.scrolled .site-logo img {
    height: 60px;
}

.site-header.scrolled .site-title a {
    font-size: 24px;
}

/* Header social media removed */

/* Mobile Responsive */
@media (max-width: 768px) {
    .has-inline-mobile-toggle #site-navigation.toggled {
        margin-top: 0px !important;
    }

    .top-contact-bar .inside-top-bar {
        flex-direction: column;
        gap: 10px;
        font-size: 12px;
    }
    
    .inside-header {
        padding: 0px;
        flex-direction: column;
    }
    
    /* Site branding uses default GeneratePress styling */
    
    .site-logo img {
        height: 60px;
    }
    
    /* Site title uses default GeneratePress styling */
    
    .menu-toggle {
        display: block;
    }
    
    /* Full width mobile navigation */
    .main-nav {
        width: 100% !important;
    }
    .main-navigation {
        /* width: 100vw; */
        display: grid !important;
        grid-template-rows: 0fr;
        /* margin-left: calc(-50vw + 50%); */
        position: relative;
        transition: grid-template-rows 0.3s ease;
    }
    
    .main-navigation .inside-navigation {
        padding: 0;
        max-width: none;
        width: 100%;
        overflow: hidden;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .main-navigation.toggled {
        grid-template-rows: 1fr;
    }
    
    .main-navigation a {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        width: 100%;
        text-align: left;
    }

    .main-navigation a:first-child {
        border-top: 1px solid #eee;
    }
    
    .main-navigation .main-nav ul li a {
        line-height: 1.5 !important;
    }

    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--nl-school-light-gray);
        width: 100%;
    }
    
    .main-navigation ul ul a {
        padding-left: 40px;
        background: var(--nl-school-light-gray);
    }

    .sub-menu .menu-item a {
        padding-left: 40px !important;
    }
    /* menu height animation */
    .main-navigation.toggled {
        transition: all 0.3s ease;
    }
}

/* Smooth scrolling and anchor offsets */
html {
    scroll-behavior: smooth;
}

:target {
    scroll-margin-top: 140px;
}

@media (max-width: 768px) {
    :target {
        scroll-margin-top: 120px;
    }
}

