/* ══════════════════════════════════════
   TRIMASUR — styles.css
   ══════════════════════════════════════ */

/* ── Variables ── */
:root {
  --navy: #1a2d5a;
  --orange: #e8651a;
  --yellow: #f5c518;
  --green-wa: #25D366;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray-text: #555555;
  --radius: 37px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #222;
  overflow-x: hidden;
}

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

/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--yellow);
}

/* Dropdown */
.nav-links .dropdown {
  position: relative;
}

.nav-links .dropdown>a::after {
  content: ' ▾';
  font-size: .75rem;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy);
  min-width: 160px;
  border-top: 2px solid var(--orange);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: #fff;
  font-size: .9rem;
  transition: background .2s;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, .1);
}

/* WhatsApp button */
.btn-wa-nav {
  background: var(--green-wa);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: .9rem;
  transition: background .2s;
}

.btn-wa-nav:hover {
  background: #1da851;
}

/* ══════════════════════════════════════
   HERO
   ══════════════════════════════════════ */
#inicio {
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../img/hero_bakground.png') center/cover no-repeat;
  filter: brightness(.4);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 80px 40px 100px;
}

.hero-left {
  flex: 0 1 480px;
}

.hero-left h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 20px;
}

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

.hero-left p {
  color: #ddd;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 420px;
}

.btn-primary {
  display: inline-block;
  background: var(--green-wa);
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .2s, background .2s;
}

.btn-primary:hover {
  background: #1da851;
  transform: translateY(-2px);
}

.hero-right {
  flex: 0 0 340px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-worker-wrap {
  width: 340px;
  height: 440px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(232, 101, 26, .8) 0%, rgba(245, 197, 24, .8) 100%);
}

.hero-worker-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ══════════════════════════════════════
   FEATURE CARDS
   ══════════════════════════════════════ */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0 300px;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.feat-card {
  padding: 36px 24px;
  text-align: center;
  background: #fff;
  border-radius: 20px;
  border: 1.5px solid #e0e6f0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
  transition: transform .2s, box-shadow .2s;
}

.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}

.feat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.feat-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.feat-card p {
  font-size: .85rem;
  color: var(--gray-text);
  line-height: 1.5;
  margin-bottom: 16px;
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--navy);
  color: var(--navy);
  padding: 7px 18px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}

.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}

/* ══════════════════════════════════════
   SECTION BASE
   ══════════════════════════════════════ */
section {
  padding: 80px 40px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--navy);
}

/* ══════════════════════════════════════
   NOSOTROS
   ══════════════════════════════════════ */
#nosotros {
  background: #fff;
}

.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.photo-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 220px 200px;
  gap: 10px;
}

.photo-mosaic .big {
  grid-column: 1 / 3;
  border-radius: 16px;
  overflow: hidden;
}

.photo-mosaic .small {
  border-radius: 16px;
  overflow: hidden;
}

.photo-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nosotros-right h2 {
  margin-bottom: 24px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-text);
  transition: all .2s;
}

.tab-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.tab-content {
  min-height: 120px;
}

.tab-pane {
  display: none;
  line-height: 1.7;
  color: var(--gray-text);
  font-size: .97rem;
}

.tab-pane.active {
  display: block;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.stat-box {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  color: #fff;
}

.stat-box .num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--yellow);
}

.stat-box .lbl {
  font-size: .85rem;
  color: #cdd;
  margin-top: 4px;
}

/* ══════════════════════════════════════
   PRODUCTOS & SERVICIOS (split)
   ══════════════════════════════════════ */
.section-split {
  padding: 0;
}

.bg-navy {
  background: var(--navy);
}

.bg-orange {
  background: var(--orange);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 800px;
}

.split-info {
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-img {
  position: relative;
  overflow: hidden;
}

.split-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .6s ease;
}

/* Number buttons */
.num-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  margin-top: 24px;
}

.num-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: transparent;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
}

.num-btn.active {
  background: #fff;
  color: var(--navy);
}

#servicios .num-btn.active {
  color: var(--orange);
}

.item-title {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.item-desc {
  color: rgba(255, 255, 255, .85);
  font-size: .95rem;
  line-height: 1.7;
}

/* ══════════════════════════════════════
   GALERÍA
   ══════════════════════════════════════ */
#galeria {
  background: #fff;
  text-align: center;
}

#galeria h2 {
  margin-bottom: 8px;
}

#galeria .sub {
  color: var(--gray-text);
  margin-bottom: 32px;
  font-size: 1rem;
}

.slider-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  width: 90%;
  margin: 0 auto;
  aspect-ratio: 16/8;
}

.slider-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .5s ease;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background .2s;
  z-index: 10;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, .8);
}

.slider-btn.prev {
  left: 16px;
}

.slider-btn.next {
  right: 16px;
}

/* ══════════════════════════════════════
   CONTACTO
   ══════════════════════════════════════ */
#contacto {
  background: #fff;
  padding-left: 120px;
  padding-right: 120px;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

#contacto h2 {
  margin-bottom: 16px;
}

#contacto>.contacto-grid>div>p {
  color: var(--gray-text);
  line-height: 1.7;
  margin-bottom: 28px;
  font-size: .97rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: .95rem;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--orange);
}

.btn-send {
  width: 100%;
  background: var(--orange);
  color: #fff;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.btn-send:hover {
  background: #cc5510;
}

.contact-icons {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.contact-icon-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.ci-label {
  font-size: .75rem;
  color: #999;
}

.contact-icon-item strong {
  font-size: .9rem;
  color: var(--navy);
  display: block;
}

.map-wrap {
  border-radius: 24px;
  overflow: hidden;
  height: 600px;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
footer {
  background: #111;
  color: #fff;
  padding: 60px 40px 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 12px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  color: #888;
}

.footer-brand span {
  color: var(--yellow);
  font-weight: 700;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  color: #888;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: #ccc;
  text-decoration: none;
  font-size: .9rem;
  margin-bottom: 8px;
  transition: color .2s;
}

.footer-col a:hover {
  color: var(--yellow);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: .82rem;
  color: #666;
}

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

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 1rem;
  text-decoration: none;
  transition: all .2s;
}

.social-links a:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* ══════════════════════════════════════
   SCROLL ANIMATIONS
   ══════════════════════════════════════ */
[data-scroll] {
  opacity: 0;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-scroll="fade-up"]    { transform: translateY(40px); }
[data-scroll="fade-left"]  { transform: translateX(-50px); }
[data-scroll="fade-right"] { transform: translateX(50px); }

[data-scroll].in-view {
  opacity: 1;
  transform: translate(0, 0);
}

[data-scroll-delay="1"] { transition-delay: 0.1s; }
[data-scroll-delay="2"] { transition-delay: 0.2s; }
[data-scroll-delay="3"] { transition-delay: 0.3s; }
[data-scroll-delay="4"] { transition-delay: 0.4s; }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  nav {
    padding: 0 20px;
  }

  .nav-links {
    gap: 16px;
  }

  .hero-right {
    display: none;
  }

  .features {
    grid-template-columns: 1fr 1fr;
    padding: 0 20px;
    margin-top: -40px;
  }

  .nosotros-grid,
  .split-section,
  .contacto-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  section {
    padding: 60px 20px;
  }
}

@media (max-width: 600px) {
  .features {
    grid-template-columns: 1fr;
    padding: 0 16px;
    margin-top: -30px;
  }

  .nav-hide {
    display: none;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}