/**
 * Lamyx Design System: layout.css
 * Page Structure, Grid Systems, Header, Footer & Navbars
 */

/* --- BASE STYLES --- */
body {
    background-color: var(--base-white);
    color: var(--text-charcoal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.7;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(90, 45, 160, 0.02) 0%, transparent 45%),
        radial-gradient(circle at 90% 90%, rgba(49, 194, 196, 0.02) 0%, transparent 45%);
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width) !important;
    margin-left: auto;
    margin-right: auto;
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--surface-light);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- FLOATING HEADER --- */
#global-header {
    transition: all 0.3s ease;
}

#global-header.scrolled {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border-light) !important;
    margin: 1rem 2rem;
    border-radius: var(--radius-md);
    width: calc(100% - 4rem);
    top: 0;
    box-shadow: var(--shadow-sm), 0 1px 3px rgba(90, 45, 160, 0.03);
}

@media (max-width: 768px) {
    #global-header.scrolled {
        margin: 0.5rem 0.75rem;
        width: calc(100% - 1.5rem);
        border-radius: var(--radius-md);
    }
}

/* Header Links Hover Indicator (Desktop Only) */
#global-header .lg\:flex button, 
#global-header .lg\:flex a {
    position: relative;
    color: var(--text-charcoal) !important;
    font-weight: 700;
    transition: all 0.3s ease;
}

#global-header .lg\:flex button::after, 
#global-header .lg\:flex a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 24px;
    height: 3px;
    background: var(--brand-purple);
    border-radius: 99px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#global-header .lg\:flex button:hover, 
#global-header .lg\:flex a:hover,
#global-header .lg\:flex .group:hover > button, 
#global-header .lg\:flex .group:hover > a {
    color: var(--brand-purple) !important;
}

#global-header .lg\:flex button:hover::after, 
#global-header .lg\:flex a:hover::after,
#global-header .lg\:flex .group:hover > button::after, 
#global-header .lg\:flex .group:hover > a::after {
    transform: translateX(-50%) scaleX(1);
}

/* --- MEGA MENU --- */
.mega-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    position: absolute;
    top: 100%;
    right: 0;
    box-shadow: var(--shadow-lg);
}

[dir="ltr"] .mega-menu {
    right: auto;
    left: 0;
}

.group:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    transition: all 0.25s ease;
    border-radius: var(--radius-md);
}

.menu-item:hover { 
    background: var(--surface-light); 
    transform: translateX(4px); 
    color: var(--brand-purple);
}
[dir="rtl"] .menu-item:hover { 
    transform: translateX(-4px); 
}

.menu-item:hover h4 {
    color: var(--brand-purple) !important;
}

.menu-icon {
    font-size: 1.25rem;
    color: var(--brand-purple);
}

/* --- MOBILE DRAWER OVERLAY --- */
#mobile-drawer {
    background: rgba(255, 255, 255, 0.98);
    color: var(--text-charcoal);
}

.mobile-accordion button {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

.accordion-content {
    border-right-color: rgba(90, 45, 160, 0.15) !important;
}

/* --- GLOW EFFECTS (LIGHT THEME) --- */
.fixed.inset-0.z-\[-1\] {
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(90, 45, 160, 0.035) 0%, transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(49, 194, 196, 0.035) 0%, transparent 50%);
}
.fixed.inset-0.z-\[-1\] > div {
    display: none !important; /* Prevents raw dark theme objects from showing */
}
