/* Quality Guides — main.css */

:root {
    --qg-text: #1a1a1a;
    --qg-muted: #666;
    --qg-border: #eee;
    --qg-accent: #0d6b4f;
    --qg-bg-alt: #f7f7f5;
    --qg-radius: 8px;
}

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

.hero-section {
    position: relative;
    background-color: #111111;
    color: #ffffff;
    overflow: hidden;
    padding: 80px 0 90px 0;
    min-height: 500px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
.hero-container {
    width: 100% !important;
    min-height: 340px !important; /* Резервира точната височина за текста + бутоните */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

/* Застопоряваме височината на H1 в Hero-то */
.hero-section h1 {
    min-height: 2.4em;
    line-height: 1.25 !important;
    margin: 15px 0 !important;
}

.hero-section .qg-badge {
    display: inline-block;
    min-height: 28px;
    line-height: 1.2;
}

.hero-section .section-subtitle {
    min-height: 3.2em;
}

.qg-container{max-width:1200px;margin:0 auto;padding:0 20px}
.text-center { text-align: center; }
.section-padding { padding: 60px 0; }
.bg-light { background-color: #fafafa; }
.bg-dark { background-color: #111111; color: #ffffff; }
.border-top-bottom { border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }

/* ── Header / Nav ─────────────────────────────────────────── */
.qg-nav-toggle {
    display: none;
    background: none; border: none; font-size: 1.4rem; cursor: pointer;
}
.qg-header nav ul { list-style: none; }
.qg-header nav a { color: var(--qg-text); }
.qg-header nav a:hover { color: var(--qg-accent); }

@media (max-width: 640px) {
    .qg-nav-toggle { display: block; }
    .qg-header nav { display: none; width: 100%; }
    .qg-header nav.qg-nav-open { display: block; }
    .qg-header nav ul { flex-direction: column; gap: 12px !important; padding: 16px 0; }
}

/* ── Breadcrumbs ──────────────────────────────────────────── */
.qg-breadcrumbs a { color: var(--qg-muted); }
.qg-breadcrumbs a:hover { color: var(--qg-accent); }

/* ── Typography & Badges ───────────────────────────────────── */
.section-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #111111;
}

.section-subtitle {
    color: #666666;
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.qg-badge {
    display: inline-block;
    background: #eef5ff;
    color: #0066cc;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qg-badge-pill {
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
}

.qg-badge-blue {
    color: #38bdf8 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.qg-card-meta {
    display: inline-block;
    color: #0066cc;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary { background: #0066cc; color: #ffffff; }
.btn-primary:hover { background: #0052a3; }
.btn-dark { background: #111111; color: #ffffff; }
.btn-dark:hover { background: #333333; }

/* ── Card Grids & Unique Card Fix (Zero CLS) ──────────────── */
.qg-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.qg-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.qg-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 100%;
    border: 1px solid var(--qg-border);
    border-radius: 12px;
    overflow: hidden;
    color: var(--qg-text);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.qg-card-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 600 / 400 !important;
    object-fit: cover;
    background-color: #f3f4f6; /* Плейсхолдър пазач докато се зареди */
}

.qg-card-body { padding: 20px; }
.qg-card-title { margin-top: 0; font-size: 1.3rem; font-weight: 600; }
.qg-card-text { color: #666666; font-size: 0.95rem; line-height: 1.5; }
.qg-card-link { color: #0066cc; font-weight: 700; text-decoration: none; }

/* ── Footer & CTA Components ──────────────────────────────── */
.footer-cta-wrapper {
    background: #111111;
    color: #ffffff;
    padding: 60px 0;
    border-top: 1px solid #222222;
}

.footer-cta-wrapper p,
.footer-cta-wrapper .app-badge-subtext {
    color: #d1d5db !important;
}

.app-badge-btn {
    display: inline-flex;
    align-items: center;
    background: #222222;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #333333;
    font-size: 0.85rem;
}

.app-badge-btn:hover { background: #2a2a2a; }

.newsletter-box {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.newsletter-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #333333;
    background: #111111;
    color: #ffffff;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.newsletter-input:focus {
    outline: none;
    border-color: #0066cc;
}

/* ── Media Queries ────────────────────────────────────────── */
@media (max-width: 992px) {
    .qg-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .qg-grid-4 {
        grid-template-columns: 1fr;
    }
}