/*
Theme Name: Antigravity Custom Theme
Theme URI: https://learning-deck.com
Author: Antigravity
Author URI: https://google.deepmind.com
Description: A custom, lightweight theme with correct branding colors, professional typography, and fixed layout.
Version: 1.4.0
Text Domain: antigravity
*/

/* ==========================================================================
   1. CORE VARIABLES & RESET
   ========================================================================== */
:root {
    --color-primary: #FFA500;
    /* FIXED: Matching Content Orange */
    --color-dark: #333333;
    --color-light: #ffffff;
    --color-text: #4a4a4a;
    --header-height: 100px;
    /* Increased to fit Logo comfortably */
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-primary);
    /* Fallback */
    line-height: 1.6;
}

/* ==========================================================================
   2. KEY LAYOUT CONTAINERS
   ========================================================================== */
#page,
.site-content,
.site-main,
.entry-content {
    background-color: #ffffff !important;
}

.site-content {
    display: block;
    width: 100%;
    min-height: 80vh;
}

/* ==========================================================================
   3. HEADER & NAVIGATION - POLISHED
   ========================================================================== */
.site-header {
    background-color: var(--color-primary);
    color: var(--color-light);
    padding: 0 5%;
    /* Better responsive padding */
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* More subtle shadow */
    position: relative;
    z-index: 1000;
}

/* LOGO FIXES */
.site-branding {
    display: flex;
    align-items: center;
    height: 100%;
    overflow: visible;
    /* Prevent chopping */
}

/* Logo Link wrapper */
.custom-logo-link {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Identify logo image specifically */
.custom-logo {
    height: auto !important;
    max-height: 70px !important;
    /* Cap height to fit header */
    width: auto !important;
    mix-blend-mode: multiply;
    object-fit: contain !important;
    /* Prevent stretching */
    margin: 0 !important;
    padding: 0 !important;
}

/* Site Title Text */
.site-title-text {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    /* Increased from 2.2rem */
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    margin-left: 15px;
    letter-spacing: 0.05em;
    line-height: 1;
    display: inline-block;
}

/* MENU TYPOGRAPHY & SPACING */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex !important;
    flex-direction: row !important;
    gap: 0;
    /* Control gap via padding for click/tap targets */
    align-items: center;
}

.main-navigation li {
    position: relative;
    margin: 0 5px;
    /* Tiny margin between items */
}

/* Top Level Links */
.main-navigation>div>ul>li>a {
    color: var(--color-light);
    text-decoration: none;
    font-weight: 500;
    /* Cleaner weight */
    font-size: 1.0rem;
    padding: 12px 18px;
    /* Generous clickable area */
    border-radius: 4px;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.main-navigation>div>ul>li>a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* DROPDOWNS - CLEAN & PROFESSIONAL */
.main-navigation ul ul,
.main-navigation .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 10px;
    /* Space between header and menu */
    flex-direction: column !important;
    z-index: 99999;
}

/* The white box itself */
.main-navigation ul ul:before {
    content: '';
    /* This pseudo-element creates the bridge so hover isn't lost */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
}

/* Inner container for styles (targeting the UL directly) */
.main-navigation ul ul {
    background-color: #ffffff;
    min-width: 240px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Flip last 2 menus */
.main-navigation>div>ul>li:nth-last-child(-n+2)>ul,
.main-navigation>div>ul>li:nth-last-child(-n+2)>.sub-menu {
    left: auto !important;
    right: 0 !important;
}

/* Show on hover */
.main-navigation li:hover>ul,
.main-navigation li:hover>.sub-menu {
    display: flex !important;
}

/* Dropdown Links */
.main-navigation ul ul a,
.main-navigation .sub-menu a {
    color: #555;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 400;
    border-bottom: none;
    /* Removed underline/border */
    text-decoration: none;
    /* Ensure no underline */
    background-color: transparent;
    border-radius: 0;
    display: block;
    /* Ensure full width clickable */
    text-align: left;
    /* Fix inconsistent alignment */
}

.main-navigation ul ul a:last-child {
    border-bottom: none;
}

.main-navigation ul ul a:hover,
.main-navigation .sub-menu a:hover {
    background-color: #FFF8F0;
    /* Very light orange tint */
    color: var(--color-primary);
    /* Removed padding-left change to prevent wobble */
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .main-navigation ul {
        display: none !important;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-primary);
        flex-direction: column !important;
        padding: 20px;
    }

    .main-navigation.toggled ul {
        display: flex !important;
    }
}

/* ==========================================================================
   4. LAYOUT WIDTH FIXES
   ========================================================================== */
.elementor-section {
    width: 100%;
}

.elementor-section:not(.elementor-section-stretched) {
    background-color: #ffffff;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.elementor-section-boxed>.elementor-container {
    max-width: 1140px;
    margin: 0 auto;
}

/* ==========================================================================
   5. WOOCOMMERCE FLOATING CART
   ========================================================================== */
#adfy__woofc-trigger {
    background-color: var(--color-light) !important;
    color: var(--color-primary) !important;
    bottom: 30px !important;
    right: 30px !important;
    top: auto !important;
    border-radius: 50% !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999;
}