/*
Theme Name: PageDrop
Theme URI: https://pagedrop.dev
Author: Alex Gano
Author URI: https://pagedrop.dev
Description: A lightweight WordPress theme that lets you upload HTML pages. Install it, upload your pages, done. Built-in dark design system with complete element styling.
Version: 1.7.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pagedrop
Requires at least: 5.0
Requires PHP: 7.4
*/

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

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a26;
    --bg-elevated: #22222e;
    --bg-input: #16161f;

    --text-primary: #e8e8ed;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --text-heading: #f2f2f7;

    --accent: #6c5ce7;
    --accent-hover: #7c6df7;
    --accent-light: rgba(108, 92, 231, 0.15);
    --accent-glow: rgba(108, 92, 231, 0.3);

    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;

    --border: #2a2a3a;
    --border-light: #1e1e2e;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Sizing */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;

    /* Borders */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);

    /* Transitions */
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.4rem, 3vw, 1.75rem);
    letter-spacing: -0.01em;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    line-height: 1.8;
}

.lead {
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.8;
}

strong, b {
    font-weight: 700;
    color: var(--text-heading);
}

em, i {
    font-style: italic;
}

small {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

a:hover {
    color: var(--accent-hover);
}

blockquote {
    border-left: 4px solid var(--accent);
    padding: var(--space-lg) var(--space-xl);
    margin: var(--space-xl) 0;
    background: var(--bg-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

code {
    font-family: var(--font-mono);
    background: var(--bg-elevated);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: var(--accent);
}

pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    margin: var(--space-xl) 0;
}

pre code {
    background: none;
    padding: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

mark {
    background: var(--accent-light);
    color: var(--text-heading);
    padding: 0.1em 0.3em;
    border-radius: var(--radius-sm);
}

hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: var(--space-2xl) 0;
}

/* ============================================
   LISTS
   ============================================ */
ul, ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
    color: var(--text-secondary);
}

ul li, ol li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

ul.list-none {
    list-style: none;
    padding-left: 0;
}

ul.list-check {
    list-style: none;
    padding-left: 0;
}

ul.list-check li {
    padding-left: var(--space-lg);
    position: relative;
}

ul.list-check li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-sm {
    max-width: var(--container-sm);
}

.container-md {
    max-width: var(--container-md);
}

.container-lg {
    max-width: var(--container-lg);
}

.section {
    padding: var(--space-4xl) 0;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

.section-lg {
    padding: calc(var(--space-4xl) * 1.5) 0;
}

/* Grid */
.grid {
    display: grid;
    gap: var(--space-xl);
}

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

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Flex */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Primary */
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: var(--shadow-glow);
    color: #fff;
}

/* Secondary */
.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    color: var(--text-heading);
}

/* Outline */
.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--bg-elevated);
    color: var(--text-heading);
}

/* Sizes */
.btn-sm {
    padding: 0.5rem 1.15rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

/* Full Width */
.btn-block {
    display: flex;
    width: 100%;
}

/* Success / Danger / Warning */
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { filter: brightness(1.1); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(1.1); color: #fff; }
.btn-warning { background: var(--warning); color: #000; border-color: var(--warning); }
.btn-warning:hover { filter: brightness(1.1); color: #000; }

/* Button Group */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ============================================
   IMAGES
   ============================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-rounded {
    border-radius: var(--radius-md);
}

.img-circle {
    border-radius: var(--radius-full);
}

.img-shadow {
    box-shadow: var(--shadow-lg);
}

.img-border {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
}

.img-glow {
    box-shadow: var(--shadow-glow);
    border-radius: var(--radius-md);
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-contain {
    object-fit: contain;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-flat {
    composes: card;
}

.card-flat:hover {
    transform: none;
}

.card-img {
    margin: calc(var(--space-xl) * -1);
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-title {
    font-size: 1.2rem;
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--accent-light);
    color: var(--accent);
    letter-spacing: 0.02em;
}

.badge-success { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.badge-warning { background: rgba(243, 156, 18, 0.15); color: var(--warning); }
.badge-danger { background: rgba(231, 76, 60, 0.15); color: var(--danger); }
.badge-info { background: rgba(52, 152, 219, 0.15); color: var(--info); }

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

/* ============================================
   FORMS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="search"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition);
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
}

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 700;
    color: var(--text-heading);
    background: var(--bg-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-secondary);
}

tr:hover td {
    background: var(--bg-secondary);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.site-logo img {
    height: 36px;
    width: auto;
}

.site-logo:hover {
    color: var(--accent);
}

/* Centered Header variant */
.site-header-centered .container {
    justify-content: center !important;
    text-align: center;
}

.site-header-centered .site-logo-centered {
    margin: 0 auto;
    justify-content: center;
}

/* Embed pages: iframe respects header height */
.embed-fullscreen {
    width: 100vw;
    height: calc(100vh - 70px);
    position: fixed;
    top: 70px;
    left: 0;
    z-index: 100;
}

.no-header .embed-fullscreen {
    height: 100vh;
    top: 0;
}

.embed-fullscreen iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

@media (max-width: 768px) {
    .embed-fullscreen {
        height: calc(100vh - 72px);
        top: 72px;
    }
    .no-header .embed-fullscreen {
        height: 100vh;
        top: 0;
    }
}

/* Navigation — Desktop */
.site-nav-desktop ul {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
    margin: 0;
    padding: 0;
    align-items: center;
}

.site-nav-desktop a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.site-nav-desktop a:hover,
.site-nav-desktop .current-menu-item a,
.site-nav-desktop .current_page_item a {
    color: var(--text-heading);
    background: var(--bg-elevated);
}

/* More dropdown for overflow nav items */
.site-nav-more {
    position: relative;
}

.site-nav-more-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}

.site-nav-more-toggle:hover,
.site-nav-more.active .site-nav-more-toggle {
    color: var(--text-heading);
    background: var(--bg-elevated);
}

.site-nav-more-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px 0;
    list-style: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    z-index: 1000;
    pointer-events: none;
}

.site-nav-more.active .site-nav-more-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.site-nav-desktop ul .site-nav-more-menu li {
    display: block !important;
    width: 100%;
    margin: 0;
    flex: none;
}

.site-nav-more-menu a {
    display: block;
    padding: 10px 18px;
    border-radius: 0;
    font-size: 0.9rem;
    width: 100%;
    color: var(--text-secondary);
    white-space: nowrap;
    text-align: left;
}

.site-nav-more-menu a:hover {
    background: var(--bg-elevated);
    color: var(--text-heading);
}

/* Navigation — Mobile Drawer (lives outside header on body level) */
.site-nav-mobile {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 280px;
    max-width: 80vw;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    padding: 0;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: none;
}

.site-nav-mobile.active {
    transform: translateX(0);
}

.site-nav-mobile ul {
    list-style: none;
    flex-direction: column;
    gap: 0;
    padding: 76px 0 24px 0;
    margin: 0;
}

.site-nav-mobile li {
    display: block;
}

.site-nav-mobile a {
    display: block;
    padding: 14px 24px;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    transition: all var(--transition);
}

.site-nav-mobile a:hover,
.site-nav-mobile .current-menu-item a,
.site-nav-mobile .current_page_item a {
    background: var(--bg-elevated);
    color: var(--text-heading);
}

/* Close button inside drawer */
.menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.menu-close:hover {
    color: var(--text-heading);
    border-color: var(--text-muted);
    background: var(--bg-elevated);
}

/* Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-shrink: 0;
}

.menu-toggle .bar {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 5px 0;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    /* Hide desktop nav on mobile */
    .site-nav-desktop {
        display: none !important;
    }

    /* Show mobile nav */
    .site-nav-mobile {
        display: block;
    }

    .site-header .container {
        height: 72px;
        padding: 0 20px;
    }

    .site-logo {
        font-size: 1.3rem;
        margin-left: 0;
    }

    .site-logo img {
        height: 34px;
    }
}

/* Desktop: hide mobile elements */
@media (min-width: 769px) {
    .site-nav-mobile {
        display: none !important;
    }
    .menu-toggle {
        display: none !important;
    }
    .menu-overlay {
        display: none !important;
    }
    .menu-close {
        display: none !important;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: var(--space-2xl) 0;
    margin-top: var(--space-4xl);
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
    text-align: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.footer-links li {
    display: inline-block;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
    white-space: nowrap;
}

.footer-links a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-xl);
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
    }
    
    .footer-links li {
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--border-light);
    }
    
    .footer-links li:last-child {
        border-bottom: none;
    }
    
    .footer-links a {
        display: block;
        padding: 12px 16px;
        font-size: 0.95rem;
        text-align: center;
    }
    
    .footer-links a:hover {
        background: var(--bg-elevated);
    }
    
    .footer-text {
        text-align: center;
        width: 100%;
    }
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero {
    padding: var(--space-4xl) 0;
    text-align: center;
}

.hero h1 {
    margin-bottom: var(--space-lg);
}

.hero p {
    font-size: 1.15rem;
    max-width: 640px;
    margin: 0 auto var(--space-xl);
    color: var(--text-secondary);
}

.hero-lg {
    padding: calc(var(--space-4xl) * 1.5) 0;
}

/* ============================================
   DIVIDERS & SPACERS
   ============================================ */
.divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-2xl) 0;
}

.divider-accent {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: var(--space-2xl) 0;
}

.spacer { height: var(--space-xl); }
.spacer-lg { height: var(--space-3xl); }
.spacer-xl { height: var(--space-4xl); }

/* ============================================
   UTILITIES
   ============================================ */
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.bg-secondary { background: var(--bg-secondary); }
.bg-card { background: var(--bg-card); }
.bg-elevated { background: var(--bg-elevated); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }

.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--accent), #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow effect */
.glow {
    box-shadow: var(--shadow-glow);
}

/* Animated underline */
.link-underline {
    position: relative;
    color: var(--text-heading);
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.link-underline:hover::after {
    width: 100%;
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE — MOBILE FIRST
   ============================================ */

/* Mobile: up to 768px */
@media (max-width: 768px) {
    :root {
        --space-4xl: 2.5rem;
        --space-3xl: 2rem;
        --space-2xl: 1.5rem;
    }

    /* Container: consistent padding */
    .container {
        padding: 0 20px !important;
        max-width: 100% !important;
    }

    /* Typography: scale down */
    h1 {
        font-size: 1.6rem;
        line-height: 1.25;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    h2 {
        font-size: 1.3rem;
        word-wrap: break-word;
    }

    h3 {
        font-size: 1.1rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    /* Hero: tighter on mobile */
    .hero {
        padding: var(--space-2xl) 0;
    }

    .hero-lg {
        padding: var(--space-3xl) 0;
    }

    /* Buttons: stack and go full-width on mobile */
    .btn {
        white-space: normal !important;
        word-wrap: break-word;
    }

    .btn-group {
        flex-direction: column !important;
        width: 100% !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    .btn-group .btn {
        width: 100% !important;
        text-align: center;
    }

    .btn-lg {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }

    /* Cards */
    .card {
        padding: var(--space-lg);
    }

    /* Grids: all single column */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
        gap: var(--space-lg);
    }

    /* Tables: horizontal scroll */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Images: prevent overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Pre/code blocks: scroll */
    pre {
        max-width: 100%;
        overflow-x: auto;
        font-size: 0.8rem;
        padding: var(--space-md);
    }

    /* Footer: stack */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Sections: less padding */
    .section {
        padding: var(--space-2xl) 0;
    }

    .section-lg {
        padding: var(--space-3xl) 0;
    }

    /* Blockquote */
    blockquote {
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
    }

    /* Badge */
    .badge {
        font-size: 0.75rem;
    }

    /* Flex layouts */
    .flex-between {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
}

/* Tablet: 769px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 var(--space-lg);
    }

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

    h1 {
        font-size: 2.2rem;
    }

    .hero-lg {
        padding: var(--space-3xl) 0;
    }
}

/* Desktop utilities */
@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
    .show-desktop { display: block !important; }
}

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */
.wp-block-image img {
    border-radius: var(--radius-md);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: var(--space-lg);
    margin-bottom: var(--space-md);
}

.alignright {
    float: right;
    margin-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    word-wrap: normal;
}

/* ============================================
   BLOG POST CONTENT
   ============================================ */
.post-content {
    font-size: 1.05rem;
    line-height: 1.9;
}

.post-content h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.post-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.post-content p {
    margin-bottom: var(--space-lg);
}

.post-content img {
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover {
    color: var(--accent-hover);
}

.post-content ul,
.post-content ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
}

.post-content blockquote {
    margin: var(--space-xl) 0;
}

.post-content figure {
    margin: var(--space-xl) 0;
}

.post-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.post-content .wp-block-image img {
    border-radius: var(--radius-md);
}

/* Comments */
#comments .comment-form label {
    display: block;
    margin-bottom: var(--space-xs);
}

#comments .comment-respond {
    margin-top: var(--space-xl);
}

#comments .comment-reply-title {
    margin-bottom: var(--space-lg);
}

#comments .logged-in-as {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

/* Avatar styling */
#comments .avatar {
    border-radius: var(--radius-full);
}

/* Pagination links */
.nav-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
}

.nav-links a,
.nav-links span {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.nav-links a {
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.nav-links a:hover {
    border-color: var(--accent);
    color: var(--text-heading);
}

.nav-links .current {
    background: var(--accent);
    color: #fff;
}

/* ============================================
   VIEWPORT CONTAINMENT — LAST RULES
   ============================================ */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
}

/* Only inner content sections get overflow clip — NOT main, header, footer */
.section,
.section-sm,
.section-lg,
.hero,
.hero-lg {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
}

/* Inline content that can overflow */
img, video, iframe, pre, code, table {
    max-width: 100%;
}

/* Prevent flexbox/grid children from overflowing */
* {
    min-width: 0;
}
