/* ==========================================================================
   TF ELETTRA — stylesheet
   ========================================================================== */

:root {
    --primary: #1438c9;
    --primary-dark: #0d2a9c;
    --primary-light: #3b62f0;
    --accent: #2b6dff;
    --navy: #0b1730;
    --navy-2: #11203f;
    --ink: #0f1b33;
    --muted: #5c6a86;
    --line: #e4e8f0;
    --bg: #ffffff;
    --bg-alt: #f4f7fc;
    --white: #ffffff;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 2px 8px rgba(16, 33, 66, .06);
    --shadow: 0 14px 40px rgba(16, 33, 66, .10);
    --shadow-lg: 0 30px 70px rgba(11, 23, 48, .22);
    --container: 1200px;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --header-h: 76px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: 'Space Grotesk', 'Inter', sans-serif; line-height: 1.15; color: var(--ink); font-weight: 700; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 26px; border-radius: 50px; font-weight: 600; font-size: .98rem;
    cursor: pointer; border: 2px solid transparent; transition: all .25s var(--ease);
    white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(20, 56, 201, .28); }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(20, 56, 201, .34); }
.btn--ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: #fff; color: var(--primary); border-color: #fff; transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ---------- top bar ---------- */
.topbar { background: var(--navy); color: rgba(255,255,255,.82); font-size: .82rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.topbar__contacts { display: flex; gap: 22px; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.82); transition: color .2s; }
.topbar__item:hover { color: #fff; }
.topbar__item svg { width: 15px; height: 15px; fill: var(--accent); }
.topbar__right { display: flex; align-items: center; gap: 18px; }
.topbar__linkedin svg { fill: var(--accent); width: 16px; height: 16px; }

.lang-switch { display: inline-flex; align-items: center; gap: 4px; }
.lang-btn {
    background: none; border: none; color: rgba(255,255,255,.55); font-weight: 700;
    font-size: .82rem; cursor: pointer; padding: 2px 4px; transition: color .2s; font-family: inherit;
}
.lang-btn[aria-pressed="true"] { color: #fff; }
.lang-btn:hover { color: #fff; }
.lang-sep { color: rgba(255,255,255,.3); }

/* ---------- header ---------- */
.header {
    position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
    transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand__logo { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
    padding: 9px 15px; font-weight: 500; font-size: .95rem; color: var(--ink);
    border-radius: 8px; position: relative; transition: color .2s;
}
.nav__link::after {
    content: ''; position: absolute; left: 15px; right: 15px; bottom: 4px; height: 2px;
    background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav__link:hover { color: var(--primary); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__cta { background: var(--primary); color: #fff; margin-left: 8px; }
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--primary-dark); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--ink); border-radius: 3px; transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: clamp(560px, 86vh, 820px); display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero__bg {
    position: absolute; inset: 0; background: url('../img/hero.jpg') center/cover no-repeat;
    transform: scale(1.06); animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(110deg, rgba(8,18,42,.92) 0%, rgba(8,18,42,.72) 42%, rgba(11,23,48,.45) 100%);
}
.hero__inner { position: relative; z-index: 2; max-width: 760px; padding: 60px 0; }
.hero__eyebrow {
    text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 600;
    color: #8fb4ff; margin-bottom: 18px;
}
.hero__title { font-size: clamp(2.1rem, 5.2vw, 3.7rem); color: #fff; margin-bottom: 20px; }
.hero__subtitle { font-size: clamp(1.02rem, 1.6vw, 1.22rem); color: rgba(255,255,255,.88); max-width: 620px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__badge {
    font-size: .8rem; font-weight: 600; letter-spacing: .04em; padding: 7px 14px; border-radius: 50px;
    border: 1px solid rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.06);
}

/* ---------- stats ---------- */
.stats { background: var(--primary); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 34px 16px; border-right: 1px solid rgba(255,255,255,.16); }
.stat:last-child { border-right: none; }
.stat__num { display: block; font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 700; }
.stat__label { display: block; font-size: .9rem; color: rgba(255,255,255,.85); margin-top: 4px; }

/* ---------- generic section ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--navy); color: rgba(255,255,255,.82); }
.section--dark .section__title { color: #fff; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
.section__title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.section__lead { color: var(--muted); font-size: 1.08rem; }
.section--dark .section__lead { color: rgba(255,255,255,.72); }

.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.eyebrow--light { color: #8fb4ff; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(36px, 6vw, 72px); align-items: center; }
.about__media { position: relative; }
.about__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about__media-badge {
    position: absolute; right: -14px; bottom: -22px; background: var(--primary); color: #fff;
    padding: 18px 22px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 200px;
}
.about__media-badge strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 2rem; line-height: 1; }
.about__media-badge span { font-size: .82rem; color: rgba(255,255,255,.88); }
.about__content p { color: var(--muted); margin-bottom: 16px; }
.checklist { margin-top: 22px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 34px; color: var(--ink); font-weight: 500; }
.checklist li::before {
    content: ''; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(20,56,201,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231438c9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/13px no-repeat;
}

/* ---------- service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px;
    transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon {
    width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent)); margin-bottom: 20px;
}
.card__icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .97rem; }

/* ---------- certifications ---------- */
.certs { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(36px, 6vw, 70px); align-items: center; }
.certs__content p { color: rgba(255,255,255,.78); margin-bottom: 16px; }
.certs__content strong { color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0; }
.tags li {
    font-size: .82rem; font-weight: 500; padding: 7px 14px; border-radius: 50px;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); color: #fff;
}
.certs__mtr { background: rgba(43,109,255,.14); border-left: 3px solid var(--accent); padding: 14px 18px; border-radius: 8px; margin-bottom: 24px !important; }
.certs__media { display: grid; gap: 18px; }
.certs__fig { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.certs__fig img { width: 100%; height: 210px; object-fit: cover; }
.certs__fig figcaption { padding: 12px 16px; font-size: .85rem; color: var(--muted); background: #fff; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery__item {
    position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
    aspect-ratio: 3/4; box-shadow: var(--shadow-sm);
}
.gallery__item:nth-child(4n+1) { grid-row: span 1; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery__item:hover img { transform: scale(1.07); }
.gallery__item figcaption {
    position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; color: #fff;
    background: linear-gradient(transparent, rgba(8,18,42,.9)); transform: translateY(4px); transition: transform .3s;
}
.gallery__sector { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8fb4ff; font-weight: 700; margin-bottom: 3px; }
.gallery__name { display: block; font-size: .95rem; font-weight: 600; font-family: 'Space Grotesk', sans-serif; line-height: 1.25; }

/* ---------- worldwide ---------- */
.worldwide {
    background: linear-gradient(120deg, var(--primary-dark), var(--primary) 60%, var(--accent));
    color: #fff; padding: clamp(54px, 7vw, 84px) 0;
}
.worldwide__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.worldwide p { color: rgba(255,255,255,.82); }
.worldwide__countries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.worldwide__countries li {
    display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05rem;
    background: rgba(255,255,255,.1); padding: 14px 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16);
}

/* ---------- news ---------- */
.news { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.news__item {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px;
    border-top: 3px solid var(--primary); transition: transform .3s var(--ease), box-shadow .3s;
}
.news__item:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news__item time { font-size: .8rem; font-weight: 600; color: var(--primary); letter-spacing: .03em; }
.news__item h3 { font-size: 1.12rem; margin: 10px 0 8px; }
.news__item p { color: var(--muted); font-size: .94rem; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 70px); align-items: start; }
.contact__block { margin-top: 26px; }
.contact__block h4, .contact__grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin-bottom: 6px; }
.contact__block p { color: var(--ink); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 26px; }
.contact__grid a { color: var(--ink); transition: color .2s; }
.contact__grid a:hover { color: var(--primary); }
.contact__map { display: inline-block; margin-top: 26px; font-weight: 600; color: var(--primary); }
.contact__map:hover { text-decoration: underline; }

.contact__form { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 38px); }
.field { margin-bottom: 18px; }
.field label, .field__check span { font-size: .88rem; font-weight: 500; color: var(--ink); }
.field label { display: block; margin-bottom: 7px; }
.field input, .field textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; font: inherit;
    font-size: .95rem; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,56,201,.12); }
.field textarea { resize: vertical; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field--row label { margin-bottom: 7px; }
.field__check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; cursor: pointer; }
.field__check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.form__note { font-size: .8rem; color: var(--muted); margin-top: 14px; }
.form__note.is-success { color: #0a8a3f; font-weight: 600; }
.form__note.is-error { color: #c0392b; font-weight: 600; }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,.7); padding-top: clamp(50px, 7vw, 76px); }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer__logo { font-family: 'Space Grotesk', sans-serif; font-size: 1.7rem; font-weight: 700; color: #fff; letter-spacing: .04em; margin-bottom: 16px; }
.footer__logo span { color: var(--accent); margin-left: 4px; }
.footer__col--brand p { font-size: .95rem; max-width: 360px; margin-bottom: 18px; }
.footer__certs { display: flex; gap: 8px; flex-wrap: wrap; }
.footer__certs span { font-size: .74rem; font-weight: 600; padding: 5px 11px; border-radius: 50px; border: 1px solid rgba(255,255,255,.2); color: #fff; }
.footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer__col ul { display: grid; gap: 9px; }
.footer__col a, .footer__col li { font-size: .93rem; transition: color .2s; }
.footer__col a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; }
.footer__bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; }

/* ---------- lightbox ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 200; background: rgba(6,12,28,.92); display: none;
    align-items: center; justify-content: center; padding: 4vw; opacity: 0; transition: opacity .25s;
}
.lightbox.is-open { display: flex; opacity: 1; }
.lightbox__figure { max-width: 1000px; max-height: 88vh; text-align: center; }
.lightbox__figure img { max-width: 100%; max-height: 80vh; border-radius: 10px; box-shadow: var(--shadow-lg); object-fit: contain; }
.lightbox__figure figcaption { color: #fff; margin-top: 14px; font-size: 1rem; font-weight: 500; }
.lightbox__close { position: absolute; top: 18px; right: 26px; background: none; border: none; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; opacity: .8; transition: opacity .2s; }
.lightbox__close:hover { opacity: 1; }
.lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.25); color: #fff; width: 52px; height: 52px; border-radius: 50%;
    font-size: 1.9rem; cursor: pointer; transition: background .2s; display: grid; place-items: center;
}
.lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__prev { left: 3vw; }
.lightbox__next { right: 3vw; }

/* ---------- back to top ---------- */
.to-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
    background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 1.2rem;
    box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px); transition: all .3s var(--ease);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--primary-dark); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .news { grid-template-columns: repeat(2, 1fr); }
    .certs, .about, .contact, .worldwide__inner { grid-template-columns: 1fr; }
    .about__media-badge { right: 16px; }
    .certs__media { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; }
    .topbar__contacts .topbar__item span { display: none; }
    .topbar { font-size: .78rem; }
    .topbar__contacts { gap: 14px; }

    .nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
        background: #fff; padding: 14px 20px 24px; gap: 2px; border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .35s var(--ease);
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    }
    .nav.is-open { transform: translateY(0); }
    .nav__link { padding: 14px 10px; border-bottom: 1px solid var(--line); border-radius: 0; }
    .nav__link::after { display: none; }
    .nav__cta { margin: 12px 0 0; text-align: center; border-radius: 8px; }
    .nav-toggle { display: flex; }

    .stats__grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: none; }
    .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,.16); }

    .cards { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .news { grid-template-columns: 1fr; }
    .field--row, .contact__grid { grid-template-columns: 1fr; }
    .about__media-badge { position: static; max-width: none; margin-top: 16px; display: inline-flex; align-items: center; gap: 12px; }
    .about__media-badge strong { font-size: 1.6rem; }
    .footer__inner { grid-template-columns: 1fr; gap: 30px; }
    .lightbox__nav { width: 42px; height: 42px; font-size: 1.5rem; }
    .lightbox__prev { left: 8px; } .lightbox__next { right: 8px; }
}

@media (max-width: 460px) {
    .gallery { grid-template-columns: 1fr; }
    .certs__media { grid-template-columns: 1fr; }
    .hero__badge { font-size: .72rem; padding: 6px 11px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
