/* ========================================
   SERVIMAT — Modern Static Site
   ======================================== */

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

:root {
    --dark: #0f1117;
    --dark-light: #181b24;
    --dark-card: #1c1f2a;
    --gold: #f0c040;
    --gold-dim: #c49a2c;
    --gold-glow: rgba(240, 192, 64, 0.15);
    --white: #ffffff;
    --gray-100: #f5f5f7;
    --gray-200: #e8e8ec;
    --gray-300: #c8c8d0;
    --gray-500: #8a8a9a;
    --gray-700: #4a4a5a;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
    --radius-sm: 8px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--white);
    background: var(--dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', 'Inter', sans-serif;
    line-height: 1.2;
    font-weight: 700;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.tech-card.reveal.revealed { transition-delay: calc(var(--i, 0) * 0.08s); }

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 52px;
    width: auto;
    transition: opacity var(--transition);
}

.nav-logo:hover img {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 6px;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.nav-links a:hover {
    color: var(--gold);
    background: rgba(240, 192, 64, 0.08);
}

/* Language switcher */
.lang-switcher {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: 12px;
    flex-shrink: 0;
}

.lang-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
    opacity: 0.5;
    transition: all var(--transition);
    display: flex;
    align-items: center;
}

.lang-btn img {
    width: 26px;
    height: auto;
    display: block;
}

.lang-btn:hover {
    opacity: 0.85;
}

.lang-btn.active {
    opacity: 1;
    border-color: var(--gold);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all var(--transition);
    border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   HERO
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/banner_bg.jpg') center/cover no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 17, 23, 0.7) 0%,
        rgba(15, 17, 23, 0.4) 40%,
        rgba(15, 17, 23, 0.8) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-title span {
    display: block;
}

.hero-title span:nth-child(1) {
    color: var(--white);
}

.hero-title span:nth-child(2) {
    color: var(--gold);
}

.hero-title span:nth-child(3) {
    color: var(--white);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray-300);
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 0.04em;
}

.hero-cta {
    display: inline-block;
    padding: 14px 36px;
    background: var(--gold);
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.hero-cta:hover {
    background: var(--white);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(240, 192, 64, 0.3);
}

/* ========================================
   SECTIONS — General
   ======================================== */
.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--dark);
}

.section-light {
    background: var(--gray-100);
    color: var(--dark);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

.section-title.dark {
    color: var(--dark);
}

.section-intro {
    text-align: center;
    color: var(--gray-500);
    font-size: 1.1rem;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-dark .section-intro {
    color: var(--gray-300);
}

/* ========================================
   RÓLUNK — About
   ======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 60px;
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 20px;
    font-weight: 600;
}

.about-text p {
    color: var(--gray-300);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* ========================================
   TECHNOLÓGIÁK — Tech cards
   ======================================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.tech-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tech-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.tech-card.active {
    box-shadow: 0 0 0 3px var(--gold), 0 12px 40px rgba(240, 192, 64, 0.2);
}

.tech-card-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.tech-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tech-card:hover .tech-card-image img {
    transform: scale(1.08);
}

.tech-card h3 {
    padding: 16px 20px;
    font-size: 1rem;
    color: var(--dark);
    text-align: center;
    font-weight: 600;
}

/* Tech detail panels */
.tech-detail {
    display: none;
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: slideDown 0.4s ease;
}

.tech-detail.open {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tech-detail-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
    transition: color var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tech-detail-close:hover {
    color: var(--dark);
    background: var(--gray-200);
}

.tech-detail h3 {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}

.tech-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.tech-detail-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tech-detail-images img {
    border-radius: var(--radius-sm);
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.tech-detail-images img:first-child {
    grid-column: 1 / -1;
    height: 220px;
}

.tech-detail-blocks {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tech-block h4 {
    font-size: 1.05rem;
    color: var(--gold-dim);
    margin-bottom: 8px;
    font-weight: 600;
}

.tech-block p {
    color: var(--gray-700);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ========================================
   VIDEÓ GALÉRIA
   ======================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.video-item {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark-card);
}

.video-item video {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    display: block;
}

.video-item p {
    padding: 14px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-300);
    text-align: center;
}

/* ========================================
   ELŐTTE / UTÁNA — Before/After
   ======================================== */
.ba-slider-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.ba-slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark-card);
    aspect-ratio: 16/10;
}

.ba-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.ba-slide.active {
    opacity: 1;
}

.ba-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--gray-200);
}

.ba-labels {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
}

.ba-label {
    background: rgba(15, 17, 23, 0.8);
    color: var(--white);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
}

.ba-label-before {
    border: 2px solid rgba(255, 80, 80, 0.6);
}

.ba-label-after {
    border: 2px solid rgba(80, 200, 120, 0.6);
}

.ba-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
}

.ba-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--gray-300);
    background: var(--white);
    color: var(--dark);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.ba-btn:hover {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--dark);
}

.ba-dots {
    display: flex;
    gap: 10px;
}

.ba-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition);
}

.ba-dot.active {
    background: var(--gold);
    transform: scale(1.3);
}

.ba-dot:hover {
    background: var(--gold-dim);
}

/* ========================================
   AUTOMATÁK — Machines
   ======================================== */
.machines-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.machine-card {
    background: var(--dark-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all var(--transition);
}

.machine-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: 0 12px 40px rgba(240, 192, 64, 0.1);
}

.machine-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--dark-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.machine-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.machine-card-body {
    padding: 28px 24px;
}

.machine-card-body h3 {
    font-size: 1.15rem;
    color: var(--gold);
    margin-bottom: 12px;
}

.machine-card-body p {
    color: var(--gray-300);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ========================================
   PARTNEREK — Partners
   ======================================== */
.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
    margin-top: 60px;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all var(--transition);
}

.partner-logo:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.partner-logo img {
    max-height: 60px;
    width: auto;
    filter: grayscale(30%);
    transition: filter var(--transition);
}

.partner-logo:hover img {
    filter: grayscale(0%);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--dark-light);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    max-width: 160px;
    margin-bottom: 20px;
}

.footer-info h3 {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 12px;
}

.footer-info p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.footer-info a {
    color: var(--gray-300);
}

.footer-info a:hover {
    color: var(--gold);
}

.footer-col h4 {
    font-size: 1.05rem;
    color: var(--gold);
    margin-bottom: 20px;
    font-weight: 600;
}

.contact-person {
    margin-bottom: 18px;
    font-size: 0.9rem;
    color: var(--gray-300);
    line-height: 1.8;
}

.contact-person strong {
    color: var(--white);
    font-weight: 600;
}

.contact-person a {
    color: var(--gray-300);
}

.contact-person a:hover {
    color: var(--gold);
}

.footer-site-img {
    border-radius: var(--radius-sm);
    width: 100%;
    object-fit: cover;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    color: var(--gray-500);
    font-size: 0.85rem;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .about-grid {
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-map {
        grid-column: 1 / -1;
    }

    .tech-detail-content {
        grid-template-columns: 1fr;
    }

    .tech-detail-images {
        grid-template-columns: repeat(3, 1fr);
    }

    .tech-detail-images img:first-child {
        grid-column: auto;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        padding: 80px 30px 40px;
        gap: 4px;
        transition: right var(--transition);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.05rem;
        padding: 12px 16px;
    }

    .lang-switcher {
        order: 3;
        margin-left: auto;
    }

    .section {
        padding: 70px 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .tech-detail {
        padding: 24px;
    }

    .tech-detail-images {
        grid-template-columns: 1fr 1fr;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .machines-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .partners-grid {
        gap: 24px;
    }

    .partner-logo {
        padding: 16px 24px;
    }

    .partner-logo img {
        max-height: 45px;
    }

    .ba-labels {
        padding: 0 16px;
        bottom: 12px;
    }

    .ba-label {
        padding: 4px 14px;
        font-size: 0.75rem;
    }
}

/* Mobile small */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .tech-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .tech-card h3 {
        font-size: 0.85rem;
        padding: 12px;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .tech-detail-images {
        grid-template-columns: 1fr;
    }

    .tech-detail-images img,
    .tech-detail-images img:first-child {
        height: 200px;
    }
}

/* ========================================
   UTILITY / ANIMATIONS
   ======================================== */

/* Gold accent line for hover effects */
.tech-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.tech-card:hover::after,
.tech-card.active::after {
    transform: scaleX(1);
}

/* Selection color */
::selection {
    background: var(--gold);
    color: var(--dark);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dim);
}
