/* ═══════════════════════════════════════════════════════════
   WILEC — Dynamic Website Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Fonts ── */
@font-face { font-family: 'Satoshi'; src: url('../fonts/Satoshi-Regular.otf') format('opentype'); font-weight: 400; }
@font-face { font-family: 'Satoshi'; src: url('../fonts/Satoshi-Medium.otf') format('opentype'); font-weight: 500; }
@font-face { font-family: 'Satoshi'; src: url('../fonts/Satoshi-Bold.otf') format('opentype'); font-weight: 700; }

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

:root {
  --red: #CC0000;
  --red-dark: #a30000;
  --black: #111;
  --dark: #1a1a1a;
  --grey-900: #222;
  --grey-700: #555;
  --grey-400: #999;
  --grey-200: #ddd;
  --grey-100: #f2f2f2;
  --white: #fff;
  --font-primary: 'Montserrat', sans-serif;
  --font-body: 'Satoshi', 'Montserrat', sans-serif;
  --max-width: 1280px;
  --nav-height: 72px;
}

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

body {
  font-family: var(--font-body);
  color: var(--black);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ── Typography ── */
h1, h2, h3, h4, h5 { font-family: var(--font-primary); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 12px 32px;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-red { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline { background: transparent; color: var(--black); border-color: var(--black); }
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--black); }
.btn-outline-red { background: transparent; color: var(--red); border-color: var(--red); }
.btn-outline-red:hover { background: var(--red); color: var(--white); }

/* ═══════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  height: var(--nav-height);
  transition: transform 0.3s;
}
.navbar.hidden { transform: translateY(-100%); }
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand img { height: 36px; width: auto; }

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  z-index: 1002;
}
.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--black);
  transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Nav overlay */
.nav-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--dark);
  z-index: 1001;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.nav-overlay.active { opacity: 1; pointer-events: all; }

.nav-menu-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.nav-links { display: flex; flex-direction: column; gap: 8px; }
.nav-link {
  color: var(--white);
  font-family: var(--font-primary);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  padding: 8px 0;
  display: flex;
  align-items: baseline;
  gap: 16px;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.nav-link::before {
  content: attr(data-num);
  font-size: 0.6em;
  font-weight: 400;
  opacity: 0.5;
  min-width: 28px;
}
.nav-link:hover, .nav-link.active { opacity: 1; }

.nav-sidebar { color: var(--white); padding-top: 16px; }
.nav-sidebar h3 { font-size: 1rem; margin-bottom: 16px; opacity: 0.6; }
.nav-sidebar p { font-size: 0.85rem; line-height: 1.8; margin-bottom: 12px; opacity: 0.8; }
.social-link { display: inline-block; opacity: 0.6; transition: opacity 0.3s; }
.social-link:hover { opacity: 1; }

/* ═══════════════════════════════════════
   HERO SECTIONS
   ═══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  color: var(--white);
  overflow: hidden;
  padding-top: var(--nav-height);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img, .hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 40px 24px;
}
.hero-content h1 { margin-bottom: 24px; font-weight: 700; }
.hero-content p {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* Page hero (shorter) */
.page-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  background: var(--dark);
  color: var(--white);
  overflow: hidden;
  padding: calc(var(--nav-height) + 40px) 0 60px;
}
.page-hero .hero-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%);
}
.page-hero .hero-content {
  text-align: left;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.page-hero .hero-content h1 { margin-bottom: 12px; }
.page-hero .hero-content p { margin: 0; max-width: 600px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.7;
  margin-bottom: 16px;
  transition: opacity 0.3s;
}
.back-link:hover { opacity: 1; }
.back-link::before { content: '←'; font-size: 1.2em; }

/* ═══════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════ */
.section { padding: 80px 0; }
.section-dark { background: var(--dark); color: var(--white); }
.section-grey { background: var(--grey-100); }
.section-red { background: var(--red); color: var(--white); }

.section-header {
  margin-bottom: 48px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p {
  color: var(--grey-700);
  max-width: 600px;
  font-size: 0.95rem;
}
.section-dark .section-header p { color: rgba(255,255,255,0.7); }

/* ═══════════════════════════════════════
   CARD GRIDS
   ═══════════════════════════════════════ */
.card-grid {
  display: grid;
  gap: 24px;
}
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Offering cards */
.offering-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}
.offering-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.offering-card:hover img { transform: scale(1.05); }
.offering-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: var(--white);
}
.offering-card-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.4s;
}
.offering-card:hover .offering-card-overlay::before { opacity: 0.25; }
.offering-card h3 { position: relative; font-size: 1.3rem; margin-bottom: 8px; }
.offering-card p { position: relative; font-size: 0.85rem; opacity: 0.8; line-height: 1.5; }

/* Product/item cards */
.product-card {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
}
.product-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.product-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--grey-100);
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-body { padding: 16px; }
.product-card h3 { font-size: 0.95rem; font-weight: 600; }
.product-card p { font-size: 0.8rem; color: var(--grey-700); margin-top: 4px; }

/* News cards */
.news-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--grey-200);
  cursor: pointer;
  transition: background 0.2s;
}
.news-card:hover { background: var(--grey-100); }
.news-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 4px;
  background: var(--grey-100);
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { display: flex; flex-direction: column; justify-content: center; }
.news-card-date { font-size: 0.75rem; color: var(--red); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.news-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.news-card p { font-size: 0.85rem; color: var(--grey-700); line-height: 1.6; }

/* Team cards */
.team-card { text-align: center; }
.team-card-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  background: var(--grey-100);
}
.team-card-img img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1rem; margin-bottom: 4px; }
.team-card .role { font-size: 0.8rem; color: var(--grey-700); }
.team-card .credentials { font-size: 0.7rem; color: var(--grey-400); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.03em; }

/* Client logo grids */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 24px;
  align-items: center;
}
.logo-grid img {
  max-height: 50px;
  width: auto;
  margin: 0 auto;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: opacity 0.3s, filter 0.3s;
}
.logo-grid img:hover { opacity: 1; filter: none; }

/* ═══════════════════════════════════════
   PRODUCT DETAIL
   ═══════════════════════════════════════ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.product-detail-img {
  border-radius: 4px;
  overflow: hidden;
  background: var(--grey-100);
}
.product-detail-img img { width: 100%; }
.product-detail-info h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 16px; }
.product-detail-info .description { color: var(--grey-700); line-height: 1.8; margin-bottom: 24px; }
.product-detail-info .description p { margin-bottom: 12px; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
.spec-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-400);
  padding: 8px 12px;
  border-bottom: 2px solid var(--grey-200);
}
.spec-table td {
  padding: 10px 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--grey-100);
}

/* ═══════════════════════════════════════
   NEWS DETAIL
   ═══════════════════════════════════════ */
.article-meta {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--grey-200);
  margin-bottom: 32px;
  font-size: 0.85rem;
  color: var(--grey-700);
}
.article-meta strong { color: var(--black); }
.article-body {
  max-width: 720px;
  line-height: 1.9;
  font-size: 1rem;
}
.article-body p { margin-bottom: 16px; }
.article-body h2, .article-body h3 { margin: 32px 0 12px; }
.article-body img { margin: 24px 0; border-radius: 4px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; }

/* ═══════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--grey-200);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--red);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.location-card {
  background: var(--grey-100);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 16px;
}
.location-card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--red); }
.location-card p { font-size: 0.85rem; line-height: 1.7; }

/* ═══════════════════════════════════════
   MAP EMBED
   ═══════════════════════════════════════ */
.map-container {
  width: 100%;
  height: 450px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--grey-100);
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer { background: var(--dark); color: var(--white); }
.footer-top { padding: 60px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-top-grid { display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: start; }
.footer-logo { max-width: 160px; opacity: 0.8; }
.footer-desc-col p { font-size: 0.85rem; line-height: 1.8; opacity: 0.6; }

.footer-bottom { padding: 48px 0; }
.footer-bottom-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.footer-brand { margin-bottom: 12px; opacity: 0.6; }
.copyright { font-size: 0.75rem; opacity: 0.4; margin-bottom: 16px; }
.footer-buttons { display: flex; gap: 12px; }

.footer-locations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}
.footer-loc h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.footer-loc p { font-size: 0.75rem; line-height: 1.7; opacity: 0.6; }

/* ═══════════════════════════════════════
   LOADING & TRANSITIONS
   ═══════════════════════════════════════ */
.page-enter { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  font-size: 0.9rem;
  color: var(--grey-400);
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: none; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 991px) {
  .nav-menu-inner { grid-template-columns: 1fr; gap: 40px; }
  .nav-sidebar { display: none; }
  .product-detail { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top-grid { grid-template-columns: 1fr; }
  .footer-bottom-grid { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .section { padding: 48px 0; }
  .page-hero { min-height: 40vh; }
  .news-card { grid-template-columns: 1fr; }
  .news-card-img { aspect-ratio: 16/9; }
  .card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .card-grid-4 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .hero-content h1 { font-size: 2rem; }
}

@media (max-width: 479px) {
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: 1fr 1fr; }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
}
