@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

:root {
  --red: #ff333f;
  --red-dark: #cc1e28;
  --black: #060709;
  --ink: #0b0c10;
  --white: #ffffff;
  --muted: #a3a3c2;
  --soft: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.08);
  --panel: rgba(10, 11, 14, 0.78);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--white);
  background: var(--black);
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  align-items: start;
  gap: 22px;
  padding: 28px clamp(24px, 3.2vw, 58px) 0;
  pointer-events: none;
  transition: padding 0.3s ease, background-color 0.3s ease, border-bottom 0.3s ease, box-shadow 0.3s ease;
}

.site-header > * {
  pointer-events: auto;
}

.hero-brand {
  display: inline-grid;
  gap: 2px;
  align-content: start;
}

.loong-logo {
  display: block;
  width: clamp(168px, 15vw, 228px);
  height: auto;
  object-fit: contain;
  transition: width 0.3s ease;
}

.hero-brand small {
  display: block;
  margin-top: 16px;
  color: #efefef;
  font-size: clamp(0.82rem, 1.2vw, 1.12rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 1.7vw, 28px);
  padding-top: 34px;
}

nav a {
  position: relative;
  color: #f4f4f4;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

nav a.active::after,
nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -16px;
  height: 2px;
  background: var(--red);
}

.admin-link,
.primary-button,
.secondary-button,
.portfolio-cta {
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.contact-cta {
  margin-top: 18px;
  padding: 16px 30px;
  box-shadow: 0 10px 30px rgba(237, 17, 27, 0.24);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.42fr) minmax(360px, 1fr);
  grid-template-rows: 1fr auto auto;
  gap: 18px 24px;
  min-height: 100vh;
  padding: 180px clamp(24px, 3.2vw, 58px) 24px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.99) 0%, rgba(0, 0, 0, 0.96) 25%, rgba(0, 0, 0, 0.56) 45%, rgba(0, 0, 0, 0.12) 70%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(180deg, #000 0%, #000 18%, rgba(0, 0, 0, 0.2) 36%, rgba(0, 0, 0, 0.1) 68%, rgba(0, 0, 0, 0.92) 100%),
    url("industrial-crop.png");
  background-size: cover;
  background-position: center center;
  filter: saturate(1.08) contrast(1.04);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 52%, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.52) 100%);
  pointer-events: none;
}

.hero-copy,
.hero-spacer,
.hero-strips,
.hero-contact {
  position: relative;
  z-index: 2;
}

.hero-copy {
  align-self: center;
  max-width: 560px;
}

.hero h1 {
  margin: 0 0 28px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(3.35rem, 5.2vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.hero h1 span,
.hero h1 strong {
  display: block;
}

.hero h1 strong {
  color: var(--red);
  font: inherit;
}

.hero-copy p {
  position: relative;
  max-width: 440px;
  margin: 0 0 26px;
  color: #f5f5f5;
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  line-height: 1.35;
}

.hero-copy p::before {
  content: "";
  display: block;
  width: 96px;
  height: 2px;
  margin-bottom: 24px;
  background: var(--red);
}

.portfolio-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font-size: 0.98rem;
  box-shadow: 0 14px 34px rgba(237, 17, 27, 0.25);
}

.portfolio-cta span {
  font-size: 1.45rem;
  line-height: 0;
}

.search-box {
  display: flex;
  align-items: center;
  max-width: 430px;
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(12px);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 13px 16px;
  color: #fff;
  background: transparent;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.search-box span {
  padding: 0 16px;
  color: var(--red);
  font-size: 1.35rem;
}

.hero-strips {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1090px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 8, 8, 0.68);
  backdrop-filter: blur(12px);
}

.hero-strips article {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  padding: 18px 26px;
}

.hero-strips article + article {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-strips span {
  color: var(--red);
  font-size: 2.15rem;
  line-height: 1;
}

.hero-strips strong {
  color: #f6f6f6;
  font-size: 0.92rem;
  line-height: 1.35;
  text-transform: uppercase;
}

.hero-contact {
  grid-column: 1 / 3;
}

.contact-card {
  display: grid;
  grid-template-columns: 0.72fr 0.8fr 1fr 1.75fr;
  gap: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 12, 12, 0.78);
  backdrop-filter: blur(16px);
}

.contact-card p {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  align-items: center;
  margin: 0;
  padding: 24px 32px;
}

.contact-card p + p {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.contact-card strong {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.contact-card strong::before {
  content: "▧";
  display: inline-block;
  margin-right: 16px;
  color: var(--red);
  font-size: 1.95rem;
  vertical-align: middle;
}

.contact-card span {
  color: #e8e8e8;
}

.metrics,
.tabs-section,
.products-section,
.contact-section {
  padding: clamp(58px, 7vw, 104px) clamp(24px, 4vw, 72px);
  background: #070707;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.metric,
.tab-panel,
.product-card,
.editor-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
}

.metric {
  padding: 28px;
}

.metric strong {
  display: block;
  color: var(--red);
  font-size: clamp(1.6rem, 3vw, 3rem);
}

.metric span,
.tab-panel p,
.product-card p,
.contact-section p {
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 3.2vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.tab-buttons,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-buttons button,
.filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.tab-buttons button.active,
.filters button.active {
  border-color: var(--red);
  background: var(--red);
}

.tab-panel {
  min-height: 210px;
  padding: clamp(28px, 5vw, 54px);
  border-left: 6px solid var(--red);
}

.tab-panel h3,
.product-card h3 {
  margin: 0 0 12px;
  color: #fff;
}

.tab-panel p {
  max-width: 820px;
  line-height: 1.7;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  min-height: 220px;
  padding: 22px;
}

.product-card .category {
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-card h3 {
  margin-top: 18px;
  font-size: 1.32rem;
}

.product-card p {
  line-height: 1.55;
}

.product-card .standard {
  display: inline-block;
  margin-top: 16px;
  border-top: 2px solid var(--red);
  padding-top: 8px;
  color: #fff;
  font-weight: 900;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 30px;
}

.contact-section .contact-card {
  grid-template-columns: 1fr;
}

.contact-section .contact-card p + p {
  border-left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 32px 24px;
}

.socials a {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 9px 13px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(24px, 4vw, 72px);
  color: #a8a8a8;
  background: #030303;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-body {
  color: #15191f;
  background: #f4f0e8;
}

.admin-body .site-header {
  position: sticky;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 60px);
  background: rgba(247, 244, 239, 0.94);
  border-bottom: 1px solid #d8d0c4;
}

.admin-body .header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-body #logoutButton {
  margin: 0;
  background: #64707d;
  padding: 12px 18px;
}

.admin-body .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #15191f;
}

.admin-body .brand strong,
.admin-body .brand small {
  display: block;
}

.admin-body .brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--red);
  font-weight: 900;
  border-radius: 6px;
}

.admin-main {
  padding: 34px clamp(20px, 4vw, 60px) 70px;
}

.admin-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.admin-intro h1 {
  margin: 0 0 10px;
  color: #15191f;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.admin-intro p {
  color: #64707d;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lang-field-group {
  grid-column: 1 / -1;
  background: #fbfaf7;
  border: 1px solid #e5dfd5;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.lang-field-group.full {
  grid-column: 1 / -1;
}

.lang-field-group .group-label {
  display: block;
  font-weight: 800;
  font-size: 0.88rem;
  color: #15191f;
  margin-bottom: 8px;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.lang-grid label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #64707d;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lang-grid input,
.lang-grid textarea {
  width: 100%;
  font-weight: 500;
  font-size: 0.88rem;
}

@media (max-width: 800px) {
  .lang-grid {
    grid-template-columns: 1fr;
  }
}

.editor-panel {
  padding: 24px;
  color: #15191f;
  background: #fff;
  border-color: #d8d0c4;
}

.editor-panel h2 {
  color: #15191f;
  font-size: 1.7rem;
}

.editor-panel.wide {
  grid-column: 1 / -1;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: #64707d;
  font-size: 0.9rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d8d0c4;
  border-radius: 6px;
  padding: 12px;
  color: #15191f;
  background: #fff;
}

textarea {
  resize: vertical;
}

.repeat-list {
  display: grid;
  gap: 14px;
}

.repeat-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 18px;
  background: #fbfaf7;
  border: 1px solid #d8d0c4;
  border-radius: 8px;
}

.repeat-item label.full,
.repeat-item .item-actions {
  grid-column: 1 / -1;
}

.item-actions {
  display: flex;
  justify-content: flex-end;
}

.danger-button {
  border: 1px solid #e2a4a4;
  border-radius: 6px;
  padding: 9px 12px;
  color: #9f1419;
  background: #fff;
  cursor: pointer;
}

.secondary-button {
  padding: 10px 14px;
  background: #15191f;
}

.primary-button {
  padding: 12px 18px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 18px;
  color: #fff;
  background: #15191f;
  border-radius: 6px;
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1100px) {
  .site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px clamp(20px, 4vw, 60px);
  }

  .site-header nav {
    padding-top: 0;
  }

  .site-header .lang-switcher {
    margin-top: 0;
  }

  .contact-cta {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 170px;
  }

  .hero::before {
    background-position: 58% center;
  }

  .hero-spacer {
    display: none;
  }

  .hero-strips,
  .hero-contact {
    grid-column: 1;
  }

  .hero-strips,
  .contact-card {
    grid-template-columns: 1fr 1fr;
  }

  .hero-strips article + article,
  .contact-card p + p {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

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

/* Inline Flag Buttons Language Switcher (Frontend) */
.lang-switcher-flags {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.lang-flag-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  cursor: pointer !important;
  outline: none !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: all 0.2s ease !important;
}

.lang-flag-btn .flag-icon {
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

.lang-flag-btn:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-2px) !important;
}

.lang-flag-btn.active {
  background: var(--red, #ed111b) !important;
  border-color: var(--red, #ed111b) !important;
  box-shadow: 0 4px 14px rgba(237, 17, 27, 0.45) !important;
}

@media (max-width: 760px) {
  .admin-intro,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-body .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .admin-body .header-actions {
    width: 100%;
    display: flex;
    gap: 10px;
    justify-content: space-between;
  }

  .admin-body .header-actions button {
    flex: 1;
    padding: 12px 10px;
    font-size: 0.85rem;
    justify-content: center;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 10px 16px;
    background: rgba(10, 11, 14, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero-brand small {
    display: none;
  }

  .loong-logo {
    width: 130px;
  }

  .site-header .header-actions {
    margin: 0;
    width: auto;
  }

  nav {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    gap: 16px;
    padding: 6px 0 2px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    font-size: 0.78rem;
  }

  .site-header .contact-cta {
    display: none !important;
  }

  .hero {
    padding-top: 145px;
  }
}

  .hero {
    min-height: auto;
    padding-top: 210px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .hero-strips,
  .contact-card,
  .metrics,
  .products-grid,
  .contact-section,
  .admin-grid,
  .repeat-item {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Prima Vista-inspired LOONG homepage */
.prima-layout {
  background: #050505;
}

.prima-layout .prima-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 180px clamp(24px, 5vw, 86px) 120px;
  overflow: hidden;
  box-sizing: border-box;
}

.prima-layout .prima-hero::before,
.prima-layout .prima-hero::after {
  display: none;
}

.prima-layout .hero-copy {
  position: relative;
  z-index: 5;
  max-width: 720px;
}

.prima-layout .hero-copy .eyebrow {
  margin-bottom: 22px;
}

.prima-layout .hero h1 {
  margin-bottom: 26px;
  font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(3.8rem, 7vw, 7.2rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: none;
}

.prima-layout .hero h1 span,
.prima-layout .hero h1 strong {
  display: block;
}

.prima-layout .hero h1 strong {
  max-width: 760px;
  color: #fff;
}

.prima-layout .hero-copy p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  line-height: 1.65;
}

.prima-layout .hero-copy p::before {
  display: none;
}

.prima-layout .hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  border-radius: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.prima-layout .search-box {
  max-width: 560px;
  margin: 30px 0 20px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
}

.prima-layout .portfolio-cta {
  border-radius: 0;
  padding: 16px 24px;
}

.service-cards {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: min(1220px, calc(100% - 48px));
  margin: -74px auto 0;
  background: transparent;
  box-shadow: none;
}

.service-card {
  min-height: 195px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(10, 11, 14, 0.45), rgba(10, 11, 14, 0.92)),
    url("industrial-crop.png");
  background-size: 210%;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 51, 63, 0.45);
  box-shadow: 0 20px 40px rgba(255, 51, 63, 0.06), 0 0 15px rgba(255, 51, 63, 0.15);
}

.service-card:nth-child(2) {
  background-position: 72% 42%;
}

.service-card:nth-child(3) {
  background-position: 26% 64%;
}

.service-card:nth-child(4) {
  background-position: 92% 70%;
}

.service-card span {
  color: var(--red);
  font-weight: 900;
}

.service-card strong {
  max-width: 220px;
  color: #fff;
  font-size: clamp(1.15rem, 1.6vw, 1.55rem);
  line-height: 1.08;
}

.story-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(32px, 6vw, 92px);
  padding: clamp(86px, 10vw, 150px) clamp(24px, 5vw, 86px);
  background: #090a0d;
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.story-media {
  min-height: 560px;
  background: url("industrial-crop.png");
  background-size: cover;
  background-position: 58% center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.story-copy {
  align-self: center;
}

.story-section .eyebrow {
  color: var(--red);
}

.story-section h2,
.story-section .tab-panel h3 {
  color: #fff;
}

.story-section h2 {
  max-width: 680px;
  margin-bottom: 30px;
  font-size: clamp(2.6rem, 4.8vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-transform: none;
  background: linear-gradient(135deg, #ffffff 0%, #a3a3c2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.story-section .tab-buttons button {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.story-section .tab-buttons button:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.story-section .tab-buttons button.active {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 4px 15px rgba(255, 51, 63, 0.35);
}

.story-section .tab-panel {
  color: var(--white);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 6px solid var(--red);
  backdrop-filter: blur(8px);
  border-radius: 8px;
}

.story-section .tab-panel p {
  color: var(--muted);
}

.prima-layout .metrics {
  padding: clamp(68px, 8vw, 110px) clamp(24px, 5vw, 86px);
  background: #090a0d;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.prima-layout .metric {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.prima-layout .metric:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 51, 63, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 51, 63, 0.05);
}

.prima-layout .products-section {
  padding-top: clamp(82px, 9vw, 134px);
}

.prima-layout .section-heading {
  display: block;
  max-width: 960px;
}

.prima-layout .section-heading h2 {
  font-size: clamp(2.7rem, 5vw, 6.4rem);
  letter-spacing: -0.045em;
  text-transform: none;
}

.prima-layout .filters {
  margin: 34px 0 28px;
}

.prima-layout .products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  background: transparent;
}

.prima-layout .product-card {
  min-height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.92)),
    url("industrial-crop.png");
  background-size: cover;
  background-position: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.prima-layout .product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 51, 63, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 51, 63, 0.1);
}

.prima-layout .product-card:nth-child(4n + 1) {
  background-position: 20% 55%;
}

.prima-layout .product-card:nth-child(4n + 2) {
  background-position: 48% 45%;
}

.prima-layout .product-card:nth-child(4n + 3) {
  background-position: 75% 60%;
}

.prima-layout .product-card:nth-child(4n + 4) {
  background-position: 92% 68%;
}

.prima-layout .product-card h3 {
  margin-top: 116px;
  font-size: 1.35rem;
}

.gallery-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(420px, 1.25fr);
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(74px, 9vw, 132px) clamp(24px, 5vw, 86px);
  background: #060709;
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-section h2 {
  color: #fff;
  font-size: clamp(2.4rem, 4.8vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-transform: none;
  background: linear-gradient(135deg, #ffffff 0%, #a3a3c2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 220px 220px;
  gap: 16px;
}

.gallery-grid div {
  background-image: url("industrial-crop.png");
  background-size: 210%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.gallery-grid div:hover {
  transform: scale(1.02);
  border-color: rgba(255, 51, 63, 0.4);
}

.gallery-grid div:nth-child(1) {
  grid-row: span 2;
  background-position: 12% center;
}

.gallery-grid div:nth-child(2) {
  background-position: 54% 50%;
}

.gallery-grid div:nth-child(3) {
  background-position: 82% 60%;
}

.gallery-grid div:nth-child(4) {
  display: none;
}

@media (max-width: 1180px) {
  .story-section,
  .gallery-section {
    grid-template-columns: 1fr;
  }

  .prima-layout .hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
  }

  .service-cards,
  .prima-layout .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .prima-layout .prima-hero {
    padding-top: 230px;
  }

  .prima-layout .hero h1 {
    font-size: clamp(3.6rem, 18vw, 5.2rem);
  }

  .service-cards,
  .prima-layout .products-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-rows: repeat(3, 220px);
  }

  .gallery-grid div:nth-child(1) {
    grid-row: span 1;
  }
}

/* Language switcher and Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--soft);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.lang-btn:hover {
  border-color: var(--line);
  color: var(--white);
}

.lang-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(237, 17, 27, 0.35);
}

/* Admin Panel Language Switcher */
.editor-lang-selector-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: #fff;
  border: 1px solid #d8d0c4;
  border-radius: 8px;
  grid-column: 1 / -1;
  width: 100%;
}

.editor-lang-selector-row span {
  font-weight: 800;
  color: #64707d;
  font-size: 0.9rem;
}

.editor-lang-selector-row .lang-btn {
  border: 1px solid #d8d0c4;
  color: #64707d;
  padding: 8px 16px;
  font-size: 0.85rem;
}

.editor-lang-selector-row .lang-btn:hover {
  border-color: #64707d;
  color: #15191f;
}

.editor-lang-selector-row .lang-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Scrolled Header Styling */
.site-header.scrolled {
  position: fixed;
  background: rgba(12, 12, 12, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.85);
  border-bottom: 3px solid var(--red); /* Barra vermelha por baixo do painel */
  padding: 14px clamp(24px, 3.2vw, 58px);
  pointer-events: auto;
  align-items: center;
  z-index: 1000;
}

.site-header.scrolled .loong-logo {
  width: clamp(90px, 8vw, 120px); /* Logo fica ainda mais pequeno */
}

.site-header.scrolled .hero-brand small {
  display: none;
}

.site-header.scrolled nav {
  padding-top: 0;
}

.site-header.scrolled .contact-cta {
  margin-top: 0;
  padding: 10px 20px;
}

.site-header.scrolled .lang-switcher {
  margin-top: 0;
}

/* Scrolled Header para Telemóveis */
@media (max-width: 760px) {
  .site-header.scrolled {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 16px !important;
    z-index: 1000 !important;
    background: rgba(12, 12, 12, 0.96) !important;
    border-bottom: 3px solid var(--red) !important;
  }
  
  .site-header.scrolled .loong-logo {
    width: 80px !important;
  }

  .site-header.scrolled nav {
    padding-top: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
  }

  .site-header.scrolled nav a {
    font-size: 0.72rem !important;
    text-shadow: none;
  }
  
  .site-header.scrolled .header-actions {
    margin-top: 0 !important;
  }

  .site-header.scrolled .lang-switcher {
    margin-top: 0 !important;
  }
}

/* Restrito Admin Login Interface */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}
.login-overlay[hidden] {
  display: none !important;
}
.login-card {
  background: #ffffff;
  padding: 34px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  max-width: 400px;
  width: 90%;
  text-align: center;
  border: 1px solid #d8d0c4;
}
.login-card .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #15191f;
  margin-bottom: 8px;
}
.login-card .brand strong,
.login-card .brand small {
  display: block;
  text-align: left;
}
.login-card .brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--red);
  font-weight: 900;
  border-radius: 6px;
}
.login-card h2 {
  font-size: 1.8rem;
  margin: 18px 0 8px;
  color: #15191f;
}
.login-card p {
  color: #64707d;
  font-size: 0.95rem;
  margin-bottom: 22px;
}
.login-card form {
  display: grid;
  gap: 12px;
}
.login-card input {
  padding: 14px;
  font-size: 1rem;
  border: 1px solid #d8d0c4;
  border-radius: 8px;
  text-align: center;
  outline: none;
  background: #fbfaf7;
  color: #15191f;
}
.login-card input:focus {
  border-color: var(--red);
}
.login-card .primary-button {
  padding: 14px;
  font-size: 1rem;
  border-radius: 8px;
  width: 100%;
}
.login-error {
  color: #9f1419;
  font-weight: 700;
  margin-top: 14px;
  font-size: 0.9rem;
}

/* Product Image Preview Styles in Admin */
.image-preview-container {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  grid-column: 1 / -1;
}
.image-preview-container .preview-title {
  color: #64707d;
  font-size: 0.9rem;
  font-weight: 800;
}
.image-preview-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 160px;
  border: 1px dashed #d8d0c4;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  margin-top: 8px;
}
.image-preview-box img.img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.remove-img-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(237, 17, 27, 0.9);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.2s ease;
}
.remove-img-btn:hover {
  background: var(--red-dark);
}
.no-img-text {
  color: #a0a0a0;
  font-size: 0.85rem;
}

/* Carousel Slide Styles */
.carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}
.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

/* ==========================================================================
   PREMIUM DARK MODE FIRST: SCROLL-DRIVEN ANIMATIONS & INTERACTION REVEALS
   ========================================================================== */

/* Fixed Header Shrinking Scroll Animation */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .site-header {
    animation: shrink-header auto linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 100px;
  }

  @keyframes shrink-header {
    to {
      background: rgba(10, 11, 14, 0.95);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
      border-bottom: 2px solid var(--red);
      padding: 14px clamp(24px, 3.2vw, 58px);
      align-items: center;
    }
  }

  /* Reveal sections on scroll natively */
  .reveal-on-scroll {
    animation: reveal-fade-in auto linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }

  @keyframes reveal-fade-in {
    from {
      opacity: 0;
      transform: translateY(40px) scale(0.96);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

/* Fallback styles for browsers that do not support scroll-timeline */
@supports not ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Accessibility: respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .site-header {
    animation: none !important;
  }
  .reveal-on-scroll {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
