/* ============================================================
   KERVIL THEME — MAIN STYLESHEET
   ============================================================ */

:root {
    --blue:        #4f4f50;
    --blue-dark:   #2c2c2e;
    --green:       #2ab84a;
    --green-dark:  #1e9d3a;
    --dark:        #1a1a1a;
    --text:        #333333;
    --muted:       #6b7280;
    --border:      #e5e7eb;
    --gray-bg:     #f7f8fa;
    --white:       #ffffff;
    --radius:      6px;
    --shadow:      0 4px 24px rgba(0,0,0,.10);
    --transition:  .2s ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', 'Segoe UI', sans-serif; color: var(--text); background: var(--white); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select { font-family: inherit; font-size: inherit; }

/* ── Container ───────────────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: 0 1px 0 var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 16px 0;
}

/* Logo */
.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
}
.site-logo img { width: 100px; height: 100px; object-fit: contain; }
.site-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.1;
}
.site-logo .logo-text span {
    display: block;
    font-size: .65rem;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .6;
}

/* Primary nav */
#primary-nav {
    flex: 1;
}
#primary-nav ul {
    display: flex;
    gap: 4px;
}
#primary-nav > ul > li {
    position: relative;
}
#primary-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--dark);
    font-size: .9rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background var(--transition);
    white-space: nowrap;
}
#primary-nav > ul > li > a:hover,
#primary-nav > ul > li.current-menu-item > a {
    background: var(--gray-bg);
}
#primary-nav > ul > li > a .caret {
    font-size: .6rem;
    opacity: .8;
}

/* Dropdown */
#primary-nav .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px 0;
    z-index: 200;
}
#primary-nav li:hover > .sub-menu { display: block; }
/* Invisible bridge over the 8px gap so the dropdown doesn't vanish while
   moving the cursor from the parent item down onto the submenu. */
#primary-nav > ul > li.menu-item-has-children:hover::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
}
#primary-nav .sub-menu a {
    display: block;
    padding: 9px 18px;
    color: var(--text);
    font-size: .875rem;
    transition: background var(--transition);
}
#primary-nav .sub-menu a:hover { background: var(--gray-bg); }

/* Services dropdown can be long — keep it readable and never let it
   overflow the right edge of the viewport. */
#primary-nav .sub-menu {
    max-height: 80vh;
    overflow-y: auto;
}
#primary-nav > ul > li:last-child .sub-menu,
#primary-nav .sub-menu.align-right { left: auto; right: 0; }

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Prominent phone number */
.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    color: var(--dark);
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}
.header-phone:hover {
    border-color: var(--accent);
    background: #fef3c7;
}
.header-phone-icon {
    font-size: .95rem;
    color: var(--accent);
    flex-shrink: 0;
    line-height: 1;
}
.header-phone-number {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
    color: var(--dark);
}

.header-actions .btn-whatsapp {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #25d366;
    border: none;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: opacity var(--transition);
}
.header-actions .btn-whatsapp:hover { opacity: .85; }

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.lang-item {
    padding: 4px 8px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--muted);
    border-radius: 4px;
    transition: background var(--transition), color var(--transition);
}
.lang-item:hover { background: var(--gray-bg); color: var(--dark); }
.lang-item.active { background: var(--accent); color: var(--white); }

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar {
    background: #4f4f50;
    padding: 0;
}
.trust-bar-inner {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.9);
    position: relative;
}
.trust-item + .trust-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255,255,255,.2);
}
.trust-item .check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-style: normal;
    flex-shrink: 0;
}
.trust-item a { color: inherit; }
.trust-item a:hover { opacity: .8; }

/* ============================================================
   HERO — full-width crossfade slideshow
   ============================================================ */
.hero {
    position: relative;
    height: 52vh;
    min-height: 340px;
    max-height: 580px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--dark);
}

/* Slides */
.hero-slides {
    position: absolute;
    inset: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: heroFade 15s infinite;
    will-change: opacity;
    transform: scale(1.04);
    animation: heroFade 15s infinite, heroZoom 15s infinite;
}
.hero-slide.slide-1 { animation-delay: 0s; }
.hero-slide.slide-2 { animation-delay: 5s; }
.hero-slide.slide-3 { animation-delay: 10s; }

@keyframes heroFade {
    0%   { opacity: 0; }
    6%   { opacity: 1; }
    27%  { opacity: 1; }
    33%  { opacity: 0; }
    100% { opacity: 0; }
}
@keyframes heroZoom {
    0%   { transform: scale(1.06); }
    33%  { transform: scale(1.00); }
    100% { transform: scale(1.00); }
}

/* Overlay — strong left vignette + bottom fade */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right,  rgba(0,0,0,.72) 0%, rgba(0,0,0,.30) 60%, rgba(0,0,0,.10) 100%),
        linear-gradient(to bottom, rgba(0,0,0,.10) 0%, rgba(0,0,0,.50) 100%);
    z-index: 1;
}

/* Amber left-edge accent bar */
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    z-index: 3;
}

/* Content */
.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.hero-text { color: var(--white); max-width: 580px; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.hero-eyebrow::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}
.hero-text h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 14px;
    text-shadow: 0 2px 16px rgba(0,0,0,.5);
    letter-spacing: -.01em;
}
.hero-sub {
    font-size: .95rem;
    opacity: .82;
    line-height: 1.7;
    max-width: 480px;
}

/* Slide dots */
.hero-scroll {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 6px;
}
.scroll-line {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
}
.scroll-line:first-child {
    background: var(--accent);
    width: 20px;
    border-radius: 3px;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0;
}
.stats-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 20px 16px;
    position: relative;
    text-align: center;
}
.stat-item + .stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--border);
}
.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -.02em;
}
.stat-label {
    font-size: .75rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
}

@media (max-width: 480px) {
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(3)::before { display: none; }
}

/* ============================================================
   SECTIONS — generic
   ============================================================ */
.section { padding: 64px 0; }
.section-alt { background: var(--gray-bg); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 1.75rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.section-header p { color: var(--muted); font-size: .95rem; }

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-image { aspect-ratio: 16/10; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-image img { transform: scale(1.04); }
.card-body { padding: 18px; }
.card-body h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.card-body .card-meta { font-size: .8rem; color: var(--muted); margin-bottom: 12px; }
.card-price { font-size: 1.15rem; font-weight: 700; color: var(--blue); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
    background: var(--dark);
    padding: 64px 0 48px;
    color: var(--white);
}
.page-header-eyebrow {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
}

/* ============================================================
   SERVICES PAGE
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}
.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 28px;
    transition: box-shadow var(--transition), transform var(--transition);
}
.service-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}
.service-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: inline-block;
}
.service-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}
.service-card p {
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.65;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.about-split-text h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.15;
}
.about-split-text p {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: .95rem;
}
.about-split-visual img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 4/3;
}
.about-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--dark) 100%);
    opacity: .15;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.value-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 28px 16px;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.value-stat {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--blue);
    line-height: 1;
}
.value-label {
    font-size: .85rem;
    color: var(--muted);
    font-weight: 500;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 64px;
    align-items: start;
}
.contact-info h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 14px;
}
.contact-info > p {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 28px;
    font-size: .95rem;
}
.contact-details {
    list-style: none;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.contact-details li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .95rem;
    color: var(--text);
}
.contact-details a { color: var(--blue); }
.contact-details a:hover { text-decoration: underline; }
.contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-form-wrap {
    background: var(--gray-bg);
    border-radius: 12px;
    padding: 36px 32px;
}
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--dark);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    font-size: .9rem;
    transition: border-color var(--transition);
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
}

/* ============================================================
   INFO BLOCKS
   ============================================================ */
:root {
    --accent:       #d97706;
    --accent-light: #fef3c7;
}

.info-blocks-section {
    background: var(--gray-bg);
}

.info-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.info-block {
    background: var(--white);
    border-radius: 12px;
    padding: 36px 32px 32px;
    border-top: 4px solid var(--accent);
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
}
.info-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(217,119,6,.15);
}

.info-block-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--dark);
    margin-bottom: 14px;
    text-transform: uppercase;
    line-height: 1.2;
}
.info-block-title span { color: var(--accent); }

.info-block-divider {
    height: 2px;
    background: linear-gradient(to right, var(--accent), var(--accent-light));
    border-radius: 2px;
    margin-bottom: 20px;
}

.info-block-text {
    font-size: .875rem;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 24px;
}

.info-block-list {
    display: flex;
    flex-direction: column;
	align-items: flex-start;
    gap: 10px;
}
.info-block-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .875rem;
    color: var(--text);
    line-height: 1.55;
}
.info-block-list li::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 5px;
}

@media (max-width: 1024px) {
    .info-blocks { grid-template-columns: 1fr; gap: 20px; }
    .info-block { padding: 28px 24px; }
}

/* ============================================================
   USP — KERVIL EELISED
   ============================================================ */
.usp-section {
    background: var(--dark);
}

.usp-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 52px;
}
.usp-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
    letter-spacing: -.01em;
}
.usp-title span { color: var(--accent); }

.usp-intro {
    font-size: .95rem;
    color: rgba(255,255,255,.6);
    line-height: 1.8;
}

.usp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: rgba(255,255,255,.08);
    border-radius: 12px;
    overflow: hidden;
}

.usp-item {
    padding: 40px 36px;
    background: var(--dark);
    transition: background var(--transition);
}
.usp-item:hover {
    background: #222230;
}

.usp-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.usp-item h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
    line-height: 1.3;
}

.usp-item p {
    font-size: .875rem;
    color: rgba(255,255,255,.55);
    line-height: 1.75;
}

@media (max-width: 768px) {
    .usp-grid { grid-template-columns: 1fr; }
    .usp-item { padding: 28px 24px; }
}

/* ============================================================
   MASINAPARK SLIDER
   ============================================================ */
.masinapark-section {
    background: var(--white);
}

.masinapark-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 64px;
    align-items: center;
}

.masinapark-eyebrow {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}
.masinapark-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -.01em;
}
.masinapark-title span { color: var(--accent); }

.masinapark-desc {
    font-size: .925rem;
    color: var(--muted);
    line-height: 1.8;
}
.masinapark-cta { margin-top: 24px; }

/* Slider */
.masinapark-slider {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4/3;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .45s cubic-bezier(.4,0,.2,1);
}

.slider-slide {
    flex: 0 0 100%;
    background-size: cover;
    background-position: center;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.9);
    color: var(--dark);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: background var(--transition), transform var(--transition);
}
.slider-btn:hover { background: var(--white); transform: translateY(-50%) scale(1.08); }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }

.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    padding: 0;
    transition: background var(--transition), width var(--transition);
}
.slider-dot.active {
    background: var(--accent);
    width: 22px;
    border-radius: 4px;
}

@media (max-width: 900px) {
    .masinapark-layout { grid-template-columns: 1fr; gap: 32px; }
    .masinapark-slider { aspect-ratio: 16/9; }
}

/* ============================================================
   HOMEPAGE ABOUT (Meist — from page editor)
   ============================================================ */
.homepage-about {
    background: var(--gray-bg);
    padding: 72px 0;
}
.homepage-about .entry-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}
.homepage-about .entry-content h1,
.homepage-about .entry-content h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}
.homepage-about .entry-content h1::after,
.homepage-about .entry-content h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin: 12px auto 0;
}
.homepage-about .entry-content p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.85;
    margin-bottom: 16px;
}
.about-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 32px;
}
.about-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: var(--accent);
    color: var(--white);
    font-weight: 700;
    font-size: .95rem;
    border-radius: var(--radius);
    transition: background var(--transition), transform var(--transition);
}
.about-cta-btn:hover { background: #b45309; transform: translateY(-1px); }
.about-cta-phone {
    font-size: .95rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
}
.about-cta-phone:hover { color: var(--accent); }

/* ============================================================
   LEAD FORM SECTION
   ============================================================ */
.lead-section {
    background: var(--dark);
    padding: 80px 0;
}

.lead-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 64px;
    align-items: start;
}

/* Left info panel */
.lead-eyebrow {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.lead-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 18px;
    letter-spacing: -.02em;
}
.lead-title span { color: var(--accent); }

.lead-desc {
    font-size: .925rem;
    color: rgba(255,255,255,.55);
    line-height: 1.8;
    margin-bottom: 32px;
}

.lead-promise {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 32px;
}
.lead-promise-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
    color: var(--white);
}
.lead-promise strong {
    display: block;
    color: var(--white);
    font-size: .9rem;
    margin-bottom: 2px;
}
.lead-promise span {
    color: rgba(255,255,255,.5);
    font-size: .82rem;
}

.lead-contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.lead-contacts li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .9rem;
    color: rgba(255,255,255,.7);
}
.lead-contacts a { color: rgba(255,255,255,.85); }
.lead-contacts a:hover { color: var(--accent); }
.lead-ci {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}

/* Right form card */
.lead-form-wrap {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.lead-form-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}
.lead-form-sub {
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 28px;
}

.lf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.lf-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.lf-group label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: .03em;
    text-transform: uppercase;
}
.lf-group label span { color: var(--accent); }
.lf-group input,
.lf-group select,
.lf-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    font-size: .9rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    resize: vertical;
}
.lf-group input:focus,
.lf-group select:focus,
.lf-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217,119,6,.12);
}
.lf-group input.error,
.lf-group select.error { border-color: #dc2626; }

.lf-submit {
    width: 100%;
    padding: 15px 24px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background var(--transition), transform var(--transition);
    margin-top: 4px;
}
.lf-submit:hover { background: #b45309; transform: translateY(-1px); }
.lf-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.lf-submit-arrow { font-size: 1.1rem; transition: transform var(--transition); }
.lf-submit:hover .lf-submit-arrow { transform: translateX(4px); }

.lf-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 500;
}
.lf-success { background: #dcfce7; color: #166534; }
.lf-error   { background: #fee2e2; color: #991b1b; }

.lf-privacy {
    margin-top: 12px;
    font-size: .75rem;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 900px) {
    .lead-layout { grid-template-columns: 1fr; gap: 40px; }
    .lead-form-wrap { padding: 28px 22px; }
}
@media (max-width: 480px) {
    .lf-row { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.8);
}
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 56px 0 40px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}
.footer-brand p { font-size: .875rem; line-height: 1.7; opacity: .7; max-width: 280px; }
.footer-col h4 {
    font-size: .875rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .875rem; opacity: .7; transition: opacity var(--transition); }
.footer-col ul li a:hover { opacity: 1; }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0;
    font-size: .8rem;
    opacity: .55;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Tablet + mobile: collapse nav to a hamburger, tidy the header */
@media (max-width: 1024px) {
    .footer-top { grid-template-columns: 1fr 1fr; }

    .header-inner { gap: 16px; }
    .site-logo { margin-right: auto; }
    .site-logo img { width: 64px; height: 64px; }
    .nav-toggle { display: flex; }

    /* Hidden by default; the toggle reveals it as a panel under the header */
    #primary-nav { display: none; }
    #primary-nav.open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 80vh;
        overflow-y: auto;
        background: var(--white);
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 8px;
    }
    #primary-nav.open ul { flex-direction: column; gap: 0; }
    #primary-nav.open > ul > li { border-bottom: 1px solid var(--border); }
    #primary-nav.open > ul > li:last-child { border-bottom: none; }
    #primary-nav.open > ul > li > a {
        justify-content: space-between;
        padding: 14px 16px;
        border-radius: var(--radius);
        color: var(--dark);
        font-size: 1rem;
    }
    #primary-nav.open .caret { transition: transform var(--transition); }
    #primary-nav.open li.open > a .caret { transform: rotate(180deg); }

    /* Submenus become an inline accordion instead of a hover dropdown */
    #primary-nav.open .sub-menu {
        position: static;
        display: none;
        min-width: 0;
        padding: 0 0 6px 12px;
        background: transparent;
        box-shadow: none;
    }
    #primary-nav.open li.open > .sub-menu { display: block; }
    #primary-nav.open .sub-menu a { padding: 11px 16px; color: var(--text); }
}

@media (max-width: 768px) {
    .hero { height: 44vh; min-height: 280px; }
    .hero-text h1 { font-size: 1.6rem; }

    .section { padding: 44px 0; }
    .section-header { margin-bottom: 28px; }

    /* Trust bar: stack cleanly instead of wrapping with broken dividers */
    .trust-bar { padding: 6px 0; }
    .trust-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .trust-item {
        justify-content: center;
        padding: 11px 16px;
        font-size: .72rem;
        letter-spacing: .06em;
    }
    /* Replace vertical dividers with horizontal separators between stacked items */
    .trust-item + .trust-item::before {
        left: 16px;
        right: 16px;
        top: 0;
        height: 1px;
        width: auto;
    }

    .footer-top { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   TEENUSED (services page content)
   ============================================================ */
/* Two-column layout: content + sticky table of contents on the right. */
.services-layout.has-toc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 56px;
    align-items: start;
}
/* The grid item itself is the sticky element — it stays short (align-self:start)
   so it has room to stick within the tall content row as you scroll. */
.services-toc {
    position: sticky;
    top: 100px;
    align-self: start;
}
.services-toc-inner {
    padding: 20px 22px;
    background: var(--gray-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.services-toc-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted, #6b7280);
    margin: 0 0 12px;
}
.services-toc ul { list-style: none; margin: 0; padding: 0; }
.services-toc li + li { margin-top: 2px; }
.services-toc a {
    display: block;
    padding: 7px 10px;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    color: var(--text);
    font-size: .9rem;
    line-height: 1.35;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.services-toc a:hover { background: var(--white); color: var(--dark); }
.services-toc a.is-active {
    background: var(--white);
    color: var(--dark);
    font-weight: 600;
    border-left-color: var(--accent);
}
@media (max-width: 1024px) {
    .services-layout.has-toc { grid-template-columns: 1fr; }
    .services-toc { display: none; }
}

.services-content > h2:first-child { margin-top: 0; }
.services-content h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 800;
    color: var(--dark);
    margin: 48px 0 16px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    position: relative;
    /* Offset for the sticky header when jumping to a submenu anchor. */
    scroll-margin-top: 100px;
}
.services-content h2::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 56px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}
.services-content h2 strong { font-weight: 800; }
.services-content p {
    font-size: 1.02rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 16px;
}
.services-content p > strong { color: var(--dark); }
.services-content ul {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px 28px;
}
.services-content ul li {
    position: relative;
    padding-left: 30px;
    line-height: 1.5;
    color: var(--text);
}
.services-content ul li:empty { display: none; }
.services-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    /* white check mark */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

@media (max-width: 1024px) {
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    .about-split { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .header-inner { padding: 10px 0; }
    .container { padding: 0 18px; }
    .hero-inner { padding: 0 18px; }
}

@media (max-width: 640px) {
    .header-phone-number { display: none; }
    .header-phone { padding: 9px; }
}

@media (max-width: 480px) {
    .header-inner { gap: 10px; }
    .site-logo img { width: 52px; height: 52px; }
    .container { padding: 0 14px; }
    .hero-inner { padding: 0 14px; }
    .hero { min-height: 260px; }
    .section { padding: 36px 0; }
    .section-header h2 { font-size: 1.4rem; }
    .form-row { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-form-wrap { padding: 24px 18px; }
    .lead-form-wrap { padding: 24px 18px; }
    .lightbox { padding: 12px; }
}

/* ============================================================
   MEIST (about page)
   ============================================================ */
.about-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}
.about-content p {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.85;
    margin-bottom: 20px;
}
.about-content p:first-child {
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-weight: 800;
    line-height: 1.35;
    color: var(--dark);
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 24px;
}
.about-content p:first-child::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin: 24px auto 0;
}
.about-content p strong { color: var(--dark); }
.about-page-cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* Contact form submit spacing */
.contact-form .lf-submit { align-self: flex-start; }

/* ============================================================
   MACHINERY CARDS + LIGHTBOX
   ============================================================ */
.machine-card .card-image {
    display: block;
    position: relative;
    cursor: zoom-in;
}
.machine-card .card-image img { display: block; }
.machine-zoom {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: rgba(26, 26, 26, .55);
    border-radius: 50%;
    opacity: 0;
    transform: scale(.85);
    transition: opacity var(--transition), transform var(--transition);
    pointer-events: none;
}
.machine-card:hover .machine-zoom,
.machine-card .card-image:focus-visible .machine-zoom { opacity: 1; transform: scale(1); }
.machine-card .card-body h3 { margin-bottom: 0; }

/* Caption-less photo gallery (Tehtud tööd) */
.gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.gallery-card .card-image { aspect-ratio: 4/3; }

body.lightbox-open { overflow: hidden; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 15, 15, .92);
}
.lightbox[hidden] { display: none; }
.lightbox-figure {
    margin: 0;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.lightbox-img {
    max-width: 92vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    background: #222;
}
.lightbox-caption {
    color: #f3f3f3;
    font-size: .95rem;
    font-weight: 600;
    text-align: center;
}
.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.7rem;
    line-height: 1;
}
.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1.5rem;
}
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

@media (max-width: 640px) {
    .lightbox-nav { width: 42px; height: 42px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .machine-zoom { opacity: 1; transform: scale(1); }
}
