/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/
/* Container Layout */
.ecd-container {
    max-width: 1200px;
    margin: 40px auto;
    display: flex;
    gap: 50px;
    padding: 0 20px;
}
/* Header Container */
.site-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9); /* Translucent white */
    backdrop-filter: blur(10px);          /* Glass effect */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    padding: 15px 0;
}

/* Shadow on scroll (Optional: applied via JS or just always on) */
.site-header {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

/* Logo */
.site-branding img {
    max-height: 50px;
    width: auto;
}
.site-title {
    font-weight: 800;
    font-size: 1.5rem;
    text-decoration: none;
    color: #2c3e50;
}
/* --- Submenu Base Styles --- */

/* 1. Add a small arrow to parent items */
.main-navigation li.menu-item-has-children > a::after {
    content: '▾';
    margin-left: 6px;
    font-size: 0.8rem;
    vertical-align: middle;
    display: inline-block;
    transition: transform 0.3s ease;
}

.main-navigation li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* 2. Position the Submenu */
.main-navigation li {
    position: relative; /* Essential for absolute positioning of child */
}

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    padding: 10px 0;
    margin: 0;
    list-style: none;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    
    /* Animation: Hidden State */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
}

/* 3. Show Submenu on Hover */
.main-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 4. Submenu Item Styling */
.main-navigation .sub-menu li {
    width: 100%;
    padding: 0;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 0.95rem;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Hover effect for items in the dropdown */
.main-navigation .sub-menu a:hover {
    background-color: #f8fafc;
    color: #3498db;
    padding-left: 25px; /* Slight slide effect */
}

/* Handle nested sub-menus (3rd level) if needed */
.main-navigation .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 2px;
}
/* The "Invisible Bridge" to prevent accidental closing */
.main-navigation .sub-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}
/* Navigation */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

.main-navigation a:hover {
    color: #3498db;
}

/* Actions & CTA */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #2c3e50;
    padding: 5px;
}

.header-cta {
    background-color: #3498db;
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, background 0.2s;
}

.header-cta:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-navigation { display: none; } /* You would typically add a Hamburger menu here */
    .header-cta { display: none; }
}

.ecd-main-content {
    flex: 2; /* Takes up 2/3 of space */
    min-width: 0; /* Prevents overflow */
}

.ecd-sidebar {
    flex: 1; /* Takes up 1/3 of space */
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Typography */
.ecd-post-title {
    font-size: 2.5rem;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 15px;
    font-weight: 700;
}

.ecd-post-meta {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}
/* Category Pills Styling */
.ecd-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-pill {
    background-color: #f0f4f8; /* Very light blue/grey */
    color: #3498db;           /* Main theme blue */
    padding: 6px 16px;
    border-radius: 50px;      /* Creates the "pill" shape */
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* Hover Effect */
.category-pill:hover {
    background-color: #3498db;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

/* Optional: Different colors for specific categories 
   (Replace 'classroom-management' with your actual category slug) */
.category-pill.pill-classroom-management {
    background-color: #e8f5e9;
    color: #2e7d32;
}
.category-pill.pill-classroom-management:hover {
    background-color: #2e7d32;
    color: #fff;
}

/* Adjusting spacing for the meta below pills */
.ecd-post-meta {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.ecd-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}

.ecd-content h2 { margin-top: 40px; color: #2c3e50; }

/* Images */
.ecd-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 30px;
}

/* Breadcrumbs */
.ecd-breadcrumbs {
    font-size: 0.85rem;
    color: #95a5a6;
    margin-bottom: 20px;
}
.ecd-breadcrumbs a { text-decoration: none; color: #3498db; }

/* Author Box */
.ecd-author-box {
    display: flex;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    margin-top: 50px;
    align-items: center;
    gap: 20px;
}

.author-avatar img { border-radius: 50%; }
.author-info h3 { margin: 0 0 10px 0; font-size: 1.2rem; }

/* Sidebar Widgets */
.widget {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 992px) {
    .ecd-container { flex-direction: column; }
    .ecd-sidebar { order: 2; }
}
/* 1. The Toggle Button Container */
.mobile-nav-toggle {
    display: none; /* Hidden on desktop */
    background: #f8fafc; /* Light grey background so you can see the button area */
    border: 1px solid #e2e8f0;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10001;
    width: 44px;  /* Fixed size for touch targets */
    height: 44px;
    position: relative;
}

/* 2. Show button on screens smaller than 991px */
@media (max-width: 991px) {
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 3. The Three Bars (Hamburger) */
.menu-icon-container {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-icon-container span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #2c3e50; /* DARK BLUE/BLACK - ensure this isn't white! */
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

/* --- OPTIONAL: Switch to Three Dots Style --- 
   If you want dots instead of bars, uncomment the code below: */
/*
.menu-icon-container {
    width: 6px;
    height: 24px;
}
.menu-icon-container span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
*/

/* 4. Animation to 'X' when Open */
.mobile-menu-open .menu-icon-container span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.mobile-menu-open .menu-icon-container span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}
.mobile-menu-open .menu-icon-container span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}