/*
Theme Name: GourmetPress
Theme URI: https://gourmetpress.io
Author: GourmetPress Team
Author URI: https://gourmetpress.io
Description: Thème WordPress Premium ultra-rapide et optimisé SEO pour blogs de recettes de cuisine. Core Web Vitals, Rich Snippets, recherche AJAX, monétisation avancée.
Version: 1.1.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gourmetpress
Domain Path: /languages
Tags: food, recipes, blog, seo, fast, responsive, custom-colors, custom-menu, featured-images, full-width-template, sticky-post, theme-options, translation-ready, block-styles, wide-blocks
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ============================================
   GOURMETPRESS - THEME PREMIUM RECETTES v1.1
   Design moderne + Responsive complet
   ============================================ */

:root {
    --gp-primary: #e67e22;
    --gp-primary-dark: #d35400;
    --gp-primary-light: #f5a623;
    --gp-secondary: #2c3e50;
    --gp-accent: #27ae60;
    --gp-danger: #e74c3c;
    --gp-warning: #f39c12;
    --gp-bg: #f7f5f2;
    --gp-surface: #ffffff;
    --gp-text: #1a1a1a;
    --gp-text-light: #6b7280;
    --gp-border: #e8e4df;
    --gp-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --gp-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.1);
    --gp-radius: 14px;
    --gp-radius-sm: 8px;
    --gp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gp-font-heading: 'Poppins', system-ui, sans-serif;
    --gp-font-body: 'Inter', system-ui, sans-serif;
    --gp-header-height: 72px;
    --gp-container: 1280px;
}

[data-theme="dark"] {
    --gp-bg: #0f0f12;
    --gp-surface: #1a1a22;
    --gp-text: #f0f0f0;
    --gp-text-light: #9ca3af;
    --gp-border: #2a2a35;
    --gp-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --gp-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--gp-font-body);
    color: var(--gp-text);
    background: var(--gp-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--gp-primary-dark);
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--gp-font-heading);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: var(--gp-text);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1.15rem;
}

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

.gp-container-narrow {
    max-width: 760px;
}

.gp-main {
    min-height: 60vh;
    padding-bottom: 3rem;
}

.gp-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
    margin-top: 2rem;
}

.gp-content {
    min-width: 0;
}

/* ========== GRID ========== */
.gp-grid {
    display: grid;
    gap: 1.5rem;
}

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

/* ========== FLEX ========== */
.gp-flex {
    display: flex;
    align-items: center;
}

.gp-flex-between {
    justify-content: space-between;
}

.gp-flex-wrap {
    flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--gp-radius-sm);
    font-family: var(--gp-font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--gp-transition);
    text-decoration: none;
    line-height: 1.4;
}

.gp-btn-primary {
    background: var(--gp-primary);
    color: #fff;
}

.gp-btn-primary:hover {
    background: var(--gp-primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 126, 34, 0.35);
}

.gp-btn-secondary {
    background: var(--gp-secondary);
    color: #fff;
}

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

.gp-btn-outline:hover {
    background: var(--gp-primary);
    color: #fff;
}

.gp-btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8125rem;
}

.gp-btn-lg {
    padding: 0.95rem 2rem;
    font-size: 1rem;
}

/* ========== CARDS ========== */
.gp-card {
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    overflow: hidden;
    box-shadow: var(--gp-shadow);
    transition: var(--gp-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gp-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--gp-shadow-hover);
}

.gp-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: block;
}

.gp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.gp-card:hover .gp-card-image img {
    transform: scale(1.06);
}

.gp-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gp-border);
    color: var(--gp-text-light);
}

.gp-card-image .gp-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
}

.gp-card-content {
    padding: 1.25rem 1.35rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gp-card-title {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.gp-card-title a {
    color: var(--gp-text);
}

.gp-card-title a:hover {
    color: var(--gp-primary);
}

.gp-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--gp-text-light);
    margin-bottom: 0.65rem;
}

.gp-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.gp-card-meta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.gp-card-rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.gp-rating-value {
    font-size: 0.8rem;
    color: var(--gp-text-light);
    margin-left: 0.25rem;
}

/* ========== BADGES ========== */
.gp-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.gp-badge-primary {
    background: rgba(230, 126, 34, 0.12);
    color: var(--gp-primary);
}

.gp-badge-success {
    background: rgba(39, 174, 96, 0.12);
    color: var(--gp-accent);
}

.gp-badge-difficulty-easy {
    background: rgba(39, 174, 96, 0.12);
    color: #27ae60;
}

.gp-badge-difficulty-medium {
    background: rgba(243, 156, 18, 0.12);
    color: #f39c12;
}

.gp-badge-difficulty-hard {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

/* ========== HEADER ========== */
.gp-header {
    background: var(--gp-surface);
    box-shadow: 0 1px 0 var(--gp-border);
    position: relative;
    z-index: 1000;
}

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

.gp-header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.gp-header-top {
    background: var(--gp-secondary);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.4rem 0;
}

.gp-header-top a {
    color: rgba(255, 255, 255, 0.85);
}

.gp-header-top a:hover {
    color: #fff;
}

.gp-header-main {
    padding: 0.85rem 0;
}

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

.gp-logo {
    flex-shrink: 0;
}

.gp-logo img {
    max-height: 48px;
    width: auto;
}

.gp-logo-text {
    font-family: var(--gp-font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--gp-primary);
    letter-spacing: -0.03em;
}

.gp-logo-text:hover {
    color: var(--gp-primary-dark);
}

/* Navigation */
.gp-main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.gp-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.gp-menu > li {
    position: relative;
}

.gp-menu > li > a {
    display: block;
    padding: 0.55rem 1rem;
    color: var(--gp-text);
    font-weight: 500;
    font-size: 0.925rem;
    border-radius: var(--gp-radius-sm);
    transition: var(--gp-transition);
}

.gp-menu > li > a:hover,
.gp-menu > li.current-menu-item > a {
    color: var(--gp-primary);
    background: rgba(230, 126, 34, 0.08);
}

/* Submenu */
.gp-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--gp-surface);
    border-radius: var(--gp-radius-sm);
    box-shadow: var(--gp-shadow-hover);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--gp-transition);
    z-index: 50;
}

.gp-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gp-menu .sub-menu a {
    display: block;
    padding: 0.55rem 0.9rem;
    color: var(--gp-text);
    font-size: 0.875rem;
    border-radius: 6px;
}

.gp-menu .sub-menu a:hover {
    background: rgba(230, 126, 34, 0.08);
    color: var(--gp-primary);
}

.gp-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.gp-search-toggle,
.gp-dark-mode-toggle,
.gp-mobile-menu-toggle {
    background: none;
    border: none;
    padding: 0.55rem;
    border-radius: 50%;
    color: var(--gp-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--gp-transition);
}

.gp-search-toggle:hover,
.gp-dark-mode-toggle:hover {
    background: var(--gp-border);
    color: var(--gp-primary);
}

.gp-mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 10px;
}

.gp-mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gp-text);
    border-radius: 2px;
    transition: var(--gp-transition);
}

.gp-mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.gp-mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.gp-mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Dark mode icons */
.gp-dark-mode-toggle .gp-moon { display: none; }
[data-theme="dark"] .gp-dark-mode-toggle .gp-sun { display: none; }
[data-theme="dark"] .gp-dark-mode-toggle .gp-moon { display: block; }

/* Search overlay */
.gp-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 9990;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}

.gp-search-overlay.active {
    display: flex;
}

.gp-search-overlay .gp-search-container {
    width: 100%;
    max-width: 640px;
    position: relative;
    padding: 0 1.25rem;
}

.gp-search-overlay .gp-search-input {
    width: 100%;
    padding: 1.1rem 1.25rem 1.1rem 3.25rem;
    border: none;
    border-radius: var(--gp-radius);
    font-size: 1.1rem;
    background: var(--gp-surface);
    color: var(--gp-text);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.gp-search-overlay .gp-search-input:focus {
    outline: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(230, 126, 34, 0.35);
}

.gp-search-close {
    position: absolute;
    top: -2.5rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

/* ========== HERO ========== */
.gp-hero {
    padding: 3.5rem 0 2.5rem;
    background: linear-gradient(160deg, var(--gp-surface) 0%, var(--gp-bg) 100%);
}

.gp-hero-content {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.gp-hero-title {
    margin-bottom: 0.85rem;
}

.gp-hero-description {
    font-size: 1.1rem;
    color: var(--gp-text-light);
    margin-bottom: 1.75rem;
}

.gp-hero-search {
    max-width: 480px;
    margin: 0 auto;
}

.gp-hero-featured {
    margin-top: 2rem;
}

.gp-section-title {
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ========== PAGE HEADER ========== */
.gp-page-header {
    background: var(--gp-surface);
    padding: 2.5rem 0 1.75rem;
    border-bottom: 1px solid var(--gp-border);
    margin-bottom: 0.5rem;
}

.gp-page-title {
    margin-bottom: 0.35rem;
}

.gp-archive-description {
    color: var(--gp-text-light);
    max-width: 640px;
}

/* ========== BREADCRUMBS ========== */
.gp-breadcrumbs {
    padding: 0.85rem 0;
    font-size: 0.85rem;
    color: var(--gp-text-light);
}

.gp-breadcrumbs a {
    color: var(--gp-text-light);
}

.gp-breadcrumbs a:hover {
    color: var(--gp-primary);
}

.gp-breadcrumb-sep {
    margin: 0 0.4rem;
    opacity: 0.5;
}

/* ========== SIDEBAR ========== */
.gp-sidebar {
    min-width: 0;
}

.gp-sticky-sidebar {
    position: sticky;
    top: calc(var(--gp-header-height) + 1.5rem);
}

.widget {
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    padding: 1.35rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--gp-shadow);
}

.widget-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--gp-primary);
}

.gp-sidebar-recipe {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1rem;
    align-items: center;
}

.gp-sidebar-recipe:last-child {
    margin-bottom: 0;
}

.gp-sidebar-recipe-image {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--gp-radius-sm);
    overflow: hidden;
}

.gp-sidebar-recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gp-sidebar-recipe-info a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gp-text);
    display: block;
    line-height: 1.3;
}

.gp-sidebar-recipe-info a:hover {
    color: var(--gp-primary);
}

.gp-meta-time {
    font-size: 0.75rem;
    color: var(--gp-text-light);
}

/* ========== RECIPE META ========== */
.gp-recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.75rem;
    padding: 1.15rem 1.35rem;
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    margin: 1.5rem 0;
    border: 1px solid var(--gp-border);
}

.gp-recipe-meta-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
}

.gp-recipe-meta-item svg {
    width: 20px;
    height: 20px;
    color: var(--gp-primary);
    flex-shrink: 0;
}

.gp-recipe-meta-item strong {
    display: block;
    font-size: 0.75rem;
    color: var(--gp-text-light);
    font-weight: 500;
}

.gp-recipe-meta-item span {
    font-weight: 600;
    color: var(--gp-text);
}

/* ========== RECIPE HERO ========== */
.gp-recipe-hero {
    position: relative;
    margin-bottom: 2rem;
}

.gp-recipe-hero-image {
    aspect-ratio: 21 / 9;
    max-height: 420px;
    overflow: hidden;
    background: var(--gp-border);
}

.gp-recipe-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gp-recipe-hero-content {
    padding: 1.75rem 0 0;
}

.gp-recipe-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.gp-recipe-title {
    margin-bottom: 1rem;
}

.gp-recipe-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.gp-author-avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.gp-author-name {
    font-weight: 600;
    display: block;
}

.gp-post-date {
    font-size: 0.85rem;
    color: var(--gp-text-light);
}

/* ========== RECIPE ACTIONS ========== */
.gp-recipe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gp-border);
}

.gp-share-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.gp-share-label {
    font-size: 0.85rem;
    color: var(--gp-text-light);
    margin-right: 0.25rem;
}

.gp-share-btn {
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--gp-border);
    color: var(--gp-text);
}

.gp-share-btn:hover {
    background: var(--gp-primary);
    color: #fff;
}

/* ========== INGREDIENTS ========== */
.gp-recipe-ingredients {
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid var(--gp-border);
}

.gp-servings-scaler {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: rgba(230, 126, 34, 0.06);
    border-radius: var(--gp-radius-sm);
}

.gp-servings-scaler label {
    font-weight: 600;
    font-size: 0.9rem;
}

.gp-servings-value {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 2rem;
    text-align: center;
}

.gp-ingredients-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid var(--gp-border);
    transition: var(--gp-transition);
}

.gp-ingredients-list li:last-child {
    border-bottom: none;
}

.gp-ingredients-list li:hover {
    background: rgba(230, 126, 34, 0.03);
}

.gp-ingredients-list li.checked {
    opacity: 0.55;
}

.gp-ingredients-list li.checked .gp-ingredient-text {
    text-decoration: line-through;
}

.gp-ingredient-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gp-border);
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    transition: var(--gp-transition);
}

.gp-ingredient-check.checked {
    background: var(--gp-accent);
    border-color: var(--gp-accent);
    position: relative;
}

.gp-ingredient-check.checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.gp-ingredient-note {
    color: var(--gp-text-light);
    font-size: 0.875rem;
}

/* ========== STEPS ========== */
.gp-recipe-steps {
    margin: 2rem 0;
}

.gp-recipe-step {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--gp-border);
}

.gp-recipe-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.gp-recipe-step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--gp-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--gp-font-heading);
    font-weight: 700;
    font-size: 1.15rem;
}

.gp-recipe-step.gp-step-active .gp-recipe-step-number {
    box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.25);
}

.gp-recipe-step-content {
    flex: 1;
    min-width: 0;
}

.gp-recipe-step-content h4 {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.gp-step-image {
    margin-top: 1rem;
    border-radius: var(--gp-radius-sm);
    max-width: 100%;
}

/* ========== NUTRITION ========== */
.gp-nutrition-table {
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid var(--gp-border);
}

.gp-nutrition-disclaimer {
    font-size: 0.85rem;
    color: var(--gp-text-light);
    margin-bottom: 1rem;
}

.gp-nutrition-table table {
    width: 100%;
    border-collapse: collapse;
}

.gp-nutrition-table th,
.gp-nutrition-table td {
    padding: 0.65rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gp-border);
}

.gp-nutrition-table th {
    font-weight: 500;
    color: var(--gp-text-light);
}

.gp-nutrition-table td {
    font-weight: 600;
    text-align: right;
}

/* ========== VIDEO ========== */
.gp-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--gp-radius);
    margin: 1.75rem 0;
    background: #000;
}

.gp-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========== GALLERY ========== */
.gp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.gp-gallery-item {
    border-radius: var(--gp-radius-sm);
    overflow: hidden;
    aspect-ratio: 1;
}

.gp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gp-gallery-item:hover img {
    transform: scale(1.05);
}

/* ========== TAGS ========== */
.gp-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gp-tag {
    padding: 0.35rem 0.85rem;
    background: var(--gp-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--gp-text);
}

.gp-tag:hover {
    background: var(--gp-primary);
    color: #fff;
}

/* ========== AUTHOR BOX ========== */
.gp-author-box {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    margin: 2.5rem 0;
    border: 1px solid var(--gp-border);
    align-items: flex-start;
}

.gp-author-box .gp-author-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.gp-author-box h3 {
    margin-bottom: 0.35rem;
}

.gp-author-box p {
    font-size: 0.925rem;
    color: var(--gp-text-light);
    margin-bottom: 0.75rem;
}

/* ========== POST NAV ========== */
.gp-post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.gp-nav-prev,
.gp-nav-next {
    padding: 1.15rem;
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    border: 1px solid var(--gp-border);
    transition: var(--gp-transition);
}

.gp-nav-prev:hover,
.gp-nav-next:hover {
    border-color: var(--gp-primary);
    box-shadow: var(--gp-shadow);
}

.gp-nav-next {
    text-align: right;
}

.gp-nav-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gp-text-light);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.gp-nav-title {
    font-weight: 600;
    color: var(--gp-text);
    font-size: 0.95rem;
}

/* ========== RELATED / TRENDING ========== */
.gp-related-recipes,
.gp-recently-viewed,
.gp-trending-recipes {
    margin: 3rem 0;
}

/* ========== SINGLE POST ========== */
.gp-entry-header {
    margin-bottom: 2rem;
}

.gp-entry-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.gp-entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--gp-text-light);
    margin: 1rem 0 1.5rem;
}

.gp-entry-meta .gp-author-avatar {
    width: 40px;
    height: 40px;
}

.gp-separator {
    opacity: 0.4;
}

.gp-featured-image {
    border-radius: var(--gp-radius);
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.gp-entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.gp-entry-content img {
    border-radius: var(--gp-radius-sm);
    margin: 1.25rem 0;
}

.gp-entry-content h2,
.gp-entry-content h3 {
    margin-top: 2rem;
}

/* ========== TOC ========== */
.gp-toc {
    background: var(--gp-surface);
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem;
}

.gp-toc h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.gp-toc ul {
    padding-left: 0;
}

.gp-toc li {
    margin-bottom: 0.4rem;
}

.gp-toc a {
    color: var(--gp-text);
    font-size: 0.925rem;
}

.gp-toc a:hover {
    color: var(--gp-primary);
}

/* ========== FOOTER ========== */
.gp-footer {
    background: var(--gp-secondary);
    color: rgba(255, 255, 255, 0.85);
    margin-top: 3rem;
}

.gp-footer a {
    color: rgba(255, 255, 255, 0.75);
}

.gp-footer a:hover {
    color: #fff;
}

.gp-footer-widgets {
    padding: 3rem 0 2rem;
}

.gp-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.gp-footer .widget {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.gp-footer .widget-title {
    color: #fff;
    border-bottom-color: var(--gp-primary);
    font-size: 0.95rem;
}

.gp-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 0;
    font-size: 0.875rem;
}

.gp-footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.gp-social-links {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.gp-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: var(--gp-transition);
}

.gp-social-links a:hover {
    background: var(--gp-primary);
    color: #fff;
}

.gp-header-social .gp-social-links a {
    width: 28px;
    height: 28px;
    background: transparent;
}

/* ========== SEARCH FORM ========== */
.gp-search-input,
.search-form input[type="search"] {
    width: 100%;
    padding: 0.85rem 1.1rem 0.85rem 2.85rem;
    border: 1.5px solid var(--gp-border);
    border-radius: var(--gp-radius);
    font-size: 0.95rem;
    font-family: var(--gp-font-body);
    background: var(--gp-surface);
    color: var(--gp-text);
    transition: var(--gp-transition);
}

.gp-search-input:focus,
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--gp-primary);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

.gp-search-container {
    position: relative;
}

.gp-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    box-shadow: var(--gp-shadow-hover);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.gp-search-results.active {
    display: block;
}

.gp-search-result-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gp-border);
    color: var(--gp-text);
}

.gp-search-result-item:hover {
    background: rgba(230, 126, 34, 0.05);
}

.gp-search-result-item img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.gp-search-result-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.gp-search-result-info p {
    font-size: 0.8rem;
    color: var(--gp-text-light);
    margin: 0;
}

.gp-search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--gp-text-light);
}

/* ========== PAGINATION ========== */
.gp-pagination {
    margin: 2.5rem 0;
    display: flex;
    justify-content: center;
}

.gp-pagination .gp-page-numbers,
.gp-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gp-pagination a,
.gp-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.65rem;
    border-radius: var(--gp-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gp-text);
    background: var(--gp-surface);
    border: 1px solid var(--gp-border);
    transition: var(--gp-transition);
}

.gp-pagination a:hover {
    border-color: var(--gp-primary);
    color: var(--gp-primary);
}

.gp-pagination .current {
    background: var(--gp-primary);
    color: #fff;
    border-color: var(--gp-primary);
}

/* ========== ADS ========== */
.gp-ad-wrapper {
    margin: 1.75rem 0;
}

.gp-ad-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gp-text-light);
    margin-bottom: 0.4rem;
    text-align: center;
}

.gp-ad-slot {
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    border: 1px dashed var(--gp-border);
    padding: 0.75rem;
}

/* ========== NEWSLETTER POPUP ========== */
.gp-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.gp-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.gp-popup {
    background: var(--gp-surface);
    border-radius: var(--gp-radius);
    padding: 2rem 1.75rem;
    max-width: 440px;
    width: 100%;
    position: relative;
    transform: translateY(16px);
    transition: transform 0.3s ease;
}

.gp-popup-overlay.active .gp-popup {
    transform: translateY(0);
}

.gp-popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gp-text-light);
    line-height: 1;
}

.gp-popup h3 {
    margin-bottom: 0.5rem;
}

.gp-popup p {
    color: var(--gp-text-light);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* ========== READING PROGRESS ========== */
.gp-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gp-primary);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ========== 404 ========== */
.gp-404 .gp-404-title {
    font-size: clamp(4rem, 15vw, 8rem);
    color: var(--gp-primary);
    opacity: 0.25;
    margin-bottom: 0;
    line-height: 1;
}

/* ========== ACCESSIBILITY ========== */
.sr-only,
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--gp-primary);
    color: #fff;
    padding: 0.6rem 1.1rem;
    z-index: 10000;
    transition: top 0.3s;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.gp-animate {
    animation: fadeIn 0.5s ease forwards;
}

.gp-skeleton {
    background: linear-gradient(90deg, var(--gp-border) 25%, #f0f0f0 50%, var(--gp-border) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== COMMENTS ========== */
.comments-area {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gp-border);
}

.comment-list {
    margin-bottom: 2rem;
}

.comment {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--gp-border);
}

.comment-author {
    font-weight: 600;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gp-border);
    border-radius: var(--gp-radius-sm);
    background: var(--gp-surface);
    color: var(--gp-text);
    font-family: inherit;
    margin-bottom: 0.75rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--gp-primary);
}

/* ========== PRINT ========== */
@media print {
    .gp-header, .gp-footer, .gp-sidebar, .gp-ad-slot,
    .gp-popup-overlay, .gp-reading-progress, .gp-dark-mode-toggle,
    .gp-recipe-actions, .gp-share-buttons, .gp-mobile-menu-toggle {
        display: none !important;
    }

    .gp-content, .gp-content-wrapper {
        width: 100% !important;
        display: block !important;
        margin: 0 !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    a {
        text-decoration: underline;
        color: #000;
    }

    .gp-recipe-step {
        break-inside: avoid;
    }
}

/* ============================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .gp-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .gp-content-wrapper {
        grid-template-columns: 1fr 280px;
        gap: 1.75rem;
    }

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

    .gp-recipe-hero-image {
        aspect-ratio: 16 / 9;
        max-height: 360px;
    }

    .gp-menu > li > a {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   RESPONSIVE — TABLET SMALL (≤ 900px)
   ============================================ */
@media (max-width: 900px) {
    .gp-content-wrapper {
        grid-template-columns: 1fr;
    }

    .gp-sidebar {
        order: 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .gp-sticky-sidebar {
        position: static;
    }

    .gp-sidebar .widget {
        margin-bottom: 0;
    }
}

/* ============================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .gp-container {
        padding: 0 1rem;
    }

    /* Header mobile */
    .gp-header-top {
        display: none;
    }

    .gp-main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--gp-surface);
        z-index: 998;
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 1.5rem 2rem;
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }

    .gp-main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .gp-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
    }

    .gp-menu > li > a {
        padding: 0.9rem 0.75rem;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--gp-border);
        border-radius: 0;
    }

    .gp-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 1rem;
        background: transparent;
        min-width: auto;
    }

    .gp-mobile-menu-toggle {
        display: flex;
        z-index: 999;
    }

    body.gp-menu-open {
        overflow: hidden;
    }

    /* Grids */
    .gp-grid-2,
    .gp-grid-3,
    .gp-grid-4 {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Cards */
    .gp-card-content {
        padding: 1.1rem 1.15rem 1.25rem;
    }

    .gp-card-title {
        font-size: 1rem;
    }

    /* Hero */
    .gp-hero {
        padding: 2.25rem 0 1.75rem;
    }

    .gp-hero-description {
        font-size: 1rem;
    }

    /* Recipe */
    .gp-recipe-hero-image {
        aspect-ratio: 4 / 3;
        max-height: 280px;
    }

    .gp-recipe-meta {
        gap: 0.85rem 1.25rem;
        padding: 1rem;
    }

    .gp-recipe-step {
        gap: 0.9rem;
    }

    .gp-recipe-step-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

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

    /* Author */
    .gp-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Post nav */
    .gp-post-navigation {
        grid-template-columns: 1fr;
    }

    .gp-nav-next {
        text-align: left;
    }

    /* Footer */
    .gp-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .gp-footer-bottom .gp-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .gp-footer-menu {
        justify-content: center;
    }

    /* Sidebar */
    .gp-sidebar {
        grid-template-columns: 1fr;
    }

    /* Page header */
    .gp-page-header {
        padding: 1.75rem 0 1.25rem;
    }

    /* Actions */
    .gp-recipe-actions {
        gap: 0.5rem;
    }

    .gp-btn {
        padding: 0.65rem 1.15rem;
    }

    /* Search overlay */
    .gp-search-overlay {
        padding-top: 8vh;
    }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================ */
@media (max-width: 480px) {
    .gp-container {
        padding: 0 0.85rem;
    }

    .gp-header-main {
        padding: 0.65rem 0;
    }

    .gp-logo-text {
        font-size: 1.25rem;
    }

    .gp-logo img {
        max-height: 40px;
    }

    .gp-card-meta {
        gap: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .gp-recipe-meta-item {
        font-size: 0.85rem;
        flex: 1 1 40%;
    }

    .gp-gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .gp-servings-scaler {
        flex-wrap: wrap;
    }

    .gp-popup {
        padding: 1.5rem 1.25rem;
    }

    .gp-btn-lg {
        padding: 0.85rem 1.5rem;
        width: 100%;
    }

    .gp-hero-search .gp-btn,
    .gp-404 .gp-btn {
        width: 100%;
    }
}

/* ============================================
   LANDSCAPE PHONES
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .gp-main-nav {
        padding-top: 4rem;
    }

    .gp-recipe-hero-image {
        max-height: 220px;
    }
}
