/* ═══════════════════════════════════════════════════════════
   rivieratrade.es - Fastmount
   Inspired by promotech-italia.it design
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #333e48;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ── Container ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Header ───────────────────────────────────────────────── */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: 70px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}
#site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.logo { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main { font-size: 22px; font-weight: 700; color: #333e48; letter-spacing: -0.5px; }
.logo-sub { font-size: 11px; font-weight: 400; color: #999; letter-spacing: 1px; text-transform: uppercase; }
#main-nav { display: flex; gap: 8px; }
#main-nav a {
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  color: #333e48; border-radius: 9999px;
  transition: background 0.2s, color 0.2s;
}
#main-nav a:hover { background: #f0f0f0; }
#main-nav a.active { background: #333e48; color: #fff; }
#hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative; padding: 0;
}
#hamburger span {
  display: block; width: 100%; height: 2px; background: #333e48;
  position: absolute; left: 0; transition: all 0.3s;
}
#hamburger span:nth-child(1) { top: 0; }
#hamburger span:nth-child(2) { top: 9px; }
#hamburger span:nth-child(3) { top: 18px; }
#hamburger.open span:nth-child(1) { top: 9px; transform: rotate(45deg); }
#hamburger.open span:nth-child(2) { opacity: 0; }
#hamburger.open span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative; height: 85vh; min-height: 500px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-top: 70px;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(51,62,72,0.75) 0%, rgba(51,62,72,0.45) 100%);
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  color: #fff; max-width: 700px; padding: 0 24px;
}
.hero-content h1 {
  font-size: clamp(32px, 5vw, 56px); font-weight: 700;
  line-height: 1.15; margin-bottom: 20px; letter-spacing: -1px;
}
.hero-content p {
  font-size: 18px; line-height: 1.7; opacity: 0.92; margin-bottom: 32px;
}

/* ── Page Hero (subpages) ─────────────────────────────────── */
.page-hero {
  background: #333e48; color: #fff; padding: 120px 0 60px;
  margin-top: 70px;
}
.page-hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-bottom: 12px; }
.page-hero p { font-size: 17px; opacity: 0.85; max-width: 600px; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb { margin-bottom: 16px; font-size: 14px; opacity: 0.7; }
.breadcrumb a { text-decoration: underline; }
.breadcrumb a:hover { opacity: 1; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 14px 32px;
  font-size: 14px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; border-radius: 9999px;
  transition: all 0.3s; cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: #c8102e; color: #fff; border-color: #c8102e; }
.btn-primary:hover { background: #a80d25; border-color: #a80d25; }
.btn-outline { background: transparent; color: #333e48; border-color: #333e48; }
.btn-outline:hover { background: #333e48; color: #fff; }
.btn-sm { padding: 10px 22px; font-size: 12px; }

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 80px 0; }
.bg-light { background: #f8f9fa; }
.section-title {
  font-size: clamp(24px, 3vw, 36px); font-weight: 700;
  text-align: center; margin-bottom: 16px;
}
.section-subtitle {
  text-align: center; font-size: 16px; color: #666;
  margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.section-intro { max-width: 800px; margin: 0 auto; text-align: center; }
.section-intro h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 700; margin-bottom: 24px; }
.section-intro p { font-size: 16px; color: #555; line-height: 1.8; margin-bottom: 16px; }
.cta-center { text-align: center; margin-top: 48px; }

/* ── Sector Cards (Home) ──────────────────────────────────── */
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sector-card {
  position: relative; border-radius: 12px; overflow: hidden;
  aspect-ratio: 4/3; display: block;
}
.sector-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.sector-card:hover img { transform: scale(1.08); }
.sector-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px; color: #fff;
  transition: background 0.3s;
}
.sector-card:hover .sector-overlay {
  background: linear-gradient(to top, rgba(200,16,46,0.8) 0%, rgba(200,16,46,0.2) 60%);
}
.sector-overlay h3 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.sector-overlay p { font-size: 14px; opacity: 0.9; }

/* ── Range Cards Mini (Home) ──────────────────────────────── */
.range-cards-mini-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-bottom: 16px;
}
.range-card-mini {
  position: relative; border-radius: 12px; overflow: hidden;
  background: #fff; border: 1px solid #eee;
  transition: transform 0.3s, box-shadow 0.3s;
  display: block;
}
.range-card-mini:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.range-card-mini img { width: 100%; aspect-ratio: 3/2; object-fit: contain; padding: 20px; background: #fafafa; }
.range-card-mini-info { padding: 16px; text-align: center; }
.range-card-mini-info h3 { font-size: 15px; font-weight: 600; }

/* ── Range Cards (Products hub) ───────────────────────────── */
.range-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.range-card {
  display: flex; border-radius: 12px; overflow: hidden;
  background: #fff; border: 1px solid #eee;
  transition: transform 0.3s, box-shadow 0.3s;
}
.range-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.range-card-img { flex: 0 0 200px; background: #fafafa; display: flex; align-items: center; justify-content: center; padding: 24px; }
.range-card-img img { max-height: 160px; object-fit: contain; }
.range-card-info { padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.range-card-info h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.range-card-info p { font-size: 14px; color: #666; margin-bottom: 12px; line-height: 1.6; }
.range-card-count { font-size: 13px; color: #999; margin-bottom: 16px; }

/* ── Product Grid (Range pages) ───────────────────────────── */
.range-description { max-width: 800px; margin: 0 auto 48px; text-align: center; font-size: 16px; color: #555; line-height: 1.8; }
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.product-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  border: 1px solid #eee;
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.product-card-img {
  aspect-ratio: 1; background: #fafafa; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  overflow: hidden;
}
.product-card-img img {
  max-height: 100%; max-width: 100%; object-fit: contain;
  transition: transform 0.4s;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-info { padding: 16px; text-align: center; }
.product-card-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: #333e48; }
.product-card-info p { font-size: 13px; color: #777; margin-bottom: 12px; }

/* ── CTA Grid (Home) ─────────────────────────────────────── */
.cta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cta-card {
  background: #fff; border-radius: 12px; padding: 40px 32px;
  text-align: center; border: 1px solid #eee;
  transition: transform 0.3s, box-shadow 0.3s;
}
.cta-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.cta-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.cta-card p { font-size: 14px; color: #666; margin-bottom: 24px; line-height: 1.7; }

/* ── FAQ Accordion ────────────────────────────────────────── */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid #e0e0e0; }
.faq-question {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; font-size: 16px; font-weight: 600;
  color: #333e48; text-align: left; font-family: inherit;
  transition: color 0.2s;
}
.faq-question:hover { color: #c8102e; }
.faq-icon {
  font-size: 24px; font-weight: 300; transition: transform 0.3s;
  flex-shrink: 0; margin-left: 16px; width: 24px; text-align: center;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.open .faq-answer { max-height: 500px; padding-bottom: 20px; }
.faq-answer p { font-size: 15px; color: #555; line-height: 1.8; }
.faq-answer a { color: #c8102e; text-decoration: underline; }

/* ── Projects Grid ────────────────────────────────────────── */
.project-filters {
  display: flex; justify-content: center; gap: 8px;
  margin-bottom: 40px; flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 20px; border-radius: 9999px; border: 2px solid #ddd;
  background: #fff; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; font-family: inherit; color: #333e48;
}
.filter-btn:hover { border-color: #333e48; }
.filter-btn.active { background: #333e48; color: #fff; border-color: #333e48; }
.project-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.project-card {
  position: relative; border-radius: 12px; overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
}
.project-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s;
}
.project-card:hover img { transform: scale(1.06); }
.project-card .project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 50%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px; color: #fff;
  opacity: 0; transition: opacity 0.3s;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.project-sector {
  display: inline-block; background: #c8102e; color: #fff;
  padding: 3px 12px; border-radius: 9999px; font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  width: fit-content;
}
.project-card.hidden { display: none; }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: #fff; font-size: 40px;
  cursor: pointer; line-height: 1; padding: 8px; z-index: 10;
  transition: transform 0.2s;
}
.lightbox-close:hover { transform: scale(1.2); }
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  font-size: 36px; cursor: pointer; padding: 16px 20px;
  border-radius: 8px; z-index: 10;
  transition: background 0.2s;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-content { text-align: center; max-width: 90vw; max-height: 85vh; }
#lightbox-img { max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: 4px; }
.lightbox-caption { margin-top: 16px; color: #fff; }
.lightbox-caption h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
#lightbox-sector { font-size: 13px; opacity: 0.7; }

/* ── Videos ────────────────────────────────────────────────── */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.video-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  border: 1px solid #eee;
}
.video-embed {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
}
.video-embed iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.video-card h3 { padding: 16px 20px; font-size: 15px; font-weight: 600; }

/* ── Catalog Cards ────────────────────────────────────────── */
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.catalog-card {
  background: #fff; border-radius: 12px; padding: 40px 28px;
  text-align: center; border: 1px solid #eee;
}
.catalog-icon { margin-bottom: 20px; color: #c8102e; }
.catalog-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.catalog-card p { font-size: 14px; color: #666; margin-bottom: 20px; line-height: 1.6; }

/* ── Contact ──────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.contact-card {
  background: #fff; border-radius: 12px; padding: 36px 24px;
  text-align: center; border: 1px solid #eee;
  transition: transform 0.3s, box-shadow 0.3s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.contact-icon { margin-bottom: 16px; color: #c8102e; }
.contact-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.contact-card p { font-size: 14px; color: #555; line-height: 1.7; }
.contact-card a { color: #c8102e; }
.contact-card a:hover { text-decoration: underline; }
.contact-info-box {
  max-width: 700px; margin: 0 auto; text-align: center;
}
.contact-info-box h2 { font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.contact-info-box p { font-size: 15px; color: #555; line-height: 1.8; margin-bottom: 16px; }

/* ── Footer ───────────────────────────────────────────────── */
footer { background: #1a1a2e; color: #ccc; padding: 64px 0 0; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
}
footer h4 { color: #fff; font-size: 16px; font-weight: 600; margin-bottom: 16px; }
footer p { font-size: 14px; line-height: 1.7; }
footer a { color: #ccc; transition: color 0.2s; }
footer a:hover { color: #fff; }
.social-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; font-size: 14px;
}
.footer-bottom {
  margin-top: 48px; padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center; font-size: 13px; color: #777;
}

/* ── 4-column sector grid ────────────────────────────────── */
.sector-grid-4 { grid-template-columns: repeat(3, 1fr); }

/* ── Language Switcher ────────────────────────────────────── */
.lang-switcher { display: flex; gap: 4px; margin-right: 8px; }
.lang-switcher a {
  padding: 4px 10px; font-size: 12px; font-weight: 600;
  border-radius: 4px; color: #999; transition: all 0.2s;
}
.lang-switcher a.active { background: #333e48; color: #fff; }
.lang-switcher a:hover { color: #333e48; }

/* ── Hero RT (top hero with logo) ─────────────────────────── */
.hero-rt .hero-content { max-width: 800px; }
.hero-rt h1 { font-size: clamp(28px, 4vw, 44px); }
.hero-tagline { font-size: 17px !important; line-height: 1.7; }
.hero-logo-img {
  width: 180px; height: auto; margin: 0 auto 20px;
  filter: brightness(0) invert(1); opacity: 0.95;
}
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-outline-white {
  border: 2px solid rgba(255,255,255,0.8); color: #fff;
  background: transparent; padding: 14px 32px; border-radius: 9999px;
  font-size: 14px; font-weight: 600; transition: all 0.2s;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* ── Service pages ───────────────────────────────────────── */
.service-content { max-width: 800px; margin: 0 auto; }
.service-content h2 { font-size: 28px; font-weight: 700; color: #333e48; margin-bottom: 16px; margin-top: 32px; }
.service-content h3 { font-size: 20px; font-weight: 600; color: #333e48; margin-top: 28px; margin-bottom: 8px; }
.service-content p { font-size: 16px; line-height: 1.8; color: #555; margin-bottom: 12px; }
.service-content li { font-size: 15px; line-height: 1.7; color: #555; margin-bottom: 6px; }
.service-hero-img {
  width: 100%; border-radius: 12px; margin-bottom: 24px;
  aspect-ratio: 16/9; object-fit: cover;
}

/* ── Responsive 960px ─────────────────────────────────────── */
@media (max-width: 960px) {
  .sector-grid, .sector-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .range-cards-mini-grid { grid-template-columns: repeat(2, 1fr); }
  .range-grid { grid-template-columns: 1fr; }
  .range-card { flex-direction: column; }
  .range-card-img { flex: none; height: 200px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  #main-nav {
    position: fixed; top: 70px; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    flex-direction: column; padding: 20px;
    transform: translateY(-120%);
    transition: transform 0.3s;
    border-bottom: 1px solid #eee;
  }
  #main-nav.open { transform: translateY(0); }
  #main-nav a { padding: 14px 20px; border-radius: 8px; font-size: 16px; }
  #hamburger { display: block; }
}

/* ── Responsive 640px ─────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { height: 70vh; min-height: 400px; }
  .hero-content h1 { font-size: 28px; }
  .hero-content p { font-size: 15px; }
  .section { padding: 56px 0; }
  .sector-grid { grid-template-columns: 1fr; }
  .range-cards-mini-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .page-hero { padding: 100px 0 40px; }
  .btn { padding: 12px 24px; font-size: 13px; }
}
