/* ==========================================================================
   RecuperaFit - CSS Design System & Stylesheet (Premium Dark Theme)
   ========================================================================== */

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

/* Variables & Design Tokens */
:root {
    /* Color Palette */
    --bg-darkest: #080c14;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.45);
    --bg-card-hover: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(16, 185, 129, 0.3);
    
    /* Brand Accents */
    --accent-primary: #10b981; /* Emerald / Mint */
    --accent-secondary: #06b6d4; /* Cyan */
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --accent-gradient-glow: linear-gradient(135deg, rgba(16, 185, 129, 0.4) 0%, rgba(6, 182, 212, 0.4) 100%);
    --accent-rose: #f43f5e;
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-glow: #00f5a0;

    /* Fonts */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions & Blurs */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --blur-normal: blur(12px);
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);
    
    --container-max-width: 1200px;
}

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

img, video, svg, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

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

body {
    background-color: var(--bg-darkest);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    position: relative;
    overflow-x: clip;
}

/* Glowing Ambient Background Circles */
body::before, body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--accent-gradient-glow);
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

body::before {
    top: 10%;
    right: -100px;
}

body::after {
    top: 60%;
    left: -100px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

h1 {
    font-size: 2.75rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

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

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    overflow-wrap: break-word;
}

/* Header & Navigation */
.header {
    background-color: rgba(8, 12, 20, 0.85);
    backdrop-filter: var(--blur-normal);
    -webkit-backdrop-filter: var(--blur-normal);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-normal);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo i {
    background: var(--accent-gradient);
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--accent-primary);
}

.logo-mark {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0.25rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--accent-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-normal), opacity var(--transition-fast);
    opacity: 0;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
    opacity: 1;
}

/* Ripple effect on click */
.nav-link:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.05s;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    position: relative;
    text-align: center;
}

.hero-subtitle {
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    display: block;
}

.hero h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
}

/* Trust Banner */
.trust-banner {
    padding: 2rem 0 3rem;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.trust-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.trust-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--accent-gradient-glow);
    color: var(--accent-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.trust-stat {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.trust-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0.25rem 0 0.5rem;
}

.trust-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #000; /* High contrast text on mint/cyan */
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.45);
    color: #000;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.btn-amazon {
    background: linear-gradient(135deg, #ff9900 0%, #ffb700 100%);
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.25);
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
}

.btn-amazon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
    filter: brightness(1.05);
    color: #0f172a;
}

/* Glass Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--blur-normal);
    -webkit-backdrop-filter: var(--blur-normal);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition-normal);
}

.glass-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Features/Categories Grid */
.categories-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    display: block;
}

.section-title-word {
    position: relative;
    display: inline-block;
    padding: 0 0.75rem;
}

.section-title-word::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 40px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
    transform: translateX(-100%);
    margin-left: -12px;
}

.section-title-word::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Evita que otros h2.section-title sin el span hereden líneas */
.section-title:not(:has(.section-title-word))::before,
.section-title:not(:has(.section-title-word))::after {
    display: none;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
    align-items: start;
}

.category-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.guide-card-img {
    position: relative;
    width: 100%;
    height: 190px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.2rem;
    background: rgba(30, 41, 59, 0.45);
}

.guide-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.guide-card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(8, 12, 24, 0.85) 0%, rgba(8, 12, 24, 0.35) 50%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.guide-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

/* Product Catalog Grid */
.products-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 1.5rem;
    text-align: center;
}

.section-header > div:first-child {
    width: 100%;
}

.filter-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0; /* Critical: allows flex children to shrink below content size */
}

.product-card > .product-image-container {
    flex-shrink: 0; /* Image container never shrinks */
}

.product-card > .product-content {
    /* Content wrapper: grows to fill space, but respects overflow */
    flex: 1 1 auto;
    min-height: 0; /* Critical for line-clamp to work in flex column */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-card > div:not(.product-image-container):not(.product-footer):not(.product-content) {
    /* Fallback for any other content divs */
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-card > .product-footer {
    flex-shrink: 0; /* Footer never shrinks */
    margin-top: auto; /* Pushes to bottom if extra space */
}

.product-image-container {
    width: 100%;
    height: 200px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}

.product-image-container img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: var(--transition-normal);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

.badge-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    z-index: 2;
    text-transform: uppercase;
}

.badge-best {
    background: #eab308; /* yellow-500 */
    color: #000;
}

.badge-value {
    background: var(--accent-secondary);
    color: #000;
}

.badge-editorial {
    background: var(--accent-primary);
    color: #000;
}

.badge-price-tier {
    background: rgba(15, 23, 42, 0.9) !important;
    color: var(--accent-primary) !important;
    font-family: var(--font-heading) !important;
    font-size: 0.85rem !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 4px !important;
    text-transform: none !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #f59e0b; /* amber-500 */
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    max-height: 2.6em; /* 2 lines * 1.3 line-height */
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem; /* Reduced to give more space */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    max-height: 4.5em; /* 3 lines * 1.5 line-height */
    flex-shrink: 1; /* Allow description to shrink if needed */
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    margin-top: auto;
    flex-shrink: 0;
}

.product-price {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    flex-shrink: 0;
}

.product-price span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Comparison Table */
.comparison-section {
    padding: 4rem 0;
    background-color: rgba(8, 12, 20, 0.4);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
}

.comp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 800px;
    background: var(--bg-card);
}

.comp-table th, .comp-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    text-wrap: pretty;
}

.comp-table th {
    background-color: rgba(15, 23, 42, 0.8);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.comp-table tr.highlighted-row {
    background-color: rgba(16, 185, 129, 0.04);
}

.comp-table tr:last-child td {
    border-bottom: none;
}

.comp-product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comp-product-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.comp-product-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    text-wrap: balance;
}

.comp-badge {
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.pro-con-list {
    list-style: none;
    font-size: 0.85rem;
    line-height: 1.45;
}

.pro-con-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    text-wrap: pretty;
}

.pro-con-list li i {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.pro-con-list li.pro i {
    color: var(--accent-primary);
}

.pro-con-list li.con i {
    color: var(--accent-rose);
}

/* Quiz Widget */
.quiz-section {
    padding: 4rem 0;
}

.quiz-container {
    max-width: 650px;
    margin: 2rem auto 0;
    padding: 2.5rem;
}

.quiz-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    width: 25%;
    background: var(--accent-gradient);
    transition: var(--transition-normal);
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.quiz-question {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.quiz-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-secondary);
}

.quiz-option.selected {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent-primary);
}

.quiz-option-circle {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: var(--transition-fast);
}

.quiz-option.selected .quiz-option-circle {
    border-color: var(--accent-primary);
}

.quiz-option.selected .quiz-option-circle::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
}

.quiz-results-container {
    display: none;
    animation: fadeIn 0.5s ease;
}

.quiz-results-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Detail Guides (Blog Posts) */
.guide-header {
    padding: 4rem 0 2rem;
    text-align: center;
}

.guide-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.guide-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.guide-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.guide-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    display: block;
}

.guide-content h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.guide-content p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    color: #cbd5e1; /* slate-300 */
}

.guide-content ul, .guide-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    color: #cbd5e1;
}

.guide-content li {
    margin-bottom: 0.5rem;
}

.post-product-block {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
    display: flex;
    gap: 2rem;
}

.post-product-img {
    width: 200px;
    height: 200px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
    padding: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.post-product-info {
    display: flex;
    flex-direction: column;
}

.post-product-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.post-product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.post-product-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--text-secondary);
}

.pro-con-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.pro-box, .con-box {
    background: rgba(255, 255, 255, 0.015);
    border-radius: 8px;
    padding: 1.2rem;
}

.pro-box {
    border-left: 4px solid var(--accent-primary);
}

.con-box {
    border-left: 4px solid var(--accent-rose);
}

.pro-box h4, .con-box h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.pro-box h4 { color: var(--accent-primary); }
.con-box h4 { color: var(--accent-rose); }

/* Static Info Pages (Legal / Contact / About) */
.page-header {
    padding: 5rem 0 2rem;
    text-align: center;
}

.info-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h3 {
    margin-bottom: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Footer & Legal Disclaimer */
.footer {
    background-color: var(--bg-darkest);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    font-size: 0.85rem;
}

.footer-links h4 {
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

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

.footer-links a:hover {
    text-decoration: underline;
    color: var(--text-primary);
}

.footer-disclaimer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.8;
}

.footer-copyright {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Typography scale */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    /* Header: fixed at top, hamburger menu */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .header-container {
        position: static;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: calc(70px + 0.5rem);
        right: 1rem;
        min-width: 220px;
        max-width: 280px;
        background: var(--bg-darkest);
        border: 1px solid var(--border-color);
        border-radius: 0.75rem;
        padding: 0.5rem;
        gap: 0.25rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        z-index: 9999;
        animation: navSlideIn 0.2s ease-out;
    }

    .nav-menu .nav-link {
        padding: 0.6rem 0.75rem;
        border-radius: 0.5rem;
        width: 100%;
        white-space: nowrap;
    }

    .nav-menu .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    @keyframes navSlideIn {
        from { opacity: 0; transform: translateX(10px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    body {
        padding-top: 70px;
    }

    /* Hero */
    .hero {
        padding: 3rem 0 1.5rem;
    }

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

    /* Trust grid: stack to 1 column */
    .trust-grid {
        grid-template-columns: 1fr;
    }

    /* Grid-3: already adaptive via minmax(min(320px, 100%), 1fr) */

    /* Guide card image: fluid height */
    .guide-card-img {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    /* Product image: fluid */
    .product-image-container {
        height: 180px;
    }

    /* Post product blocks: stack vertically */
    .post-product-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem;
    }

    .post-product-img {
        width: 160px;
        height: 160px;
    }

    .pro-con-grid {
        grid-template-columns: 1fr;
    }

    /* Section headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-tabs {
        width: 100%;
        margin-top: 1rem;
    }

    /* Quiz */
    .quiz-container {
        padding: 1.5rem;
    }

    /* Comparison table: already scrollable via table-wrapper overflow-x: auto */

    /* Cookie banner: stack actions */
    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner-actions {
        justify-content: stretch;
    }

    .cookie-banner-actions .btn {
        flex: 1;
        min-width: 0;
    }

    /* Footer */
    .footer {
        padding: 3rem 0 1.5rem;
        margin-top: 2rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }

    .hero {
        padding: 2.5rem 0 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-subtitle {
        letter-spacing: 0.08em;
    }

    .quiz-container {
        padding: 1rem;
    }

    .quiz-question {
        font-size: 1.15rem;
    }

    .product-image-container {
        height: 160px;
    }

    .post-product-img {
        width: 130px;
        height: 130px;
    }

    .cookie-banner-actions .btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Cookie Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}
.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cookie-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: background 0.3s;
}
.cookie-slider::before {
    content: '';
    position: absolute;
    left: 2px;
    bottom: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}
.cookie-toggle input:checked + .cookie-slider {
    background: var(--accent-primary);
}
.cookie-toggle input:checked + .cookie-slider::before {
    transform: translateX(20px);
}

/* Cookie Config Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.show {
    display: flex;
}
.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0;
}
.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-close:hover {
    color: var(--text-primary);
}
.modal-body {
    padding: 1.5rem;
}
.modal-body > p {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.cookie-config-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.cookie-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: default;
}
.cookie-config-row[onclick] {
    cursor: pointer;
}
.cookie-config-row[onclick]:hover {
    background: rgba(255,255,255,0.07);
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: #0f172a;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    animation: slideUp 0.4s ease;
    display: none;
}
.cookie-banner.show {
    display: block;
}
.cookie-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.cookie-banner-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    min-width: 0;
}
.cookie-banner-text strong {
    color: var(--text-primary);
}
.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.cookie-banner-actions .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}
.btn-reject {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-reject:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-primary);
}
.btn-accept {
    background: var(--accent-primary);
    color: #000;
    font-weight: 700;
}
.btn-accept:hover {
    background: #059669;
    color: #000;
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   Accessibility (Skip Link, Focus, Reduced Motion)
   ========================================================================== */

/* Skip to main content */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    background: var(--accent-primary);
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    transition: top 0.15s ease;
}
.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Global focus-visible styles */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Ensure all interactive elements are focusable via keyboard */
a, button, input, select, textarea, label[for] {
    outline-offset: 2px;
}

/* Focus for product card buttons and links */
.product-footer .btn:focus-visible,
.btn-amazon:focus-visible,
.filter-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* FAQ page: <details> / <summary> styling */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item[open] {
    border-color: var(--border-hover);
}

.faq-item summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
    color: var(--text-primary);
    transition: background 0.2s, color 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: "\f0da";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1rem;
    color: var(--accent-primary);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.faq-item[open] > summary::before {
    transform: rotate(90deg);
}

.faq-item summary:hover,
.faq-item summary:focus-visible {
    background: rgba(255, 255, 255, 0.03);
}

.faq-item[open] summary {
    border-bottom: 1px solid var(--border-color);
}

.faq-item > p {
    padding: 1rem 1.5rem 1.5rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item > p a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Respect reduced motion preferences */
@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;
    }
    .nav-menu {
        animation: none;
    }
}

/* High contrast border for glass cards when prefers contrast */
@media (prefers-contrast: more) {
    .glass-card,
    .post-product-block,
    .cookie-config-row,
    .faq-item {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    .btn {
        border: 2px solid currentColor;
    }
}