/*
Theme Name: Aerial Loop Custom Theme
Theme URI: https://aerialloop.com
Author: Antigravity AI
Author URI: https://aerialloop.com
Description: Production-ready, highly-responsive, modern hybrid blog and publishing WordPress theme built for aerialloop.com with glassmorphism, dark/light mode, and 10 dynamic templates.
Version: 1.0.9
Text Domain: aerialloop
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

/* ==========================================================================
   CSS VARIABLES & DESIGN SYSTEM (LIGHT & DARK THEMES)
   ========================================================================== */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Light Palette */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-solid: rgba(255, 255, 255, 0.95);
    --border-color: rgba(226, 232, 240, 0.8);
    --border-hover: rgba(99, 102, 241, 0.4);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Brand Colors */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --primary-glow: rgba(79, 70, 229, 0.15);
    --accent: #06b6d4;
    
    /* Utility Colors */
    --badge-bg: #e0e7ff;
    --badge-text: #3730a3;
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    --card-shadow-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    
    --header-height: 76px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-main: #0b0f19;
    --bg-card: #151c2c;
    --bg-glass: rgba(21, 28, 44, 0.75);
    --bg-glass-solid: rgba(21, 28, 44, 0.95);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(129, 140, 248, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-light: rgba(99, 102, 241, 0.15);
    --primary-glow: rgba(99, 102, 241, 0.25);
    
    --badge-bg: rgba(99, 102, 241, 0.2);
    --badge-text: #a5b4fc;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   GLOBAL BASE STYLES & RESET
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.25;
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Badge Utility */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    background-color: var(--badge-bg);
    color: var(--badge-text);
    transition: var(--transition);
}

.badge:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* Button Component */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-light);
}

.btn-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* ==========================================================================
   COMPONENT 1: GLASSMORPHISM HEADER
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    min-height: 76px;
    height: auto;
    padding: 0.75rem 0;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.site-header.is-scrolled {
    background: var(--bg-glass-solid);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Navigation Links */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Dropdown Mega Menu */
.nav-dropdown {
    position: relative;
}

.mega-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 540px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--card-shadow-hover);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
    z-index: 10000;
}

.nav-dropdown:hover .mega-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-header-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.dropdown-header-badge {
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateX(3px);
}

.desk-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.desk-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.desk-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Search Modal */
.search-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-box {
    width: 100%;
    max-width: 640px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--card-shadow-hover);
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-main);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
}

.search-input-wrap input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
}

/* ==========================================================================
   TAILWIND UTILITY FALLBACKS FOR RELIABLE RENDERING
   ========================================================================== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.hidden { display: none; }
.grid { display: grid; }

.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-center { justify-content: center; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .sm\:flex-row { flex-direction: row; }
    .sm\:inline-flex { display: inline-flex; }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:block { display: block; }
    .lg\:hidden { display: none; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg\:col-span-7 { grid-column: span 7 / span 7; }
    .lg\:col-span-5 { grid-column: span 5 / span 5; }
    .lg\:col-span-12 { grid-column: span 12 / span 12; }
}

/* Padding & Radius Utilities */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* Backgrounds & Colors */
.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-950 { background-color: #020617; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-indigo-950 { background-color: #1e1b4b; }

.text-white { color: #ffffff; }
.text-slate-900 { color: #0f172a; }
.text-slate-600 { color: #475569; }
.text-indigo-600 { color: #4f46e5; }

.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ==========================================================================
   FOOTER MEGA GRID STYLES
   ========================================================================== */
.footer-mega-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-col-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-links-list a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-links-list a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .footer-mega-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .footer-mega-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-bottom-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
