/* ============================================================
   OPERCONS — Tiny Houses  (/ro/portfolio/modulo)
   Redesign tipografic: aceeași paletă, un singur sistem.

   Se încarcă DUPĂ main.css și category.css:
   <link rel="stylesheet" href="/css/app/portfolio/tiny-houses-type.css">

   ATENȚIE: pe acest site html{font-size:10px} (Bootstrap 3),
   deci toate mărimile de aici sunt în px, nu în rem.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
    /* paleta existentă, doar denumită */
    --th-cream:  #F7F2EB;
    --th-sand:   #EDE5D8;
    --th-ink:    #2C1A0E;   /* titluri                */
    --th-body:   #4A382C;   /* text curent            */
    --th-muted:  #7A6655;   /* meta, etichete         */
    --th-olive:  #6B7A3A;   /* accent: eyebrow + link */
    --th-line:   rgba(44, 26, 14, .14);

    --th-serif:  "Cormorant Garamond", Georgia, serif;
    --th-sans:   "DM Sans", Arial, Helvetica, sans-serif;

    /* o singură scară, patru trepte */
    --th-display:   clamp(44px, 5vw, 68px);   /* h1 hero            */
    --th-title:     clamp(30px, 2.9vw, 40px); /* titlu de secțiune  */
    --th-subtitle:  21px;                     /* titlu de card      */
    --th-body-size: 16px;
    --th-eyebrow:   11px;

    --th-gap-eyebrow: 14px;   /* eyebrow → titlu  */
    --th-gap-title:   20px;   /* titlu → paragraf */
    --th-section:     96px;   /* padding vertical de secțiune */
}

/* ---------- 2. O singură regulă pentru eyebrow ----------
   Înainte erau patru variante diferite:
   11/500/2.42px, 15/300/3.3px, 11/600/2.42px, 11/500/1.1px. */
.th-banner-supra,
.th-transport-supra,
.th-portfolio-label {
    font-family: var(--th-sans);
    font-size: var(--th-eyebrow);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .2em;
    text-transform: uppercase;
    margin: 0 0 var(--th-gap-eyebrow);
}

/* ---------- 3. Titluri: toate serif, niciodată sub 400 ---------- */
.th-banner h1,
.th-transport h3,
.th-portfolio-modular h4 {
    font-family: var(--th-serif);
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    text-wrap: balance;
}

/* ---------- 4. Corp de text ---------- */
/* :not() ca să nu prindă .th-transport-supra — tot un <p> în .th-transport-cnt */
.th-banner-sub,
.th-transport-cnt p:not(.th-transport-supra),
.th-portfolio-modular p {
    font-family: var(--th-sans);
    font-size: var(--th-body-size);
    font-weight: 400;          /* era 300 — prea firav pe fundal crem */
    line-height: 1.75;
    letter-spacing: 0;
}


/* ============================================================
   HERO
   ============================================================ */
.th-banner {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 620px;
    height: auto;
    padding: 0 0 72px;
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

/* scrim — textul stă pe imagine, nu se luptă cu ea */
.th-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top,   rgba(24,16,10,.70) 0%, rgba(24,16,10,.24) 40%, rgba(24,16,10,0) 70%),
        linear-gradient(to right, rgba(24,16,10,.42) 0%, rgba(24,16,10,.06) 50%, rgba(24,16,10,0) 100%);
}

.th-banner .container { position: relative; }

.th-banner-supra { color: rgba(247, 242, 235, .78); }

/* linie scurtă sub eyebrow — ancorează blocul de text */
.th-banner-supra::after {
    content: "";
    display: block;
    width: 34px;
    height: 1px;
    margin-top: 12px;
    background: rgba(247, 242, 235, .45);
}

.th-banner h1 {
    max-width: 14ch;
    margin: 0 0 var(--th-gap-title);
    font-size: var(--th-display);
    line-height: 1.02;
    color: #fff;
}

.th-banner-sub {
    max-width: 34em;
    margin: 0;
    color: rgba(255, 255, 255, .88);
}


/* ============================================================
   BANDA "SOLUȚII MODULARE" — compactă, orizontală (desktop);
   se strânge la ~jumătate din înălțimea inițială.
   ============================================================ */
.th-usecases {
    padding: 32px 0;
    background: var(--th-sand);
}

.th-usecases .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}

/* titlu sans, nu serif — mai potrivit pe o singură bandă compactă */
.th-usecases h4 {
    flex: 1 1 280px;
    max-width: 300px;
    margin: 0;
    font-family: var(--th-sans);
    font-weight: 500;
    font-size: 19px;
    line-height: 1.35;
    text-align: left;
    color: var(--th-olive);
}

.th-usecases-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    flex: 0 0 auto;
    width: 744px;
    max-width: 100%;
}

.th-usecase {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    text-align: center;
    border-left: 1px solid rgba(44, 26, 14, .10);
}
.th-usecase:first-child { border-left: 0; }

.th-usecase svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.4;
    opacity: .9;
}

.th-usecase span {
    font-family: var(--th-sans);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--th-muted);
    max-width: 9ch;
}


/* ============================================================
   TRANSPORT ȘI MONTAJ
   ============================================================ */
/* același maro închis ca pe pagina Despre noi (.about-hero, .about-galerie-section) */
.th-transport {
    background: #2C1A0E;
}

.th-transport-cnt-inner {
    max-width: 520px;
    padding: 72px 0;
}

/* font/dimensiune identice cu .about-hero-supra de pe Despre noi
   (weight 500, letter-spacing .22em — eyebrow-ul general e 600/.2em);
   selector dublu-clasă ca să bată specificitatea lui .th-transport-cnt p
   din category.css, care altfel suprascrie orice se pune aici pe un
   singur .th-transport-supra */
.th-transport-cnt .th-transport-supra {
    font-size: var(--th-eyebrow);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .22em;
    color: var(--th-olive);
}

.th-transport h3 {
    margin: 0 0 var(--th-gap-title);
    font-size: var(--th-title);
    line-height: 1.15;
    color: #F7F2EB;
}

/* :not() ca să nu prindă și .th-transport-supra (tot un <p> în același bloc) */
.th-transport-cnt p:not(.th-transport-supra) {
    max-width: 46ch;
    margin: 0;
    color: rgba(247, 242, 235, .82);
    /* linie verde pe toată înălțimea, ca .about-hero-quote pe Despre noi */
    border-left: 3px solid #6B7A3A;
    padding-left: 22px;
}

.th-transport-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ============================================================
   PORTOFOLIU
   ============================================================ */
.section .th-portfolio-label {
    color: var(--th-olive);
    text-align: center;
    margin-bottom: 22px;
}

hr.category-line {
    max-width: 60px;
    margin: 0 auto 56px;
    border: 0;
    border-top: 1px solid var(--th-line);
}

/* grilă egală în locul coloanelor Bootstrap cu înălțimi diferite */
.category-projects .row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    margin: 0;
}
.category-projects .row > [class*="col-"] {
    width: 100%;
    float: none;
    padding: 0;
}
.category-project { padding: 0; margin: 0; }

.category-project a.a-default {
    display: block;
    overflow: hidden;
    text-decoration: none;
    background: transparent;
}

.category-project img {
    width: 100%;
    aspect-ratio: 4 / 3;     /* grila era zimțată: poze de proporții diferite */
    object-fit: cover;
    display: block;
    background: var(--th-sand);
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.category-project a.a-default:hover img { transform: scale(1.035); }

/* titlul proiectului: serif, nu DM Sans 16px */
.category-project-cnt {
    padding-top: 18px;
    font-family: var(--th-serif);
    font-size: var(--th-subtitle);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--th-ink);
    transition: color .25s ease;
}
.category-project:hover .category-project-cnt { color: var(--th-olive); }

.category-project-line {
    margin-top: 16px;
    border-top: 1px solid var(--th-line);
    height: 0;
}


/* spațiul gol dintre grila de proiecte și banda th-tour de mai jos:
   .section global adaugă 100px padding-bottom, peste care se aduna
   și margin-bottom-ul .category-projects — le reducem doar aici,
   la fel cum .th-portfolio-modular își reduce padding-top-ul mai jos */
.th-portfolio-section { padding-bottom: 40px; }
.th-portfolio-section .category-projects { margin-bottom: 0; }


/* ============================================================
   TURNEUL FOOD TRUCK — intenționat neatins (rămâne exact ca pe
   staging: layout flex cu accordion la hover, raport 4:5).
   ============================================================ */


/* ============================================================
   CTA FINAL
   ============================================================ */
.th-portfolio-modular { padding: var(--th-section) 0; }

.th-portfolio-modular hr {
    max-width: 60px;
    margin: 0 auto;
    border: 0;
    border-top: 1px solid var(--th-line);
}

.th-portfolio-modular h4 {
    margin: 56px 0 var(--th-gap-title);
    font-size: var(--th-title);
    line-height: 1.2;
    color: var(--th-ink);
}

.th-portfolio-modular p.margin-bottom-sec {
    max-width: 520px;
    margin: 0 auto 28px;
    color: var(--th-body);
}

.th-portfolio-modular a {
    font-family: var(--th-sans);
    font-size: var(--th-eyebrow);
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--th-olive);
    text-decoration: none;
    border-bottom: 1px solid rgba(107, 122, 58, .45);
    padding-bottom: 4px;
    transition: border-color .25s ease;
}
.th-portfolio-modular a:hover { border-bottom-color: var(--th-olive); }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    :root { --th-section: 72px; }

    .th-usecases .container { flex-direction: column; gap: 24px; }
    .th-usecases h4          { flex: none; max-width: 480px; text-align: center; }
    .th-usecases-row         { width: 100%; max-width: 480px; }

    .category-projects .row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    :root {
        --th-section: 56px;
        --th-display: 40px;
        --th-title:   28px;
    }

    .th-banner      { min-height: 480px; padding-bottom: 48px; }
    .th-banner h1   { max-width: none; }

    .th-usecases        { padding: 32px 0; }
    /* display:block in loc de flex — centrarea prin margin:auto pe un
       grid-item de flex depinde de o interacÈ›ie ambiguÄƒ Ã®ntre align-items
       È™i width/max-width, care s-a dovedit inconsistentÄƒ Ã®n Safari iOS;
       Ã®n flux normal de bloc, margin:auto centreazÄƒ garantat, peste tot */
    .th-usecases .container { display: block; text-align: center; }
    .th-usecases-row    { grid-template-columns: repeat(3, 1fr); gap: 24px 0; width: 360px; max-width: 100%; margin: 24px auto 0; }
    .th-usecase         { border-left: 0; }

    .th-transport-cnt-inner { padding: 48px 0; max-width: none; }

    .category-projects .row { grid-template-columns: 1fr; gap: 32px; }
}
