/* ===================================================================
   TuxCorp — layout: header/navigation, language switch, heroes, footer
   =================================================================== */

/* ===================================================================
   Navigation — FIXED at top
   =================================================================== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--nav-h);
    display: flex; align-items: center; gap: 1rem;
    padding: 0 5%;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.logo {
    display: inline-flex; align-items: center; gap: .6rem;
    text-decoration: none; color: var(--navy);
    font-weight: 900; letter-spacing: .5px;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.logo .logo-mark {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--navy);
}
.logo .logo-word span { color: var(--gold-dark); }

.nav-links {
    display: flex; list-style: none;
    margin-left: auto;
    align-items: center;
}
.nav-links li a {
    color: var(--ink); text-decoration: none;
    margin-left: 1.75rem; font-weight: 600;
    transition: var(--transition);
    position: relative; padding: .25rem 0;
    white-space: nowrap;
}
.nav-links li a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
    height: 2px; background: var(--gold);
    transform: scaleX(0); transform-origin: left;
    transition: transform .25s;
}
.nav-links li a:hover,
.nav-links li a[aria-current] { color: var(--navy); }
.nav-links li a:hover::after,
.nav-links li a[aria-current]::after { transform: scaleX(1); }

/* Language toggle (animated flag flip) */
.lang-toggle {
    display: block;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 2px solid var(--border);
    padding: 0; background: var(--white);
    cursor: pointer;
    margin-left: 1.5rem;
    perspective: 600px;
    transition: transform .25s, border-color .25s;
    flex-shrink: 0;
}
.lang-toggle:hover { transform: scale(1.08); border-color: var(--gold); }
.lang-toggle:active { transform: scale(.94); }
.lang-toggle .flag {
    position: absolute; inset: 2px;
    border-radius: 50%; overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: transform .6s cubic-bezier(.6,.2,.2,1), opacity .3s;
}
.lang-toggle .flag svg { width: 100%; height: 100%; display: block; }
.lang-toggle .flag-en { transform: rotateY(0deg); }
.lang-toggle .flag-bg { transform: rotateY(180deg); opacity: 0; }
.lang-toggle[data-lang="bg"] .flag-en { transform: rotateY(-180deg); opacity: 0; }
.lang-toggle[data-lang="bg"] .flag-bg { transform: rotateY(0deg); opacity: 1; }

/* Mobile hamburger */
.menu-toggle {
    display: none;
    flex-direction: column; gap: 5px;
    background: transparent; border: 0; cursor: pointer; padding: 8px;
    flex-shrink: 0;
}
.menu-toggle .bar {
    display: block; width: 26px; height: 3px;
    background: var(--navy); border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}
/* Hamburger → X when open */
.navbar.is-open .menu-toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.navbar.is-open .menu-toggle .bar:nth-child(2) {
    opacity: 0; transform: scaleX(0);
}
.navbar.is-open .menu-toggle .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===================================================================
   Hero (home page) — FULL VIEWPORT
   =================================================================== */
.hero {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    text-align: center; padding: 4rem 20px;
    color: var(--white);
    background:
        linear-gradient(rgba(6,26,50,.65), rgba(12,49,90,.78)),
        url("https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&q=80&w=2070")
        center/cover;
}
.hero-full {
    min-height: calc(100vh - var(--nav-h));
    min-height: calc(100dvh - var(--nav-h));
}
.hero h1 {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    margin-bottom: 1rem; text-transform: uppercase;
    text-shadow: 0 2px 14px rgba(0,0,0,.35);
    letter-spacing: 1px;
}
.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,.92);
    max-width: 700px;
}
.hero .lead {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    max-width: 750px; margin-bottom: 2rem;
}

/* ===================================================================
   Detail hero — supports VIDEO backgrounds
   =================================================================== */
.detail-hero {
    position: relative; overflow: hidden;
    min-height: 55vh;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    text-align: center; padding: 4rem 20px;
    color: var(--white);
    background: var(--navy);
    isolation: isolate;
}
.detail-hero-content {
    position: relative; z-index: 3;
    max-width: 800px;
}
.detail-hero h1 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.detail-hero .tagline {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    color: rgba(255,255,255,.96);
    max-width: 720px; margin: 0 auto;
    text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

/* Video background */
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    overflow: hidden;
    background: var(--navy);
}
.hero-bg .hero-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border: 0;
}
.hero-bg .hero-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
/* Darken overlay on top of the video so white text is readable */
.hero-bg::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(6,26,50,.55), rgba(12,49,90,.7));
    z-index: 1;
}
/* Tint variants per service */
.hero-bg.tint-cnc::after  { background: linear-gradient(180deg, rgba(12,49,90,.55), rgba(228,180,80,.25)); }
.hero-bg.tint-3d::after   { background: linear-gradient(180deg, rgba(12,49,90,.5),  rgba(12,49,90,.7)); }
.hero-bg.tint-web::after  { background: linear-gradient(180deg, rgba(6,26,50,.6),   rgba(12,49,90,.78)); }
.hero-bg.tint-host::after { background: linear-gradient(180deg, rgba(12,49,90,.55), rgba(26,77,122,.75)); }
.hero-bg.tint-ai::after   { background: linear-gradient(135deg, rgba(12,49,90,.55), rgba(142,45,226,.45)); }


/* Footer */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.85);
    padding: 1.5rem 1rem 1rem;
    border-top: 4px solid var(--gold);
}
/* Desktop/laptop: 2 rows — (socials · contact · terms) and (copyright).
   Phones (max-width 640px): stacked in 4 rows, see media query below. */
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; flex-direction: row; flex-wrap: wrap;
    justify-content: space-between; align-items: center;
    gap: .75rem 2rem;
}
.footer-inner .copyright {
    flex: 1 0 100%;
    text-align: center;
    padding-top: .75rem;
    border-top: 1px solid rgba(255,255,255,.12);
}
.socials {
    display: flex; gap: 1rem; list-style: none;
    padding: 0; margin: 0;
}
.socials a {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: var(--gold);
    border: 1.5px solid rgba(228,180,80,.4);
    transition: var(--transition);
}
.socials a:hover {
    color: var(--navy); background: var(--gold);
    border-color: var(--gold);
    transform: translateY(-3px);
}
.socials svg { width: 18px; height: 18px; }
.contact-line {
    color: rgba(255,255,255,.85);
    font-size: .95rem;
    line-height: 2;
}
.contact-line a { color: var(--gold); text-decoration: none; font-weight: 600; }
.contact-line a:hover { color: var(--gold-soft); text-decoration: underline; }
.contact-line .dot { margin: 0 .5rem; color: rgba(255,255,255,.4); }
.footer-links a { color: var(--gold); text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.copyright { font-size: .9rem; color: rgba(255,255,255,.55); }


/* 404 */
.hero-notfound h1 { font-size: clamp(4rem, 14vw, 9rem); }
.hero-notfound .btn { margin: .25rem; }

/* ===================================================================
   Layout — responsive (tablet ≤960px, phone ≤640px)
   =================================================================== */
@media (max-width: 960px) {
    .navbar { padding: 0 4%; }
    .nav-links li a { margin-left: 1.25rem; font-size: .95rem; }
    .lang-toggle { margin-left: 1rem; }
    .detail-hero { min-height: 45vh; padding: 3rem 16px; }
}

@media (max-width: 640px) {
    .site-footer { padding: 2rem 1rem 1.25rem; }
    .footer-inner { flex-direction: column; justify-content: center; text-align: center; gap: 1rem; }
    .footer-inner .copyright { flex: none; border-top: 0; padding-top: 0; }
    :root { --nav-h: 64px; }
    .navbar { padding: 0 4%; }
    .logo .logo-mark { width: 36px; height: 36px; }
    .logo { font-size: 1.2rem; gap: .4rem; }
    .menu-toggle { display: flex; margin-left: auto; order: 3; }
    .nav-links {
        order: 4; flex-basis: 100%;
        flex-direction: column; gap: 0;
        margin: 0;
        background: var(--white);
        border-top: 1px solid var(--border);
        display: none;
        position: absolute; top: var(--nav-h); left: 0; right: 0;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - var(--nav-h));
        max-height: calc(100dvh - var(--nav-h));
        overflow-y: auto;
    }
    .nav-links li { width: 100%; }
    .nav-links li a {
        margin-left: 0; padding: 1rem 6%;
        display: block; width: 100%;
        border-bottom: 1px solid var(--border);
    }
    .nav-links li a::after { display: none; }
    .navbar.is-open { flex-wrap: wrap; height: auto; min-height: var(--nav-h); }
    .navbar.is-open .nav-links { display: flex; }
    .lang-toggle { margin-left: .5rem; order: 2; width: 34px; height: 34px; }
    .logo { order: 1; }
    .contact-line .dot { display: none; }
    .contact-line a { display: inline-block; margin: 0 .5rem; }
}

@media (max-width: 400px) {
    .logo .logo-word { display: none; }
}
