/*
Theme Name: Oriones Metallbau
Theme URI: https://oriones-metallbau.com
Author: FXMK Academy s.r.o.
Author URI: https://fxmk.cz
Description: Custom theme for Oriones Metallbau s.r.o. – Stahlbau, Edelstahl, Treppen, Geländer, Zäune & Tore.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: metallbau
*/

/* ===== DESIGN TOKENS ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f4f5;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --line: rgba(0, 0, 0, .08);
  --line-hover: rgba(0, 0, 0, .16);
  --text: #18181b;
  --muted: #71717a;
  --accent: #2563eb;
  --accent2: #3b82f6;
  --accent-glow: rgba(37, 99, 235, .10);
  --accent2-glow: rgba(59, 130, 246, .08);
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-xs: 3px;
  --radius-pill: 999px;
  --container: 1200px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .08);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .05);
  --transition: .18s ease;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.03em; font-weight: 800; }
p { margin: 0; }
button { cursor: pointer; font: inherit; }

/* ===== UTILITY ===== */
.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.sr-only:focus {
  position: fixed; top: 10px; left: 10px; width: auto; height: auto;
  padding: 12px 20px; margin: 0; overflow: visible; clip: auto;
  background: var(--accent); color: #fff; border-radius: var(--radius);
  z-index: 9999;
}
.muted { color: var(--muted); }
.tiny { font-size: .84rem; }
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius); font-weight: 700; font-size: .95rem;
  border: none;
  background: var(--accent);
  color: #fff;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }
.btn-sm { padding: 9px 18px; font-size: .88rem; }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, .08);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0; height: 72px; gap: 24px;
}

/* Brand */
.brand { display: flex; align-items: center; gap: 0; flex-shrink: 0; height: 100%; }
.brand-logo {
  height: 48px; width: auto; object-fit: contain;
}
.brand-text { display: none; }

/* Menu */
.main-menu { display: flex; gap: 2px; align-items: center; }
.main-menu a {
  color: var(--muted); padding: 8px 16px; border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  font-size: .9rem; font-weight: 500;
}
.main-menu a:hover,
.main-menu a.active { color: var(--text); background: rgba(0,0,0,.05); }

/* Nav right group */
.nav-right {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}

/* Hamburger */
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  padding: 8px; border-radius: var(--radius); line-height: 0;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* Mobile menu overlay */
.mobile-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.mobile-overlay.open { display: flex; }
.mobile-overlay a {
  font-size: 1.15rem; padding: 14px 32px; border-radius: var(--radius);
  color: var(--text);
  transition: background var(--transition);
}
.mobile-overlay a:hover { background: rgba(0,0,0,.05); }
.mobile-close {
  position: absolute; top: 18px; right: 20px; background: none; border: none;
  color: var(--text); line-height: 0; padding: 8px;
}
.mobile-close svg { width: 24px; height: 24px; }

/* ===== HERO ===== */
.hero {
  position: relative; padding: 100px 0 72px; overflow: hidden;
  background-image: url('assets/images/hero-bg.png');
  background-size: cover; background-position: center 35%; background-repeat: no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.55) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: block;
  max-width: 720px;
}
.hero h1 {
  font-size: clamp(32px, 4.5vw, 58px); margin-bottom: 18px; line-height: 1.08;
  letter-spacing: -.04em; color: #fff;
}
.hero h1 span { color: var(--accent2); }
.hero .lead {
  color: rgba(255,255,255,.85); font-size: clamp(15px, 1.3vw, 1.1rem);
  margin-bottom: 28px; max-width: 55ch; line-height: 1.7;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.trust {
  display: flex; gap: 24px; flex-wrap: wrap; color: rgba(255,255,255,.8); font-size: .88rem;
}
.trust div { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

/* Hero card — repurposed as hidden on homepage, keeps styles for backward compat */
.hero-card { display: none; }
.hero-card-inner { padding: 24px; }
.hero-card .kicker { color: var(--muted); margin-bottom: 4px; font-size: .92rem; }
.hero-card .big {
  font-size: clamp(36px, 4vw, 44px); font-weight: 900; line-height: 1.1; margin-bottom: 4px;
}
.hero-card .big span { color: var(--accent); }
.mini-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mini-list span {
  border: 1px solid var(--line); background: rgba(0,0,0,.03);
  padding: 6px 12px; border-radius: var(--radius); color: var(--muted); font-size: .85rem;
}

/* Hero stats — hidden when hero-card hidden */
.hero-stats { display: none; }
.hero-stat {
  flex: 1; text-align: center; padding: 14px 10px;
  border-right: 1px solid var(--line);
}
.hero-stat:last-child { border-right: none; }
.hero-stat .stat-val { font-size: 1.3rem; font-weight: 800; }
.hero-stat .stat-label { font-size: .76rem; color: var(--muted); }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stats-row .stat-item {
  text-align: center; padding: 28px 16px;
  border-right: 1px solid var(--line);
}
.stats-row .stat-item:last-child { border-right: none; }
.stats-row .stat-val {
  display: block; font-size: 1.6rem; font-weight: 900; color: var(--accent);
  letter-spacing: -.02em; margin-bottom: 2px;
}
.stats-row .stat-label {
  display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; font-weight: 500;
}

/* ===== SECTIONS ===== */
.section { padding: 72px 0; }
.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head { margin-bottom: 36px; }
.section-head h2 {
  font-size: clamp(24px, 2.5vw, 36px); margin-bottom: 10px;
}
.section-head p { color: var(--muted); max-width: 60ch; font-size: .95rem; }
.section-head .pill,
.section-label {
  display: inline-block;
  border: none; background: none;
  padding: 0; margin-bottom: 8px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
  font-weight: 700;
  border-radius: 0;
}
.section-head .pill svg { display: none; }

/* ===== SERVICE CARDS (Leistungen) ===== */
.service-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--panel);
  padding: 28px;
  transition: background var(--transition);
  border: none; border-radius: 0;
}
.service-card:hover {
  background: var(--bg-alt);
}
.service-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(37, 99, 235, .10);
  display: grid; place-items: center; margin-bottom: 16px;
  border: none;
}
.service-icon svg { width: 20px; height: 20px; color: var(--accent); }
.service-card h3 { font-size: 1.02rem; margin-bottom: 8px; font-weight: 700; }
.service-card > p { color: var(--muted); font-size: .9rem; margin-bottom: 16px; line-height: 1.6; }
.service-bullets { display: flex; flex-direction: column; gap: 6px; }
.service-bullets li {
  display: flex; align-items: flex-start; gap: 10px;
  color: var(--muted); font-size: .85rem; line-height: 1.5;
}
.service-bullets li::before {
  content: ""; flex-shrink: 0; width: 6px; height: 6px; margin-top: 7px;
  border-radius: 0; background: var(--accent);
}

/* ===== GENERIC CARDS GRID ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card {
  background: var(--panel); padding: 28px;
  transition: background var(--transition);
  border: none; border-radius: 0;
}
.card:hover { background: var(--bg-alt); }
.card h3 { margin-bottom: 8px; font-size: 1rem; font-weight: 700; }
.card p { color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* ===== CTA BANNER ===== */
.cta-banner {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 48px 40px; text-align: center;
  background: var(--bg-alt);
}
.cta-banner h2 { margin-bottom: 12px; }
.cta-banner p { color: var(--muted); margin-bottom: 24px; max-width: 50ch; margin-inline: auto; }

/* ===== CONTACT ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start;
}
.contact-card {
  border: 1px solid var(--line); background: var(--bg-alt);
  border-radius: var(--radius); padding: 20px; margin-bottom: 14px;
}
.contact-card strong { display: block; margin-bottom: 6px; }
.contact-card a { color: var(--accent); }
.contact-card a:hover { text-decoration: underline; }

/* Form */
.form-card {
  border: 1px solid var(--line); background: var(--bg-alt);
  border-radius: var(--radius); padding: 28px;
}
label {
  display: grid; gap: 6px; color: var(--muted); font-weight: 600;
  font-size: .88rem; margin-bottom: 16px;
}
input, textarea, select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  color: var(--text); font: inherit; font-size: .95rem; outline: none;
  transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ===== GALLERY / ALBUM ===== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px;
}
.gallery-item {
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3; background: var(--bg-alt);
  display: grid; place-items: center; color: var(--muted);
  transition: opacity var(--transition);
}
.gallery-item:hover { opacity: .85; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ===== FAQ ===== */
.faq-list { max-width: 760px; }
.faq-item {
  border-bottom: 1px solid var(--line);
  overflow: hidden; background: none; border-radius: 0;
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; background: none; border: none; color: var(--text);
  font: inherit; font-weight: 600; font-size: .95rem; text-align: left;
  gap: 14px; cursor: pointer; transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }
.faq-chevron {
  width: 18px; height: 18px; flex-shrink: 0; color: var(--muted);
  transition: transform .3s ease;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease;
}
.faq-answer-inner {
  padding: 0 0 20px; color: var(--muted); font-size: .93rem; line-height: 1.65;
}

/* ===== REFERENCES ===== */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.ref-card {
  border: 1px solid var(--line); background: var(--panel);
  border-radius: var(--radius); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.ref-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ref-card-img {
  aspect-ratio: 16/9; background: var(--bg-alt); display: grid; place-items: center; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.ref-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ref-card-body { padding: 20px; }
.ref-card-body h3 { margin-bottom: 6px; font-size: 1rem; }
.ref-card-body p { color: var(--muted); font-size: .88rem; }
.ref-tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius);
  border: 1px solid var(--line); font-size: .75rem; color: var(--accent);
  margin-top: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}

/* ===== PAGE HERO (sub-pages) ===== */
.page-hero {
  padding: 110px 0 48px; position: relative;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-size: clamp(28px, 3vw, 44px); margin-bottom: 10px;
}
.page-hero p { color: var(--muted); max-width: 55ch; font-size: 1.05rem; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--line); padding: 32px 0;
  background: #1e1e21; color: #d4d4d8;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr .6fr;
  gap: 20px; align-items: center;
}
.footer-brand small { display: block; color: #a1a1aa; margin-top: 2px; font-size: .84rem; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: #a1a1aa; font-size: .88rem; transition: color var(--transition); }
.foot-links a:hover { color: #fff; }
.footer-copy { color: #a1a1aa; font-size: .8rem; text-align: right; }

/* ===== NOTIFICATION TOAST ===== */
.notification {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  padding: 14px 24px; border-radius: var(--radius);
  color: #fff; font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow); animation: slideUp .3s ease;
}
.notification.success { background: var(--success); }
.notification.error { background: var(--danger); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  padding: 4px 8px; border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--muted);
  transition: all var(--transition);
}
.lang-switch a:hover { color: var(--text); border-color: var(--line-hover); }
.lang-switch a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .hero-grid { max-width: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 14px; }
  .footer-copy { text-align: left; }
  .main-menu { display: none; }
  .nav-right .lang-switch { display: none; }
  .nav-right .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .ref-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 44px; }
  .hero h1 { font-size: clamp(28px, 7vw, 40px); }
  .brand-logo { height: 38px; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .trust { flex-direction: column; gap: 10px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stats-row .stat-item { padding: 20px 12px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 48px 0; }
  .cta-banner { padding: 32px 20px; }
}

@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
}
