/* =================== TECH DETAIL PAGES =================== */

.tech-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 72px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid #EAEAEA;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.tech-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.25s ease;
    font-family: var(--font);
    white-space: nowrap;
    flex-shrink: 0;
}

.tech-back:hover {
    background: #f0f0f0;
    color: #000;
}

/* =================== HERO =================== */
.t-hero {
    min-height: 100vh;
    background: #080808;
    padding: 120px 5% 90px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.t-hero::after {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--tc, #E11300) 0%, transparent 65%);
    opacity: 0.07;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.t-hero-inner {
    max-width: 1160px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 80px;
    align-items: center;
}

/* Prevent hero text from overflowing on small screens */
.t-hero-inner > div:first-child { min-width: 0; }

.t-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
    font-family: var(--font);
}

.t-name {
    font-family: var(--font-disp);
    font-size: clamp(52px, 9vw, 90px);
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 20px;
}

.t-name em {
    font-style: normal;
    color: var(--tc, #61DAFB);
}

.t-tagline {
    font-size: 17px;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    max-width: 500px;
    margin-bottom: 40px;
    font-family: var(--font);
}

.t-hero-meta {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
}

.t-meta-item { display: flex; flex-direction: column; gap: 4px; }

.t-meta-val {
    font-size: 22px;
    font-weight: 700;
    color: var(--tc, #E11300);
    font-family: var(--font-disp);
}

.t-meta-lbl {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font);
}

.t-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 220px;
    position: relative;
    flex-shrink: 0;
}

.t-hero-icon::before {
    content: '';
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: var(--tc, #61DAFB);
    opacity: 0.07;
    filter: blur(50px);
}

.t-hero-icon svg {
    width: 130px;
    height: 130px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 24px var(--tc, #61DAFB));
    opacity: 0.9;
}

/* =================== CONTENT SECTIONS =================== */
.t-section {
    padding: 100px 5%;
    background: #fff;
    box-sizing: border-box;
}

.t-section:nth-of-type(even) {
    background: #F7F7F8;
}

.t-section-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.t-section:nth-of-type(even) .t-section-inner { direction: rtl; }
.t-section:nth-of-type(even) .t-text,
.t-section:nth-of-type(even) .t-mockup { direction: ltr; }

/* Critical: grid children need min-width:0 to not overflow their column */
.t-text, .t-mockup {
    min-width: 0;
    width: 100%;
}

.t-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--tc, #E11300);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 12px;
    font-family: var(--font);
}

.t-heading {
    font-family: var(--font-disp);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    color: #0A0A0A;
    line-height: 1.2;
    margin-bottom: 20px;
}

.t-body {
    color: #555;
    line-height: 1.85;
    font-size: 15.5px;
    font-family: var(--font);
}

.t-body p + p { margin-top: 16px; }

/* =================== SCROLL REVEAL =================== */
.t-reveal {
    opacity: 0;
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

.t-reveal.from-right { transform: translateX(52px); }
.t-reveal.from-left  { transform: translateX(-52px); }
.t-reveal.from-below { transform: translateY(44px); }

.t-reveal.visible {
    opacity: 1;
    transform: translate(0);
}

/* =================== CTA =================== */
.t-cta {
    background: #080808;
    padding: 110px 5%;
    text-align: center;
    box-sizing: border-box;
}

.t-cta h2 {
    font-family: var(--font-disp);
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.t-cta p {
    color: rgba(255,255,255,0.4);
    font-size: 17px;
    margin-bottom: 36px;
    font-family: var(--font);
}

.t-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #E11300;
    color: #fff;
    text-decoration: none;
    padding: 16px 34px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    font-family: var(--font);
    transition: all 0.3s ease;
}

.t-cta-btn:hover {
    background: #c41100;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(225,19,0,0.4);
}

/* =================== MOCKUPS =================== */

.mk {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.65;
    width: 100%;
    max-width: 100%;
}

.mk-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #2d2d2d;
    flex-shrink: 0;
    overflow: hidden;
}

.mk-dots { display: flex; gap: 6px; flex-shrink: 0; }
.mk-dots span { display: block; width: 11px; height: 11px; border-radius: 50%; }
.mk-dots span:nth-child(1) { background: #FF5F57; }
.mk-dots span:nth-child(2) { background: #FFBD2E; }
.mk-dots span:nth-child(3) { background: #28C840; }

.mk-fname {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    flex: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* CODE */
.mk-code { background: #1e1e1e; }
.mk-code .mk-bar { background: #323232; }
.mk-code pre {
    margin: 0;
    padding: 18px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    line-height: 1.8;
    white-space: pre;
    color: #d4d4d4;
}

/* Syntax colors */
.ck { color: #569cd6; }
.cf { color: #dcdcaa; }
.cs { color: #ce9178; }
.ct { color: #4ec9b0; }
.ca { color: #9cdcfe; }
.cc { color: #6a9955; }
.cn { color: #b5cea8; }
.cd { color: #c586c0; }
.ln {
    color: rgba(255,255,255,0.15);
    margin-right: 14px;
    display: inline-block;
    width: 20px;
    text-align: right;
    font-size: 11px;
}

/* BROWSER */
.mk-browser { background: #fff; }
.mk-browser .mk-bar { background: #dcdcdc; gap: 10px; }
.mk-browser .url-bar {
    flex: 1;
    background: #fff;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 11px;
    color: #666;
    font-family: var(--font);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}
.mk-browser .mk-body { min-height: 220px; overflow: hidden; }

/* TERMINAL */
.mk-terminal { background: #0d1117; }
.mk-terminal .mk-bar { background: #161b22; }
.mk-terminal .mk-body {
    padding: 14px 18px;
    color: #c9d1d9;
    line-height: 1.95;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tl { display: block; white-space: nowrap; }
.tp { color: #3fb950; margin-right: 8px; }
.to { color: #8b949e; }
.ts { color: #3fb950; }
.te { color: #f85149; }
.ti { color: #58a6ff; }
.tw { color: #e3b341; }

/* PHONE */
.mk-phone {
    background: transparent;
    box-shadow: none;
    overflow: visible;
    display: flex;
    justify-content: center;
}
.pframe {
    width: 210px;
    background: #111;
    border-radius: 38px;
    padding: 12px;
    box-shadow: 0 0 0 2px #2a2a2a, 0 0 0 5px #0d0d0d,
                0 32px 64px rgba(0,0,0,0.5),
                inset 0 0 0 1px rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.pnotch { width: 70px; height: 20px; background: #111; border-radius: 0 0 14px 14px; margin: 0 auto 6px; }
.pscreen { background: #fff; border-radius: 26px; overflow: hidden; min-height: 360px; }
.phome { height: 18px; display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.phome::after { content: ''; display: block; width: 70px; height: 4px; background: rgba(255,255,255,0.18); border-radius: 2px; }

/* DIAGRAM */
.mk-diag { background: #0f172a; }
.mk-diag .mk-bar { background: #1e293b; }
.mk-diag .mk-body {
    padding: 24px 20px;
    font-family: var(--font);
    overflow: hidden;
}
/* All direct children of diagram body wrap automatically */
.mk-diag .mk-body > div {
    flex-wrap: wrap !important;
    row-gap: 6px;
}
.d-node { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.d-box { padding: 7px 13px; border-radius: 8px; font-size: 11px; font-weight: 600; text-align: center; white-space: nowrap; }
.d-lbl { font-size: 10px; color: rgba(255,255,255,0.35); }
.d-arrow { color: rgba(255,255,255,0.25); font-size: 18px; display: flex; align-items: center; }

/* DATABASE */
.mk-db { background: #fff; }
.mk-db .mk-bar { background: #1e1e1e; }
.mk-db table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; min-width: 340px; }
.mk-db thead { background: #f4f6f8; }
.mk-db th { padding: 9px 14px; text-align: left; color: #666; font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #e5e7eb; }
.mk-db td { padding: 8px 14px; border-bottom: 1px solid #f0f0f0; color: #333; }
.mk-db tr:last-child td { border-bottom: none; }
.mk-db tr:hover td { background: #f9fafb; }
.dp { color: #E11300; font-weight: 700; }
.df { color: #2563eb; }
.dv { color: #059669; }
.dn { color: #7c3aed; }
.dd { color: #d97706; }

/* Prevent horizontal overflow on all tech page sections */
.t-hero, .t-section, .t-cta, .tech-nav {
    max-width: 100%;
    overflow-x: hidden;
}

/* TECH ITEM */
.tech-link { cursor: pointer; text-decoration: none; display: block; }

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

/* Tablets (≤ 900px) */
@media (max-width: 900px) {
    .t-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .t-hero-icon {
        width: 110px;
        height: 110px;
        margin: 0 auto;
    }
    .t-hero-icon svg { width: 80px; height: 80px; }

    .t-section-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .t-section:nth-of-type(even) .t-section-inner { direction: ltr; }
    .t-section:nth-of-type(even) .t-text,
    .t-section:nth-of-type(even) .t-mockup { direction: ltr; }

    .t-hero-meta { flex-wrap: wrap; gap: 20px; }
    .t-hero    { padding: 100px 5% 72px; }
    .t-section { padding: 72px 5%; }
    .t-cta     { padding: 80px 5%; }
}

/* Phablets (≤ 768px) */
@media (max-width: 768px) {
    .tech-nav { height: 60px; padding: 0 5%; }
    .tech-nav > a:last-child { display: none; }

    .t-hero    { padding: 88px 5% 60px; }
    .t-name    { font-size: clamp(38px, 11vw, 64px); }
    .t-tagline { font-size: 15px; }
    .t-heading { font-size: clamp(20px, 5vw, 28px); }
    .t-body    { font-size: 14.5px; line-height: 1.8; }

    .t-section { padding: 64px 5%; }
    .t-cta     { padding: 72px 5%; }
    .t-cta h2  { font-size: clamp(22px, 6vw, 36px); }
    .t-cta p   { font-size: 15px; }

    .t-meta-val  { font-size: 18px; }
    .t-hero-meta { gap: 16px 28px; }
    .mk-code pre { font-size: 11px; line-height: 1.7; }
    .mk-terminal .mk-body { font-size: 11px; }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
    /* Nav */
    .tech-nav  { height: 56px; padding: 0 4%; }
    .tech-nav img { height: 26px; }
    .tech-back { font-size: 12px; padding: 5px 8px; gap: 5px; }
    .tech-back svg { width: 13px; height: 13px; flex-shrink: 0; }

    /* Hero */
    .t-hero       { padding: 74px 4% 44px; min-height: auto; }
    .t-hero-icon  { display: none; }
    .t-name       { font-size: clamp(30px, 11vw, 50px); letter-spacing: -0.5px; }
    .t-tag        { font-size: 9px; padding: 4px 10px; letter-spacing: 1px; margin-bottom: 16px; }
    .t-tagline    { font-size: 13.5px; margin-bottom: 22px; line-height: 1.65; }
    .t-hero-meta  { gap: 12px 20px; }
    .t-meta-val   { font-size: 15px; }
    .t-meta-lbl   { font-size: 9px; }

    /* Sections */
    .t-num        { font-size: 10px; letter-spacing: 1.5px; }
    .t-heading    { font-size: clamp(16px, 5.5vw, 22px); margin-bottom: 12px; }
    .t-body       { font-size: 13.5px; line-height: 1.75; }
    .t-section    { padding: 44px 4%; }
    .t-section-inner { gap: 22px; }

    /* CTA */
    .t-cta        { padding: 48px 4%; }
    .t-cta h2     { font-size: clamp(18px, 6vw, 28px); }
    .t-cta p      { font-size: 13.5px; margin-bottom: 24px; }
    .t-cta-btn    { padding: 13px 22px; font-size: 14px; gap: 8px; }

    /* Mockup bar */
    .mk-bar       { padding: 8px 10px; gap: 5px; }
    .mk-dots span { width: 9px; height: 9px; }
    .mk-fname     { font-size: 10px; }

    /* Code block */
    .mk-code pre  { font-size: 10px; line-height: 1.65; padding: 12px 10px; }

    /* Terminal */
    .mk-terminal .mk-body { font-size: 10px; padding: 10px 12px; line-height: 1.75; }

    /* Browser mockup */
    .mk-browser .mk-body  { min-height: auto; }
    .mk-browser .url-bar  { font-size: 9px; padding: 2px 8px; }

    /* Phone mockup */
    .pframe  { width: 170px; border-radius: 30px; padding: 10px; }
    .pscreen { min-height: 270px; border-radius: 20px; }
    .pnotch  { width: 54px; height: 16px; }

    /* Diagram */
    .mk-diag .mk-body { padding: 14px 8px; font-size: 10px; }
    .d-box   { font-size: 9px; padding: 4px 7px; }
    .d-arrow { font-size: 13px; }
}

/* Telas muito pequenas (≤ 380px) */
@media (max-width: 380px) {
    .tech-nav    { padding: 0 3%; }
    .t-hero      { padding: 70px 3% 36px; }
    .t-section   { padding: 36px 3%; }
    .t-cta       { padding: 40px 3%; }
    .t-name      { font-size: clamp(26px, 10vw, 42px); }
    .mk-code pre { font-size: 9.5px; }
    .mk-terminal .mk-body { font-size: 9.5px; }
    .d-box       { font-size: 8.5px; padding: 3px 6px; }
}
