/*
Theme Name: AeroPress News
Theme URI: https://themeforest.net/user/aeropress
Description: Premium WordPress news/magazine theme with performance-first approach, modern design, and comprehensive SEO features. Built for speed with Core Web Vitals optimization.
Version: 1.0.0
Author: AeroPress Team
Author URI: https://themeforest.net/user/aeropress
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aeropress-news
Domain Path: /languages
Tags: news, magazine, blog, responsive, gutenberg-ready, block-patterns, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-site-editing, one-column, two-columns, three-columns, theme-options, threaded-comments, translation-ready, wide-blocks
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 8.2

-------------------------------------
Table of Contents:
-------------------------------------
1. CSS Custom Properties
2. Reset & Base Styles
3. Typography
4. Layout & Grid
5. Header
6. Navigation
7. Content
8. Sidebar
9. Footer
10. Components
11. Blocks
12. Utilities
13. Dark Mode
14. Media Queries
15. Performance Optimizations

  ___                   ___
 / _ \  ___  _ __  ___  |_  )
| (_) |/ _ \| '  \/ _ \  / /
 \___/ \___/|_|_|_\___/ /___|

~ AeroPress News 2025 ~
*/

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
  /* Colors */
  --aero-primary: #4db2ec;
  --aero-secondary: #2c5282;
  --aero-accent: #e53e3e;
  --aero-success: #38a169;
  --aero-warning: #dd6b20;
  --aero-danger: #e53e3e;

  /* Grays */
  --aero-white: #ffffff;
  --aero-gray-50: #f7fafc;
  --aero-gray-100: #edf2f7;
  --aero-gray-200: #e2e8f0;
  --aero-gray-300: #cbd5e0;
  --aero-gray-400: #a0aec0;
  --aero-gray-500: #718096;
  --aero-gray-600: #4a5568;
  --aero-gray-700: #2d3748;
  --aero-gray-800: #1a202c;
  --aero-gray-900: #171923;
  --aero-black: #000000;

  /* Text Colors */
  --aero-text-primary: var(--aero-gray-900);
  --aero-text-secondary: var(--aero-gray-600);
  --aero-text-muted: var(--aero-gray-500);
  --aero-text-inverse: var(--aero-white);

  /* Background Colors */
  --aero-bg-primary: var(--aero-white);
  --aero-bg-secondary: var(--aero-gray-50);
  --aero-bg-tertiary: var(--aero-gray-100);

  /* Border Colors */
  --aero-border-color: var(--aero-gray-200);
  --aero-border-color-light: var(--aero-gray-100);

  /* Typography */
  --aero-font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --aero-font-family-headings: 'Playfair Display', Georgia, serif;
  --aero-font-family-mono: 'Source Code Pro', 'SF Mono', Monaco, monospace;

  /* Font Sizes */
  --aero-text-xs: 0.75rem;
  --aero-text-sm: 0.875rem;
  --aero-text-base: 1rem;
  --aero-text-lg: 1.125rem;
  --aero-text-xl: 1.25rem;
  --aero-text-2xl: 1.5rem;
  --aero-text-3xl: 1.875rem;
  --aero-text-4xl: 2.25rem;
  --aero-text-5xl: 3rem;
  --aero-text-6xl: 3.75rem;

  /* Line Heights */
  --aero-leading-none: 1;
  --aero-leading-tight: 1.25;
  --aero-leading-normal: 1.5;
  --aero-leading-relaxed: 1.625;
  --aero-leading-loose: 2;

  /* Spacing */
  --aero-space-1: 0.25rem;
  --aero-space-2: 0.5rem;
  --aero-space-3: 0.75rem;
  --aero-space-4: 1rem;
  --aero-space-5: 1.25rem;
  --aero-space-6: 1.5rem;
  --aero-space-8: 2rem;
  --aero-space-10: 2.5rem;
  --aero-space-12: 3rem;
  --aero-space-16: 4rem;
  --aero-space-20: 5rem;
  --aero-space-24: 6rem;

  /* Layout */
  --aero-container-sm: 640px;
  --aero-container-md: 768px;
  --aero-container-lg: 1024px;
  --aero-container-xl: 1280px;
  --aero-container-2xl: 1536px;

  /* Border Radius */
  --aero-radius-none: 0;
  --aero-radius-sm: 0.125rem;
  --aero-radius: 0.25rem;
  --aero-radius-md: 0.375rem;
  --aero-radius-lg: 0.5rem;
  --aero-radius-xl: 0.75rem;
  --aero-radius-2xl: 1rem;
  --aero-radius-full: 9999px;

  /* Shadows */
  --aero-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --aero-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --aero-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --aero-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --aero-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Transitions */
  --aero-transition-fast: 150ms ease;
  --aero-transition-base: 250ms ease;
  --aero-transition-slow: 350ms ease;

  /* Z-Index */
  --aero-z-dropdown: 1000;
  --aero-z-sticky: 1020;
  --aero-z-fixed: 1030;
  --aero-z-modal-backdrop: 1040;
  --aero-z-modal: 1050;
  --aero-z-popover: 1060;
  --aero-z-tooltip: 1070;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
  :root {
    --aero-text-primary: var(--aero-gray-100);
    --aero-text-secondary: var(--aero-gray-300);
    --aero-text-muted: var(--aero-gray-400);
    --aero-text-inverse: var(--aero-gray-900);

    --aero-bg-primary: var(--aero-gray-900);
    --aero-bg-secondary: var(--aero-gray-800);
    --aero-bg-tertiary: var(--aero-gray-700);

    --aero-border-color: var(--aero-gray-700);
    --aero-border-color-light: var(--aero-gray-800);
  }
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: var(--aero-leading-normal);
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--aero-font-family-primary);
  font-size: var(--aero-text-base);
  color: var(--aero-text-primary);
  background-color: var(--aero-bg-primary);
  line-height: var(--aero-leading-normal);
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--aero-space-4) 0;
  font-family: var(--aero-font-family-headings);
  font-weight: 700;
  line-height: var(--aero-leading-tight);
  color: var(--aero-text-primary);
}

h1 {
  font-size: clamp(var(--aero-text-3xl), 4vw, var(--aero-text-5xl));
}

h2 {
  font-size: clamp(var(--aero-text-2xl), 3.5vw, var(--aero-text-4xl));
}

h3 {
  font-size: clamp(var(--aero-text-xl), 3vw, var(--aero-text-3xl));
}

h4 {
  font-size: clamp(var(--aero-text-lg), 2.5vw, var(--aero-text-2xl));
}

h5 {
  font-size: var(--aero-text-lg);
}

h6 {
  font-size: var(--aero-text-base);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin: 0 0 var(--aero-space-4) 0;
  line-height: var(--aero-leading-relaxed);
}

a {
  color: var(--aero-primary);
  text-decoration: none;
  transition: color var(--aero-transition-fast);
}

a:hover,
a:focus {
  color: var(--aero-secondary);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--aero-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   4. Layout & Grid
   ========================================================================== */

.aero-container {
  width: 100%;
  max-width: var(--aero-container-xl);
  margin: 0 auto;
  padding: 0 var(--aero-space-4);
}

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

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

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

.aero-container--2xl {
  max-width: var(--aero-container-2xl);
}

.aero-grid {
  display: grid;
  gap: var(--aero-space-6);
}

.aero-grid--cols-1 {
  grid-template-columns: 1fr;
}

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

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

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

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

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

/* ==========================================================================
   5. Header
   ========================================================================== */

.aero-header {
  background-color: var(--aero-bg-primary);
  border-bottom: 1px solid var(--aero-border-color);
  position: relative;
  z-index: var(--aero-z-sticky);
}

.aero-header--sticky {
  position: sticky;
  top: 0;
}

.aero-header--transparent {
  background-color: transparent;
  border-bottom-color: transparent;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.aero-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--aero-space-4) 0;
}

.aero-logo {
  display: flex;
  align-items: center;
  font-size: var(--aero-text-xl);
  font-weight: 700;
  color: var(--aero-text-primary);
  text-decoration: none;
}

.aero-logo:hover,
.aero-logo:focus {
  color: var(--aero-primary);
  text-decoration: none;
}

.aero-logo img {
  max-height: 40px;
  width: auto;
}

/* ==========================================================================
   6. Navigation
   ========================================================================== */

.aero-nav {
  display: flex;
  align-items: center;
  gap: var(--aero-space-6);
}

.aero-nav__menu {
  display: flex;
  align-items: center;
  gap: var(--aero-space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.aero-nav__item {
  position: relative;
}

.aero-nav__link {
  display: block;
  padding: var(--aero-space-2) 0;
  font-weight: 500;
  color: var(--aero-text-primary);
  text-decoration: none;
  transition: color var(--aero-transition-fast);
}

.aero-nav__link:hover,
.aero-nav__link:focus {
  color: var(--aero-primary);
  text-decoration: none;
}

.aero-nav__link--current {
  color: var(--aero-primary);
}

/* Mobile Navigation */
.aero-nav__toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--aero-space-2);
  cursor: pointer;
  color: var(--aero-text-primary);
}

@media (max-width: 768px) {
  .aero-nav__toggle {
    display: block;
  }

  .aero-nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--aero-bg-primary);
    border: 1px solid var(--aero-border-color);
    border-top: none;
    flex-direction: column;
    gap: 0;
    padding: var(--aero-space-4);
  }

  .aero-nav__menu--open {
    display: flex;
  }

  .aero-nav__link {
    padding: var(--aero-space-3) 0;
    border-bottom: 1px solid var(--aero-border-color-light);
  }

  .aero-nav__link:last-child {
    border-bottom: none;
  }
}

/* ==========================================================================
   13. Dark Mode
   ========================================================================== */

.aero-dark-mode-toggle {
  background: none;
  border: 1px solid var(--aero-border-color);
  border-radius: var(--aero-radius-md);
  padding: var(--aero-space-2);
  cursor: pointer;
  color: var(--aero-text-primary);
  transition: all var(--aero-transition-fast);
}

.aero-dark-mode-toggle:hover {
  background-color: var(--aero-bg-secondary);
}

/* Dark mode class toggle */
.aero-dark {
  --aero-text-primary: var(--aero-gray-100);
  --aero-text-secondary: var(--aero-gray-300);
  --aero-text-muted: var(--aero-gray-400);
  --aero-text-inverse: var(--aero-gray-900);

  --aero-bg-primary: var(--aero-gray-900);
  --aero-bg-secondary: var(--aero-gray-800);
  --aero-bg-tertiary: var(--aero-gray-700);

  --aero-border-color: var(--aero-gray-700);
  --aero-border-color-light: var(--aero-gray-800);
}

/* ==========================================================================
   14. Media Queries
   ========================================================================== */

@media (min-width: 640px) {
  .aero-container {
    padding: 0 var(--aero-space-6);
  }
}

@media (min-width: 1024px) {
  .aero-container {
    padding: 0 var(--aero-space-8);
  }

  .aero-header__inner {
    padding: var(--aero-space-6) 0;
  }
}

/* ==========================================================================
   15. Performance Optimizations
   ========================================================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Optimize font loading */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/inter-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/inter-semibold.woff2') format('woff2');
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/playfair-bold.woff2') format('woff2');
}

/* Improve image loading */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

/* Critical above-the-fold images */
.aero-hero img,
.aero-logo img {
  loading: eager;
}

/* Content visibility optimization */
.aero-post-content {
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
}

/* GPU acceleration for animations */
.aero-animated {
  will-change: transform;
  transform: translateZ(0);
}