/* ==========================================================
   BikeCalcPro — Main Stylesheet
   Combines: global layout + calculator styles
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e3a8a;
    --secondary-orange: #f97316;
    --accent-blue: #0ea5e9;
    --light-gray: #f8fafc;
    --dark-gray: #374151;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--light-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── HEADER ── */
header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

header .container {
    position: relative;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    height: 38px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
}

.logo-bike {
    color: var(--secondary-orange);
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--secondary-orange);
}

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ── */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><circle cx="200" cy="200" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="800" cy="300" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="400" cy="700" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="900" cy="800" r="3" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: var(--secondary-orange);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ── FEATURES ── */
.features {
    padding: 4rem 0;
    background: var(--white);
}

.features-header {
    text-align: center;
    margin-bottom: 3rem;
}

.features-header h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.features-header p {
    font-size: 1.2rem;
    color: var(--dark-gray);
    opacity: 0.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-orange), var(--accent-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.feature-link:hover { color: var(--secondary-orange); }

.feature-link::after {
    content: "→";
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.feature-link:hover::after { transform: translateX(4px); }

/* ── WHY CHOOSE ── */
.why-choose {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--light-gray) 0%, #e2e8f0 100%);
}

.why-choose h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.benefit-item:hover { transform: translateY(-4px); }

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.benefit-item h3 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.benefit-item p {
    color: var(--dark-gray);
    opacity: 0.8;
}

/* ── FOOTER ── */
footer {
    background: var(--primary-blue);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ====================================================
   CALCULATOR STYLES
   ==================================================== */

.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.calculator-header {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    margin-bottom: 2rem;
}

.calculator-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.calculator-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.calculator-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* AdSense slots — invisible until AdSense fills them */
.ad-unit {
    border-radius: 8px;
    overflow: hidden;
    /* No visible border/background — AdSense fills this */
}

/* Only in development / before approval — remove after AdSense is live */
.ad-unit--placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-unit-sidebar     { min-height: 250px; }
.ad-unit-sidebar-lg  { min-height: 280px; }
.ad-unit-leaderboard { min-height: 90px; margin-bottom: 2rem; }
.ad-unit-mobile      { min-height: 100px; display: none; margin-bottom: 1rem; }

/* Form elements */
.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.input-with-unit {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-with-unit .form-control { flex: 1; }

.unit-select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    color: var(--dark-gray);
    min-width: 70px;
}

.unit-label {
    color: var(--dark-gray);
    font-size: 0.9rem;
    padding: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: end;
}

.unit-toggle {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    min-width: 60px;
    transition: background-color 0.3s ease;
}

.unit-toggle:hover { background: var(--primary-blue); }

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--secondary-orange), #ea580c);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}



@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-value {
    font-size: clamp(1.1rem, 2vw, 1.8rem);
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 1rem;
}

.result-tips {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Info section below calculator */
.info-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.info-section h2 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.info-section h3 {
    color: var(--primary-blue);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.info-section p { margin-bottom: 1rem; }

.text-block { margin-bottom: 1rem; }

/* FAQ въпроси */
.info-section h4 {
    color: var(--dark-gray);
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Disclaimer бележка */
.disclaimer-note {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
}

/* Tooltips */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d1e3f8;
    color: var(--primary-blue);
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    margin-left: 5px;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;
}

.tooltip-icon::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: #1e3a5f;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: normal;
    width: 260px;
    max-width: 80vw;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 999;
}

.tooltip-icon:hover::after,
.tooltip-icon:focus::after { opacity: 1; }

/* Preset buttons */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.preset-btn {
    font-size: 12px;
    padding: 4px 10px;
    border: 1.5px solid #c8d9ec;
    border-radius: 99px;
    background: #f0f7ff;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    white-space: nowrap;
}

.preset-btn:hover { background: #dbeeff; border-color: var(--accent-blue); }
.preset-btn.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }

/* ====================================================
   RESPONSIVE
   ==================================================== */

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p  { font-size: 1.1rem; }

    .features-grid  { grid-template-columns: 1fr; }
    .benefits-grid  { grid-template-columns: 1fr; }
    .footer-links   { flex-direction: column; gap: 1rem; }

    /* Calculator responsive */
    .main-content { grid-template-columns: 1fr; }
    .sidebar { order: -1; }
    .ad-unit-mobile { display: block; }
    .ad-unit-sidebar, .ad-unit-sidebar-lg { display: none; }

    .calculator-header h1 { font-size: 2rem; }
    .calculator-header p  { font-size: 1rem; }

    /* Mobile nav */
    .nav-menu {
        display: flex;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .nav-menu.nav-open {
        max-height: 300px;
        padding: 0.5rem 0 1rem;
    }

    .nav-menu li a {
        display: block;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .nav-menu li:last-child a { border-bottom: none; }

        /* Results responsive */


    .result-value div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid #e0f2fe;
    }

    .result-value div:last-child {
        border-bottom: none;
    }
    
}

@media (min-width: 769px) {
    .nav-menu {
        display: flex;
        flex-direction: row;
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0;
        background: none;
        box-shadow: none;
    }

    .hamburger { display: none; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

a:focus, button:focus {
    outline: 2px solid var(--secondary-orange);
    outline-offset: 2px;
}

.feature-card h3 a {
    color: inherit;
    text-decoration: none;
}

.feature-card h3 a:hover {
    color: var(--accent-blue);
}

/* Gear diagram image */
.diagram {
    margin: 1.5rem 0;
    text-align: center;
}

.diagram img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.diagram figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #666;
}

/* ==========================================================
   FRAME SIZE CALCULATOR — additions for main.css
   ========================================================== */

/* Field hints and errors */
.field-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 5px;
    line-height: 1.4;
}
 
.field-error {
    font-size: 0.82rem;
    color: #dc2626;
    margin-top: 4px;
    display: none;
    line-height: 1.4;
}
 
/* Estimate note */
.estimate-note {
    font-size: 0.85rem;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}
 
/* ── Results section ── */
.results-section {
    margin-top: 2rem;
    padding: 1.75rem 1.5rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 14px;
    border-left: 4px solid var(--accent-blue);
    display: none;
}
 
.results-section.show {
    display: block;
    animation: fadeIn 0.4s ease;
}
 
.result-label {
    font-size: clamp(0.9rem, 1vw, 1rem);
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.result-data {
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    font-weight: 700;
    color: var(--primary-blue);
}
 
.result-sizes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
 
.result-cm,
.result-in {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
}
 
.result-sep {
    font-size: 1.4rem;
    color: #94a3b8;
    font-weight: 300;
}
 
.result-tag {
    background: var(--secondary-orange);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.25rem 0.9rem;
    border-radius: 99px;
    line-height: 1.4;
}
 
.result-tips {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
}
 
.result-tips h4 {
    color: var(--primary-blue);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}
 
.result-tips ul {
    padding-left: 1.2rem;
    margin: 0;
}
 
.result-tips li {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 0.35rem;
    line-height: 1.5;
}
 
/* ── Diagram / SVG figure ── */
.diagram {
    margin: 1.25rem 0 1.5rem;
    text-align: center;
}
 
.diagram svg {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
 
.diagram figcaption {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: #64748b;
    font-style: italic;
}
 
/* ── Mid-text ad (mobile only) ── */
.ad-unit-mid-text {
    display: none;
    margin: 1.5rem 0;
}
 
/* ── Info section headings ── */
.info-section h4 {
    color: var(--primary-blue);
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.3rem;
}
 
/* ── Responsive additions ── */
@media (max-width: 768px) {
    .result-cm,
    .result-in { font-size: 1.6rem; }
 
    .result-tag { font-size: 1rem; }
 
    .bike-type-grid { grid-template-columns: 1fr 1fr; }
 
    .ad-unit-mid-text { display: block; }
 
    /* Slightly tighter calculator card on mobile */
    .calculator-section { padding: 1.5rem 1.25rem; }
}

.blog-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:2rem;
}

.blog-card{
    background:#fff;
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 4px 15px rgba(0,0,0,.08);
    transition:.3s;
}

.blog-card:hover{
    transform:translateY(-5px);
}

.blog-thumbnail img{
    width:100%;
    display:block;
}

.blog-content{
    padding:1.5rem;
}

.blog-title{
    margin-bottom:1rem;
}

.blog-excerpt{
    color:#666;
}

.single-post-content {
    padding:4rem 0;
}

.post-content{
    max-width:850px;
    margin:auto;
    line-height:1.9;
}

.post-featured-image{
    margin-bottom:2rem;
}

.post-featured-image img{
    width:100%;
    border-radius:16px;
}

.ad-unit-content,
.ad-unit-blog-grid{
    display: none !important;
    margin:3rem auto;
    padding:2rem;
    text-align:center;
    border:2px dashed #ddd;
    border-radius:12px;
}

/* ==========================================================
   BLOG — fixes & improvements
   ========================================================== */

/* Въздух около грида с постовете */
.blog-archive {
    padding: 4rem 0;
}

/* Картата да е flex колона за правилно наредждане */
.blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Линкът вътре в картата */
.blog-card > a {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail — фиксирана височина за еднакви карти */
.blog-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e2e8f0;
}

.blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-thumbnail img {
    transform: scale(1.04);
}

/* Placeholder когато няма featured image */
.blog-thumbnail-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* Content padding */
.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Дата */
.blog-meta {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Заглавие на картата */
.blog-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.blog-card:hover .blog-title {
    color: var(--accent-blue);
}

/* Excerpt */
.blog-excerpt {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}

/* Read More pseudo-link */
.blog-content::after {
    content: "Read More →";
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    transition: color 0.2s ease;
}

.blog-card:hover .blog-content::after {
    color: var(--secondary-orange);
}

/* Grid — максимум 3 колони */
.blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Pagination */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.nav-links a,
.nav-links span {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links .current {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Mobile */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-archive {
        padding: 2rem 0;
    }

    .blog-thumbnail,
    .blog-thumbnail-placeholder {
        height: 180px;
    }
}

/*  POST OPTIMIZATION — BikeCalcPro Single Post */
.hero .post-meta {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.75rem;
}
 
/* H1 в hero — по-компактно от homepage hero */
.hero h1 {
    font-size: 2.6rem;
    line-height: 1.25;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
    max-width: 820px;
    margin: 0 auto;
}
 
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.9rem;
    }
}
 
/* ── Featured image ── */
.post-featured-image {
    margin-bottom: 2.5rem;
}
 
.post-featured-image img {
    width: 100%;
    border-radius: 16px;
    display: block;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
 
/* ── Wrapper на статията ── */
.post-content {
    max-width: 850px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.85;
    color: #1f2937;
}
 
/* ── Вертикален ритъм — въздух между елементите ── */
.post-content > * + * {
    margin-top: 1.5rem;
}
 
/* ── Параграфи ── */
.post-content p {
    margin-bottom: 0;   /* управляваме от > * + * */
    color: #374151;
}
 
/* ── Заглавия ── */
.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--primary-blue);
    font-weight: 700;
    line-height: 1.25;
}
 
.post-content h2 {
    font-size: 1.75rem;
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}
 
/* Първото h2 без горна линия */
.post-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 2rem;
}
 
.post-content h3 {
    font-size: 1.3rem;
    margin-top: 2.5rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--secondary-orange);
}
 
.post-content h4 {
    font-size: 1.1rem;
    margin-top: 1.75rem;
    color: var(--dark-gray);
}
 
/* ── Линкове ── */
.post-content a {
    color: var(--accent-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s ease;
}
 
.post-content a:hover {
    color: var(--secondary-orange);
}
 
/* ── Списъци ── */
.post-content ul,
.post-content ol {
    padding-left: 1.6rem;
    margin: 1.25rem 0;
}
 
.post-content li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}
 
.post-content li + li {
    margin-top: 0;
}
 
/* Table of Contents (ol в началото на поста) */
.post-content > ol:first-of-type {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    margin: 2rem 0;
}
 
.post-content > ol:first-of-type li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}
 
.post-content > ol:first-of-type a {
    color: var(--primary-blue);
    font-weight: 600;
}
 
.post-content > ol:first-of-type a:hover {
    color: var(--secondary-orange);
}
 
/* ── HR разделители ── */
.post-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 3rem 0;
}
 
/* ── Таблици ── */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}
 
.post-content thead {
    background: var(--primary-blue);
    color: #ffffff;
}
 
.post-content th {
    padding: 0.9rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    border: none;
}
 
.post-content td {
    padding: 0.85rem 1rem;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}
 
.post-content tbody tr:nth-child(even) td {
    background: #f8fafc;
}
 
.post-content tbody tr:hover td {
    background: #eff6ff;
    transition: background 0.15s ease;
}
 
/* Wrapper от WP block за overflow на mobile */
.post-content .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    margin: 2rem 0;
}
 
/* ── Blockquote / Tip box ── */
.post-content blockquote,
.post-content .wp-block-quote {
    border-left: 4px solid var(--secondary-orange);
    background: #fff7ed;
    padding: 1.25rem 1.5rem;
    border-radius: 0 10px 10px 0;
    margin: 2rem 0;
    color: #92400e;
    font-style: normal;
}
 
.post-content blockquote p,
.post-content .wp-block-quote p {
    margin: 0;
    color: #7c2d12;
    font-weight: 500;
}
 
.post-content blockquote strong,
.post-content .wp-block-quote strong {
    color: var(--secondary-orange);
}
 
/* ── Изображения вътре в поста ── */
.post-content img {
    border-radius: 12px;
    margin: 2rem auto;
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
 
/* ── Notice / Info box (.notice-box) ── */
.notice-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary-blue);
    padding: 1.25rem 1.5rem;
    border-radius: 0 10px 10px 0;
    margin: 2rem 0;
    color: #1e3a8a;
    font-size: 0.975rem;
}
 
/* ── CTA линк "Bike Tire Pressure Calculator →" ── */
.post-content a[href*="calculator"] {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--secondary-orange), #ea580c);
    color: white !important;
    text-decoration: none !important;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}
 
.post-content a[href*="calculator"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.4);
}
 
/* ── Separator след последния HR ── */
.post-content > hr:last-of-type {
    margin-bottom: 1.5rem;
}
 
/* ── Ad units в поста ── */
.ad-unit-content {
    display: none !important;
    max-width: 850px;
    margin: 2rem auto;
    padding: 1.5rem;
    text-align: center;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    color: #9ca3af;
    font-size: 0.85rem;
}
 
/* ── Mobile ── */
@media (max-width: 768px) {
    .post-content {
        font-size: 1rem;
        line-height: 1.8;
    }
 
    .post-content h2 {
        font-size: 1.45rem;
        margin-top: 2.5rem;
    }
 
    .post-content h3 {
        font-size: 1.2rem;
    }
 
    .post-content th,
    .post-content td {
        padding: 0.65rem 0.75rem;
        font-size: 0.875rem;
    }
 
    .post-content > ol:first-of-type {
        padding: 1.25rem 1.25rem 1.25rem 2rem;
    }
}

/* ── Releated Calculator " ── */

.related-calculators {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.related-calculators h3 {
    margin-bottom: 1rem;
}

.related-calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.related-calc-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 600;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.related-calc-card:hover {
    border-color: var(--secondary-orange);
    transform: translateY(-2px);
}

.related-calc-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.related-calc-name {
    font-size: 0.95rem;
}

.info-section h2.faq-heading {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}
