/* =========================================================
   LEGION RC — bendras dark theme stilius (frontend)
   ========================================================= */

:root {
  --bg: #0b0b0d;
  --bg-alt: #131316;
  --bg-card: #1a1a1e;
  --border: #2a2a2f;
  --text: #ededf0;
  --text-dim: #a3a3ab;
  --text-faint: #6b6b74;
  --red: #d1222e;
  --red-dark: #8f0f1a;
  --red-glow: rgba(209, 34, 46, 0.35);
  --gold: #c9a227;
  --radius: 10px;
  --max-width: 1180px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font: 'Segoe UI', Roboto, Oswald, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 13, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  /* No more .brand logo on the left (removed) - .navbar-controls is the only
     child now, so anchor it to the right (like before) and nudge it inward
     with margin-right below, rather than letting it snap to flex-start. */
  justify-content: flex-end;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Oswald, var(--font);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 2px;
  color: var(--text);
}

.brand .brand-rc { color: var(--red); }

.brand-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.hero-logo {
  width: min(390px, 70vw);
  max-height: 42vh;
  height: auto;
  margin: 0 auto 22px;
  display: block;
  opacity: 0.92; /* vos vos permatomas - beveik pilnai matomas, tik truputį */
}

.hero-logo[hidden] { display: none; }

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: var(--red-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1.3rem;
  padding: 6px 10px;
  cursor: pointer;
}

/* ---------- Navbar right cluster: nav links + social icons + email ---------- */
.navbar-controls {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-right: 32px; /* nudged left a bit now that the logo isn't balancing the left side */
}

.navbar-social {
  display: flex;
  align-items: center;
  gap: 18px;
}

.navbar-social-links {
  display: flex;
  gap: 8px;
}

.navbar-social-links a {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-dim);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.navbar-social-links a:hover {
  border-color: var(--red);
  background: var(--red-dark);
  color: #fff;
}

.navbar-social-links a svg { width: 14px; height: 14px; display: block; color: inherit; }

.navbar-email {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.15s;
}

.navbar-email:hover { color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 6px;
  border: 2px solid var(--red);
  background: var(--red);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover { background: var(--red-dark); box-shadow: 0 6px 20px var(--red-glow); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover { border-color: var(--red); color: #fff; box-shadow: none; }

.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Plain gradient by default (no placeholder image) - admin-uploaded hero
     photos are layered on top of this same gradient via main.js so there is
     nothing else to swap in/out and nothing that can flash on load. */
  background:
    linear-gradient(180deg, rgba(11,11,13,0.55) 0%, rgba(11,11,13,0.85) 65%, var(--bg) 100%),
    radial-gradient(ellipse at center, #1c1c20 0%, #0b0b0d 70%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 60px 20px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(209,34,46,0.06) 0 2px, transparent 2px 60px);
  pointer-events: none;
}

/* When an admin-uploaded background photo is set, layouts/public.blade.php
   overrides .hero's background (every page's header, not just the home page)
   and hides this stripe texture - on top of a photo it reads as red "rain". */

.hero-content { position: relative; z-index: 1; max-width: 780px; }

.hero-eyebrow {
  color: var(--red);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.hero h1 {
  font-family: Oswald, var(--font);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: 3px;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hero h1 span { color: var(--red); }

.hero p {
  color: var(--text-dim);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 30px;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Section ---------- */
.section { padding: 70px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-family: Oswald, var(--font);
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 8px;
  text-align: center;
}

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

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--red-dark);
}

.card-media {
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
}

.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 18px; }

.card-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.card-desc { color: var(--text-dim); font-size: 0.92rem; margin: 0; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge {
  display: inline-block;
  background: var(--red-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Video play overlay */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: background 0.2s;
}

.play-overlay::after {
  content: '';
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/26px no-repeat;
  box-shadow: 0 0 0 8px rgba(209,34,46,0.18);
}

.card:hover .play-overlay { background: rgba(0,0,0,0.45); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

textarea.form-control { resize: vertical; min-height: 130px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.alert {
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 0.92rem;
  margin-bottom: 18px;
  display: none;
}

.alert.show { display: block; }
.alert-success { background: rgba(46, 160, 67, 0.15); border: 1px solid #2ea043; color: #7ee787; }
.alert-error { background: rgba(209, 34, 46, 0.15); border: 1px solid var(--red); color: #ff8a94; }

/* ---------- Contact info blocks ---------- */
.info-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* Contact page: [direct contacts + map] | [form]. The left column stretches
   to the form's height and the map fills whatever is left of it, so the
   map's bottom edge lines up with the submit button. */
.contact-layout { display: grid; column-gap: 40px; row-gap: 20px; }
.contact-direct { display: flex; flex-direction: column; }
.contact-map {
  flex: 1 1 auto;
  min-height: 200px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card, #16161a);
  position: relative;
}
.contact-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* Stacked (phone) layout: contacts, a square map, then the form. */
@media (max-width: 680px) {
  .contact-map { flex: none; aspect-ratio: 1 / 1; min-height: 0; }
  .contact-form-col { margin-top: 20px; }
}

.social-links { display: flex; gap: 12px; margin-top: 20px; }

.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}

.social-links a:hover { border-color: var(--red); background: var(--red-dark); }

.social-links a svg { width: 18px; height: 18px; display: block; color: inherit; }

/* ---------- Board (valdybos) kontaktai ---------- */
.board-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 28px 0 8px;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}

.board-card:hover { border-color: var(--red); transform: translateY(-2px); }

.board-card-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--red-dark);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-card-icon svg { width: 26px; height: 26px; }

.board-card-role { color: var(--text-faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.board-card-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
.board-card-phone { color: var(--text-dim); font-size: 0.9rem; text-decoration: none; }
.board-card-phone:hover { color: var(--red); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 24px;
  background: var(--bg-alt);
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand { font-family: Oswald, var(--font); font-weight: 800; letter-spacing: 2px; }
.footer-brand span { color: var(--red); }

.footer-logo { display: block; height: 56px; width: auto; max-width: 180px; }

.footer-links { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; }
.footer-links a:hover { color: var(--red); }

.footer-copy { color: var(--text-faint); font-size: 0.82rem; margin-top: 24px; text-align: center; }

/* ---------- Gallery detail lightbox ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.photo-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  cursor: zoom-in;
  border: 1px solid var(--border);
  transition: transform 0.15s, opacity 0.15s;
}

.photo-grid img:hover { transform: scale(1.02); opacity: 0.9; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 30px;
}

.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 4px; }

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 92vw;
  max-height: 92vh;
}

.lightbox-info { text-align: center; }
.lightbox-info-title { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.lightbox-info-date { color: var(--text-dim); font-size: 0.85rem; margin: 4px 0 14px; }

/* ---------- Favorite photos carousel (home page) ---------- */
.carousel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 18px;
  flex: 1;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-track { background: transparent; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.carousel-item {
  position: relative;
  flex: 0 0 auto;
  /* fluid width - scales continuously with the viewport instead of jumping
     between fixed breakpoints, so it always fits the visitor's screen */
  width: clamp(180px, 26vw, 320px);
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: block;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.carousel-item:hover img,
.carousel-item:focus-visible img { transform: scale(1.08); }

.carousel-item:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.carousel-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}

.carousel-btn:hover { border-color: var(--red); background: var(--red-dark); color: #fff; }

.carousel-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot:hover { background: var(--text-faint); }
.carousel-dot.active { background: var(--red); transform: scale(1.35); }

/* ---------- Quote section ---------- */
.quote-section { padding: 30px 0 10px; text-align: center; }

.quote-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--red);
  opacity: 0.85;
  margin-bottom: 6px;
}

.quote-text {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 300;
  color: var(--text);
}

/* ---------- Featured video ---------- */
.featured-video-wrap {
  max-width: 880px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow);
}

.featured-video-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

/* ---------- Contact form consent checkbox ---------- */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.form-consent input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

/* ---------- Utility ---------- */
.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 60px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); margin-bottom: 24px; font-weight: 600; }
.back-link:hover { color: var(--red); }

.support-content { line-height: 1.8; color: var(--text-dim); }
.support-content h2, .support-content h3 { color: var(--text); }
.support-content img { border-radius: var(--radius); margin: 20px 0; }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .navbar-email { display: none; }

  /* Šešios nuorodų-nuorodos + soc. ikonos + el. paštas nebetelpa vienoje
     eilutėje maždaug nuo ~900px žemyn (pvz. tablet - 768px) - anksčiau
     persijungimas į "☰" meniu vykdavo tik nuo 680px, tad tarp 680-900px
     nuorodos tiesiog persilauždavo į kelias eilutes vidury navigacijos
     juostos. Persijungiame į "☰" meniu tuo pačiu metu, kai jau ir taip
     paslepiame el. paštą aukščiau - lieka pakankamai vietos.*/
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 10px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .navbar-controls { gap: 12px; }
}

@media (max-width: 680px) {
  .grid, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; text-align: center; }
  .carousel-btn { display: none; }
}
