/* ══════════════════════════════════════
   AltyapıCode — v2 Fixes
   Stats redesign, content cards, back nav
   ══════════════════════════════════════ */

/* ── STATS SECTION ── */
.stats-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-mint);
    border-bottom: 1px solid var(--border-mint);
    padding: 3.5rem 2rem;
    position: relative;
    overflow: hidden;
}
.stats-section::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
}
.stats-section-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stats-card {
    flex: 1;
    text-align: center;
    padding: 1.5rem 1rem;
}
.stats-card-icon {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    filter: grayscale(0.2);
}
.stats-card-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.stats-card-label {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.4;
}
.stats-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, transparent, var(--border-mint-bright), transparent);
    flex-shrink: 0;
}

/* ── BACK NAVIGATION ── */
.back-nav {
    margin-bottom: 2rem;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.25s;
}
.back-link:hover {
    color: var(--accent);
    border-color: var(--border);
    background: rgba(26, 34, 52, 0.5);
}

/* ── CONTENT CARD (Background for readability) ── */
.content-card {
    background: rgba(14, 20, 27, 0.7);
    border: 1px solid var(--border-mint);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
}
.content-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
    opacity: 0.5;
}

/* ── PAGE BODY INSIDE CARD ── */
.content-card .page-body {
    max-width: 100%;
}
.content-card .page-body p {
    color: var(--text-secondary);
    line-height: 1.85;
}
.content-card .page-body h2 {
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-top: 2.5rem;
}
.content-card .page-body h3 {
    color: var(--text-primary);
}
.content-card .page-body ul li,
.content-card .page-body ol li {
    color: var(--text-secondary);
    line-height: 1.7;
}
.content-card .page-body strong {
    color: var(--accent);
}

/* ── RESPONSIVE FIXES ── */
@media (max-width: 768px) {
    .stats-section {
        padding: 2.5rem 1rem;
    }
    .stats-section-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .stats-divider {
        display: none;
    }
    .stats-card {
        padding: 1.2rem 0.5rem;
        border-bottom: 1px solid var(--border);
    }
    .stats-card:nth-last-child(-n+2) {
        border-bottom: none;
    }
    .stats-card-number {
        font-size: 2rem;
    }
    .content-card {
        padding: 1.5rem;
        border-radius: 12px;
    }
    /* Hero actions — wrap buttons */
    .hero-actions {
        flex-wrap: wrap;
    }
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    /* Product grid — prevent overflow on small screens */
    .products-grid {
        grid-template-columns: 1fr;
    }
    .product-content {
        padding: 0 1.2rem 1.5rem;
    }
    /* Blog grid — prevent overflow */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    /* Pricing — reduce padding */
    .pricing-card {
        padding: 2rem 1.5rem;
    }
    /* Section padding */
    .section-title {
        font-size: 1.5rem;
    }
    .section-desc {
        font-size: 0.95rem;
    }
    /* Specs hero — stack */
    .specs-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .specs-metrics-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .spec-metric-value {
        font-size: 1.8rem;
    }
    /* Testimonial */
    .testimonial-text {
        font-size: 1rem;
    }
    /* Contact form */
    .contact-form {
        margin: 1.5rem auto;
    }
    /* CTA box */
    .cta-box h2 {
        font-size: 1.4rem;
    }
    .cta-box p {
        font-size: 0.9rem;
    }
    /* Footer links wrap */
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

/* ── SMALL PHONE (≤480px) ── */
@media (max-width: 480px) {
    .hero {
        padding: 5rem 1rem 2rem;
        min-height: auto;
    }
    .hero h1 {
        font-size: 1.8rem;
        letter-spacing: -0.5px;
    }
    .hero-desc {
        font-size: 1rem;
    }
    .hero-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.75rem;
    }
    .container {
        padding: 2.5rem 1rem;
    }
    .stats-section {
        padding: 2rem 0.5rem;
    }
    .stats-card {
        padding: 1rem 0.3rem;
    }
    .stats-card-number {
        font-size: 1.6rem;
    }
    .stats-card-label {
        font-size: 0.75rem;
    }
    .stats-card-icon {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    .section-title {
        font-size: 1.3rem;
    }
    .section-desc {
        font-size: 0.85rem;
        margin-bottom: 2rem;
    }
    .section-label {
        font-size: 0.7rem;
    }
    /* Workflow — single column on small phones */
    .workflow-steps {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .workflow-step {
        padding: 1rem;
    }
    .step-number {
        font-size: 2rem;
    }
    /* Pricing */
    .pricing-card {
        padding: 1.5rem 1.2rem;
    }
    .pricing-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.8rem;
    }
    /* CTA */
    .cta-section {
        padding: 3rem 1rem;
    }
    .cta-box {
        padding: 2rem 1rem;
        border-radius: 14px;
    }
    .cta-box h2 {
        font-size: 1.2rem;
    }
    /* Contact channels — full width */
    .contact-channels {
        max-width: 100%;
    }
    .contact-channel {
        padding: 0.8rem 1rem;
    }
    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    /* Nav mobile menu */
    .nav-links {
        top: 52px;
    }
    .logo {
        font-size: 1.2rem;
    }
    /* Standard cards */
    .standard-logo {
        width: 90px;
        height: 90px;
        padding: 14px;
    }
    .standard-logo img {
        max-height: 62px;
        max-width: 62px;
    }
    .standard-card {
        padding: 1.2rem;
    }
    /* Testimonial */
    .testimonial-card {
        padding: 1.5rem 1rem;
    }
    .testimonial-text {
        font-size: 0.9rem;
    }
    .testimonial-quote-icon {
        font-size: 2.5rem;
    }
    /* Back to top — smaller on mobile */
    #backToTop {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
    /* Content card */
    .content-card {
        padding: 1rem;
    }
    /* Page content */
    .page-content {
        padding-top: 5rem;
    }
    .page-header h1 {
        font-size: 1.5rem;
    }
    .page-body {
        font-size: 0.95rem;
    }
}
/* ── BACK TO TOP BUTTON ── */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.3);
}
#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#backToTop:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(34, 211, 238, 0.4);
}
