/*
Theme Name: The Green Broom
Author: Custom
Description: Bespoke theme with custom drag-and-drop navigation.
Version: 1.2
*/

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
   :root {
    --bg-color: #F5F5EF;       /* Cream Base */
    --text-color: #111111;     /* Sharp Black */
    --brand-green: #2D4A2B;    /* Matches "Try it free" button in screenshot */
    --font-main: 'Geist Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --header-height: 80px;
    --container-width: 1300px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: var(--font-main);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: opacity 0.2s ease; }
ul { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================
   2. LAYOUT UTILITIES
   ========================================= */
#page { display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; width: 100%; }

/* =========================================
   3. HEADER (DESKTOP)
   ========================================= */
.site-header {
    background-color: var(--bg-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* No border bottom in screenshot, clean look */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 40px; /* Outer spacing */
}

/* --- BRANDING --- */
.site-branding a {
    display: block;
    text-decoration: none;
}

/* Desktop Logo Image */
.logo-desktop {
    height: 38px; /* Restricts height to fit header nicely */
    width: auto;
}
.logo-mobile { display: none; }


/* --- MAIN NAV (True Center) --- */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.menu-item { position: relative; }

.menu-item > a {
    font-weight: 600;
    font-size: 15px;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between text and chevron */
}

.dropdown-icon svg {
    display: block;
    transition: transform 0.2s ease;
    opacity: 0.8;
}

.menu-item:hover .dropdown-icon svg {
    transform: rotate(180deg);
}

/* Dropdown styling */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.menu-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 6px;
    color: #444;
    font-weight: 500;
}

.sub-menu li a:hover {
    background: #f4f4f0;
    color: #000;
}


/* --- RIGHT ACTIONS (The specific layout from screenshot) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    
    /* The vertical divider line logic */
    padding-left: 1.5rem;
    border-left: 1px solid #D0D0D0; /* Thin grey line */
    height: 32px; /* Fixed height for the line */
}

.nav-login {
    font-weight: 600;
    font-size: 15px;
    color: #111;
}

.nav-cta {
    background-color: var(--brand-green);
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

.nav-cta:hover {
    background-color: #1e331d;
}

.menu-toggle { display: none; }


/* =========================================
   4. MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 991px) {
    
    .header-inner { margin: 0 20px; }

    /* Logo Swap */
    .logo-desktop { display: none; }
    .logo-mobile { 
        display: block; 
        height: 32px; /* Icon Size */
        width: auto;
    }

    /* Reset Layout for Mobile */
    .main-navigation, 
    .nav-login, 
    .nav-cta {
        display: none; /* Moved into drawer */
    }

    /* Remove divider on mobile */
    .header-actions {
        border-left: none; 
        padding-left: 0;
        height: auto;
        gap: 0;
    }
    
    /* Hamburger */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        color: #000;
    }
    
    .hamburger-box { width: 24px; height: 24px; display: block; position: relative; }
    
    .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
        width: 24px; height: 2px; background-color: #000; position: absolute; left: 0; content: ''; transition: all 0.2s ease;
    }
    .hamburger-inner { top: 11px; }
    .hamburger-inner::before { top: -8px; }
    .hamburger-inner::after { top: 8px; }

    /* Mobile Drawer Open */
    .site-header.tgb-nav-open .hamburger-inner { background: transparent; }
    .site-header.tgb-nav-open .hamburger-inner::before { top: 0; transform: rotate(45deg); }
    .site-header.tgb-nav-open .hamburger-inner::after { top: 0; transform: rotate(-45deg); }

    .site-header.tgb-nav-open .main-navigation {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0; right: 0;
        background: var(--bg-color);
        height: calc(100vh - var(--header-height));
        padding: 2rem;
        z-index: 999;
    }

    .nav-menu { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
    .menu-item { width: 100%; border-bottom: 1px solid rgba(0,0,0,0.05); padding: 1.2rem 0; }
    .menu-item > a { justify-content: space-between; font-size: 18px; }
    
    .sub-menu {
        position: static;
        transform: none;
        box-shadow: none;
        display: none;
        padding: 10px 0 0 10px;
        opacity: 1; visibility: visible;
        background: transparent;
        border: none;
    }
    .menu-item.tgb-submenu-open .sub-menu { display: block; }
}

/* =========================================
   5. FOOTER (Columns)
   ========================================= */
.site-footer {
    background-color: #EAEAE4;
    padding: 4rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3rem;
}

.footer-branding { flex: 1; min-width: 200px; }
.site-title-footer { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; }
.copyright { font-size: 0.85rem; opacity: 0.6; }

.footer-columns-wrapper {
    flex: 2;
    display: flex;
    justify-content: flex-end;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-column { min-width: 120px; }
.footer-col-title { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.5; margin-bottom: 1.2rem; }

.footer-menu li { margin-bottom: 0.8rem; }
.footer-menu li a { font-size: 0.95rem; color: var(--text-color); opacity: 0.8; }
.footer-menu li a:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 768px) {
    .footer-container { flex-direction: column; }
    .footer-columns-wrapper { justify-content: flex-start; gap: 2rem; }
    .footer-column { flex: 1 1 45%; }
}