/* ===== STRUCTURED HEADER SYSTEM ===== */
/* Clear conditions and limits for all platforms */

/* ===== BASE HEADER STRUCTURE ===== */
.circular-header {
    /* Core positioning - ALWAYS applied */
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    
    /* Visual styling - ALWAYS applied */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Base dimensions - DEFAULT values for desktop */
    width: 1200px;
    max-width: calc(100vw - 2rem);
    min-width: 320px;
    height: 48px;
    padding: 0.5rem 1.5rem;
    
    /* Layout structure - ALWAYS applied */
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: hidden;
}

/* ===== HEADER CONTENT STRUCTURE ===== */
.circular-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    gap: 0.5rem;
}

/* ===== LOGO SECTION ===== */
.circular-header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.circular-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #111111;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.2s ease;
}

.circular-logo-link:hover {
    color: #5DBB8A;
}

.circular-logo-text {
    color: #111111;
    display: inline;
}

.circular-logo-subtitle {
    color: #5DBB8A;
    margin-left: 0.25rem;
    font-size: 0.875rem;
    display: inline;
}

/* ===== RESPONSIVE BREAKPOINTS - NO JAVASCRIPT NEEDED ===== */

/* Mobile styles - Optimized positioning */
@media (max-width: 767px) {
    .circular-header {
        width: calc(100vw - 1.5rem);
        max-width: calc(100vw - 1.5rem);
        min-width: 300px;
        height: 48px;
        top: 16px;
        padding: 0.5rem 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }
    
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: none !important;
    }
    
    .circular-mobile-toggle {
        display: flex !important;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .circular-header {
        width: 1000px;
        min-width: 600px;
        height: 48px;
        top: 60px;
        padding: 0.5rem 1.25rem;
    }
    
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: none !important;
    }
    
    .circular-mobile-toggle {
        display: flex !important;
    }
}

/* Desktop Small styles */
@media (min-width: 1024px) and (max-width: 1199px) {
    .circular-header {
        width: 1000px;
        min-width: 800px;
        height: 48px;
        top: 60px;
        padding: 0.5rem 1.25rem;
    }
    
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: flex !important;
    }
    
    .circular-mobile-toggle {
        display: none !important;
    }
}

/* Desktop Standard styles */
@media (min-width: 1200px) and (max-width: 1399px) {
    .circular-header {
        width: 1200px;
        min-width: 1000px;
        height: 48px;
        top: 60px;
        padding: 0.5rem 1.5rem;
    }
    
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: flex !important;
    }
    
    .circular-mobile-toggle {
        display: none !important;
    }
}

/* Desktop Large styles */
@media (min-width: 1400px) {
    .circular-header {
        width: 1200px;
        min-width: 1200px;
        height: 52px;
        top: 60px;
        padding: 0.625rem 1.25rem;
    }
    
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: flex !important;
    }
    
    .circular-mobile-toggle {
        display: none !important;
    }
}

/* ===== DESKTOP NAVIGATION ===== */
.circular-desktop-nav {
    display: none; /* Hidden by default - CSS media queries will override */
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.circular-nav-item {
    position: relative;
}

.circular-nav-link {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    color: #111111;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.circular-nav-link:hover {
    background: #f0fdf4;
    color: #5DBB8A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 187, 138, 0.2);
    border-color: #5DBB8A;
}

/* ===== DESKTOP ACTIONS ===== */
.circular-desktop-actions {
    display: none; /* Hidden by default */
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.circular-cta-button {
    display: flex;
    align-items: center;
    padding: 0.25rem 1rem;
    background: #5DBB8A;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.circular-cta-button:hover {
    background: #4ca87a;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(93, 187, 138, 0.3);
}

/* ===== MOBILE TOGGLE ===== */
.circular-mobile-toggle {
    display: flex; /* Visible by default */
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.circular-mobile-toggle:hover {
    background: #f0fdf4;
    border-color: #5DBB8A;
    transform: scale(1.05);
}

.circular-hamburger {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.circular-hamburger-line {
    width: 18px;
    height: 2px;
    background: #111111;
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MOBILE MENU ===== */
.circular-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.circular-mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.circular-mobile-menu-content {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 2rem);
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 88px;
    padding: 1.5rem;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.circular-mobile-menu.active .circular-mobile-menu-content {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.circular-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.circular-mobile-menu-logo {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111111;
}

.circular-mobile-menu-close {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    color: #111111;
    cursor: pointer;
    transition: all 0.2s ease;
}

.circular-mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.circular-mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.circular-mobile-menu-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #111111;
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.circular-mobile-menu-nav a:hover {
    background: #f0fdf4;
    color: #5DBB8A;
}

.circular-mobile-menu-cta {
    display: flex;
    justify-content: center;
}

.circular-mobile-menu-cta-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #5DBB8A;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.circular-mobile-menu-cta-btn:hover {
    background: #4ca87a;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(93, 187, 138, 0.3);
}

/* ===== PLATFORM CONDITIONS AND LIMITS ===== */

/* CONDITION 1: Mobile Devices (up to 767px) - SIZE-BASED RULES */
@media (max-width: 767px) {
    .circular-header {
        /* SIZE RULE: Small screen, touch interface */
        width: calc(100vw - 2rem) !important;
        max-width: calc(100vw - 2rem) !important;
        min-width: 320px !important;
        height: 44px !important;
        padding: 0.375rem 1rem !important;
        top: 30px !important;
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 999 !important;
    }
    
    .circular-header-content {
        height: 36px;
        gap: 0.5rem;
    }
    
    .circular-logo-link {
        font-size: 1rem;
    }
    
    .circular-logo-subtitle {
        font-size: 0.75rem;
    }
    
    .circular-mobile-toggle {
        width: 28px;
        height: 28px;
    }
    
    .circular-hamburger-line {
        width: 16px;
    }
    
    .circular-mobile-menu-content {
        margin-top: 58px;
        width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
    }
    
    /* RULE: Hide desktop elements on mobile */
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: none !important;
    }
    
    /* RULE: Show mobile toggle */
    .circular-mobile-toggle {
        display: flex !important;
    }
}

/* SIZE RULE: Extra small mobile (up to 480px) - Optimized */
@media (max-width: 480px) {
    .circular-header {
        top: 12px !important;
        height: 44px !important;
        padding: 0.375rem 0.875rem !important;
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
    }
    
    .circular-header-content {
        height: 36px !important;
        gap: 0.5rem !important;
    }
    
    .circular-logo-link {
        font-size: 0.95rem !important;
    }
    
    .circular-logo-subtitle {
        font-size: 0.7rem !important;
    }
    
    .circular-mobile-toggle {
        width: 36px !important;
        height: 36px !important;
    }
    
    .circular-mobile-menu-content {
        margin-top: 48px !important;
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
    }
}

/* SIZE RULE: Small mobile (481px - 600px) - Optimized */
@media (min-width: 481px) and (max-width: 600px) {
    .circular-header {
        top: 14px !important;
        height: 46px !important;
        padding: 0.4375rem 0.9375rem !important;
    }
    
    .circular-header-content {
        height: 38px !important;
    }
    
    .circular-mobile-menu-content {
        margin-top: 52px !important;
    }
}

/* SIZE RULE: Medium mobile (601px - 767px) - Optimized */
@media (min-width: 601px) and (max-width: 767px) {
    .circular-header {
        top: 16px !important;
        height: 48px !important;
        padding: 0.5rem 1rem !important;
    }
    
    .circular-header-content {
        height: 40px !important;
    }
    
    .circular-mobile-menu-content {
        margin-top: 56px !important;
    }
}

/* CONDITION 2: Tablet Portrait (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .circular-header {
        /* LIMITS: Medium screen, touch/pointer interface */
        width: 1000px;
        max-width: calc(100vw - 2rem);
        min-width: 600px;
        height: 48px;
        padding: 0.5rem 1.25rem;
        top: 60px;
    }
    
    .circular-header-content {
        height: 40px;
        gap: 0.5rem;
    }
    
    .circular-logo-link {
        font-size: 1.125rem;
    }
    
    .circular-logo-subtitle {
        font-size: 0.875rem;
    }
    
    .circular-mobile-toggle {
        width: 32px;
        height: 32px;
    }
    
    /* RULE: Hide desktop elements on tablet portrait */
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: none !important;
    }
    
    /* RULE: Show mobile toggle */
    .circular-mobile-toggle {
        display: flex !important;
    }
}

/* CONDITION 3: PC Desktop Small (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .circular-header {
        /* LIMITS: Desktop screen, mouse interface */
        width: 1000px;
        max-width: calc(100vw - 2rem);
        min-width: 800px;
        height: 48px;
        padding: 0.5rem 1.25rem;
        top: 60px;
    }
    
    .circular-header-content {
        height: 40px;
        gap: 0.5rem;
    }
    
    .circular-nav-link {
        padding: 0.25rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .circular-cta-button {
        padding: 0.25rem 1rem;
        font-size: 0.875rem;
    }
    
    /* RULE: Show desktop elements on PC */
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: flex !important;
    }
    
    /* RULE: Hide mobile toggle on PC */
    .circular-mobile-toggle {
        display: none !important;
    }
}

/* CONDITION 4: PC Desktop Standard (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .circular-header {
        /* LIMITS: Standard desktop screen */
        width: 1200px;
        max-width: calc(100vw - 2rem);
        min-width: 1000px;
        height: 48px;
        padding: 0.5rem 1.5rem;
        top: 60px;
    }
    
    .circular-header-content {
        height: 40px;
        gap: 0.75rem;
    }
    
    .circular-desktop-nav {
        gap: 1rem;
    }
    
    .circular-desktop-actions {
        gap: 0.75rem;
    }
    
    .circular-nav-link {
        padding: 0.375rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .circular-cta-button {
        padding: 0.375rem 1.125rem;
        font-size: 0.875rem;
    }
    
    /* RULE: Show desktop elements on PC */
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: flex !important;
    }
    
    /* RULE: Hide mobile toggle on PC */
    .circular-mobile-toggle {
        display: none !important;
    }
}

/* CONDITION 5: PC Desktop Large (1400px+) */
@media (min-width: 1400px) {
    .circular-header {
        /* LIMITS: Large desktop screen */
        width: 1200px;
        max-width: 1200px;
        min-width: 1200px;
        height: 52px;
        padding: 0.625rem 1.25rem;
        top: 60px;
    }
    
    .circular-header-content {
        height: 44px;
        gap: 1rem;
    }
    
    .circular-desktop-nav {
        gap: 1.5rem;
    }
    
    .circular-desktop-actions {
        gap: 1rem;
    }
    
    .circular-nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .circular-cta-button {
        padding: 0.5rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* RULE: Show desktop elements on PC */
    .circular-desktop-nav,
    .circular-desktop-actions {
        display: flex !important;
    }
    
    /* RULE: Hide mobile toggle on PC */
    .circular-mobile-toggle {
        display: none !important;
    }
}

/* CONDITION 6: Portrait Orientation (height constraints) */
@media (max-height: 600px) and (min-width: 1024px) {
    .circular-header {
        /* LIMITS: Short screen height */
        top: 40px;
        height: 40px;
        padding: 0.375rem 1rem;
    }
    
    .circular-header-content {
        height: 36px;
    }
    
    .circular-nav-link {
        padding: 0.125rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .circular-cta-button {
        padding: 0.125rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* CONDITION 7: Landscape Orientation (very short height) */
@media (orientation: landscape) and (max-height: 500px) {
    .circular-header {
        /* LIMITS: Very short landscape screen */
        top: 20px;
        height: 36px;
        padding: 0.375rem 1rem;
    }
    
    .circular-header-content {
        height: 32px;
    }
    
    .circular-nav-link {
        padding: 0.125rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .circular-cta-button {
        padding: 0.125rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ===== WORDPRESS ADMIN BAR ADJUSTMENTS ===== */
/* Adjust header position when WordPress admin bar is present */
.admin-bar .circular-header {
    top: 32px !important;
}

@media (max-width: 782px) {
    .admin-bar .circular-header {
        top: 46px !important;
    }
}

/* ===== ACCESSIBILITY CONDITIONS ===== */
@media (prefers-reduced-motion: reduce) {
    .circular-header,
    .circular-nav-link,
    .circular-cta-button,
    .circular-mobile-toggle,
    .circular-mobile-menu {
        transition: none !important;
    }
}

@media (prefers-contrast: high) {
    .circular-header {
        background: rgba(255, 255, 255, 0.98);
        border: 2px solid #000;
    }
    
    .circular-nav-link {
        border: 1px solid #000;
    }
}