/* ==============================
   CSS VARIABLES & RESET
============================== */
:root {
  --yellow: #f5c800;
  --dark: #1a1a1a;
  --dark2: #222222;
  --dark3: #2e2e2e;
  --gray-light: #f4f4f4;
  --text-muted: #888;
  --white: #ffffff;
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Montserrat', sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
img, video, iframe { max-width: 100%; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--dark);
}

/* ==============================
   NAVBAR
============================== */
.navbar {
  background: var(--dark) !important;
  padding: 0.6rem 2rem;
  border-bottom: 2px solid var(--yellow);
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--white) !important;
  text-transform: lowercase;
}

.navbar-brand span { color: var(--yellow); }

.logo-img {
  display: block;
  width: 400px;          /* tamaño en escritorio (≈28 px de alto) */
  max-width: 100%;
  height: auto;          /* conserva la proporción en todos los navegadores (incl. Safari/iOS) */
}

/* ---- Logo del nav: se reduce en tablet y celular ---- */
.navbar > .container-fluid { flex-wrap: wrap; }
.navbar-brand {
  flex: 0 1 auto;
  min-width: 0;
  margin-right: 1rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  line-height: 0;
}
.navbar-toggler { flex-shrink: 0; }

@media (max-width: 991.98px) {           /* tablet */
  .navbar { padding-left: 0.5rem; padding-right: 0.5rem; }
  .navbar-brand { max-width: calc(100% - 56px); }
  .navbar-brand .logo-img { width: 260px; }
}
@media (max-width: 575.98px) {           /* celular */
  .navbar { padding-left: 0; padding-right: 0; }
  .navbar-brand .logo-img { width: 160px; }
}
@media (max-width: 359.98px) {           /* celulares muy angostos */
  .navbar-brand .logo-img { width: 140px; }
}

.navbar-nav .nav-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white) !important;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s;
}

.navbar-nav .nav-link:hover { color: var(--yellow) !important; }

.navbar-toggler {
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  padding: 0;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon-custom { color: var(--white); font-size: 1.6rem; line-height: 1; }

/* ==============================
   HERO SLIDER
============================== */
#heroSlider { background: var(--dark); }

/* Fixed height so all slides are identical in size */
#carouselHero,
#carouselHero .carousel-inner,
#carouselHero .carousel-item {
  height: 600px;
}

@media (max-width: 767px) {
  #carouselHero,
  #carouselHero .carousel-inner,
  #carouselHero .carousel-item {
    height: 420px;
  }}

.hero-slide {
  background: var(--dark);
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  position: relative;
  overflow: hidden;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(245,200,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-badge::before {
  content: '';
  display: inline-block;
  width: 30px; height: 1px;
  background: var(--yellow);
}

.hero-badge2 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-badge2::before {
  content: '';
  display: inline-block;
  width: 30px; height: 1px;
  background: var(--dark2);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.05;
  color: var(--white);
  max-width: 700px;
}

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

.hero-title2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.05;
  color: var(--dark);
  max-width: 700px;
}

.hero-title2 span { color: var(--dark3); }

.hero-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.7rem 2rem;
  background: var(--yellow);
  color: var(--dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.hero-cta:hover { background: #e6b800; color: var(--dark); transform: translateY(-2px); }

.hero-cta2 {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.7rem 2rem;
  background: var(--dark);
  color: var(--yellow);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.hero-cta:hover { background: #1a1a1a; color: var(--yellow); transform: translateY(-2px); }

.hero-logo-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 5rem;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Slider controls */
.carousel-control-prev,
.carousel-control-next {
  width: 48px; height: 48px;
  top: 50%; transform: translateY(-50%);
  bottom: auto;
  background: rgba(245,200,0,0.12);
  border: 1px solid rgba(245,200,0,0.35);
  border-radius: 0;
  opacity: 1;
  transition: background 0.2s;
}

.carousel-control-prev { left: 12px; }
.carousel-control-next { right: 12px; }
.carousel-control-prev:hover,
.carousel-control-next:hover { background: rgba(245,200,0,0.3); }

.carousel-control-prev-icon,
.carousel-control-next-icon { filter: none; width: 18px; height: 18px; }

/* ==============================
   SERVICES CAROUSEL
============================== */
.section-services { background: var(--dark); padding-bottom: 0.5rem; }

.service-card {
  background: var(--dark3);
  padding: 0;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  border-top: 3px solid transparent;
  overflow: hidden;
}

.service-card:hover {
  background: var(--dark2);
  border-top-color: var(--yellow);
  transform: translateY(-4px);
}

.service-img {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #2a2a2a;
  position: relative;
}

/* Placeholder cuadriculado cuando no hay imagen */
.service-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 1px,
    transparent 1px,
    transparent 16px
  );
}

.service-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  padding: 0.9rem 0.5rem;
}

.carousel-indicators [data-bs-target] {
  background-color: var(--text-muted);
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  margin: 0 4px;
}

.carousel-indicators {
  margin-bottom: 0;
}

.hero-slide--img {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: var(--dark2);
  position: relative;
}

/* El contenido de texto queda sobre la imagen */
.hero-slide--img .container {
  position: relative;
  z-index: 1;
}

.carousel-indicators .active { background-color: var(--yellow); }

/* ==============================
   TEXT SECTION
============================== */
.section-about {
  padding: 5rem 0;
  background: var(--white);
  text-align: center;
}

.section-about p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
  max-width: 640px;
  margin: 0 auto;
}

.divider {
  width: 60px; height: 3px;
  background: var(--yellow);
  margin: 1.5rem auto 0;
}

/* ==============================
   PROYECTOS
============================== */
.section-proyectos { padding: 4rem 0; background: var(--gray-light); }

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 2rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--dark3);
  cursor: pointer;
}

.project-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.project-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1e1e1e;
  transition: transform 0.5s ease;
}

/* Placeholder cuadriculado cuando no hay imagen */
.project-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 1px,
    transparent 1px,
    transparent 16px
  );
}

.project-overlay {
  z-index: 1;
}

.project-card:hover .project-img { transform: scale(1.07); }
.project-card:hover img { transform: scale(1.07); }
.project-card:hover .project-overlay { opacity: 1; }

.ver-mas {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  text-align: right;
  margin-top: 1.5rem;
  transition: color 0.2s;
}

.ver-mas:hover { color: var(--yellow); }

/* ==============================
   MEDIA + TEXT SECTION
============================== */
.section-media {
  background: var(--yellow);
  padding: 0;
  min-height: 380px;
  display: flex;
}

.media-visual {
  background: var(--dark);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.media-visual video,
.media-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.media-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.media-play-icon i {
  font-size: 3.5rem;
  color: rgba(255,255,255,0.6);
}

.media-text {
  padding: 3rem 3rem 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.media-text h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--dark);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.media-text p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--dark);
  opacity: 0.85;
}

.media-text a {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  border-bottom: 2px solid var(--dark);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.media-text a:hover { opacity: 0.6; }

/* ==============================
   FOOTER
============================== */
footer {
  background: var(--dark);
  padding: 2.5rem 2rem;
  border-top: 2px solid var(--yellow);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  color: var(--white);
  text-decoration: none;
}

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

/* ---- Logo del footer: se reduce en tablet y celular ---- */
.footer-logo { display: inline-block; line-height: 0; max-width: 100%; }
.footer-logo .logo-img { width: 320px; }
@media (max-width: 991.98px) {
  .footer-logo .logo-img { width: 260px; }
}
@media (max-width: 575.98px) {
  footer { padding-left: 0; padding-right: 0; }
  .footer-logo .logo-img { width: 170px; }
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.footer-socials { display: flex; gap: 0.8rem; align-items: center; }

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.social-link:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--dark);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ==============================
   WHATSAPP BUTTON
============================== */
.btn-whatsapp {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform 0.25s, box-shadow 0.25s;
  animation: waPulse 2.5s infinite;
}

.btn-whatsapp:hover {
  color: var(--white);
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.65);
  animation: none;
}

@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
  50%       { box-shadow: 0 4px 30px rgba(37,211,102,0.75); }
}

/* ==============================
   UTILITIES
============================== */
.bg-dark-card { background: var(--dark3); }

@media (max-width: 767px) {
  .section-media { flex-direction: column; }
  .media-visual { min-height: 240px; }
  .media-text { padding: 2rem 1.5rem; }
  .footer-socials { margin-top: 1rem; }
}

/* Video de YouTube en la sección media (Inicio) */
.media-video {
  width: 100%;
  aspect-ratio: 16 / 9;
}
.media-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.media-video { position: relative; background: #000; }
.media-video__poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; cursor: pointer;
  background-size: cover; background-position: center; background-color: #000;
}
.media-video__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--yellow); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; padding-left: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  transition: transform 0.2s ease;
}
.media-video__poster:hover .media-video__play { transform: translate(-50%, -50%) scale(1.08); }

/* Tarjetas de proyecto como enlace */
a.project-card { color: inherit; text-decoration: none; }

/* WhatsApp en celular: más pequeño y siempre dentro de la pantalla (respeta el área segura del iPhone) */
@media (max-width: 767.98px) {
  .btn-whatsapp {
    width: 52px; height: 52px;
    font-size: 1.6rem;
    right: 16px;
    bottom: 16px;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
  footer { padding-bottom: 5.5rem; }   /* deja espacio para que el botón no tape los íconos */
}

/* Ajustes generales para celular */
@media (max-width: 575.98px) {
  /* Flechas del carrusel principal más discretas y sin tapar el texto */
  #carouselHero .carousel-control-prev,
  #carouselHero .carousel-control-next { width: 34px; height: 34px; top: auto; bottom: 16px; transform: none; }
  #carouselHero .carousel-control-prev { left: auto; right: 58px; }
  #carouselHero .carousel-control-next { right: 16px; }
  .hero-title, .hero-title2 { font-size: clamp(1.9rem, 9vw, 2.4rem); }
  /* Etiquetas de servicios: que quepan completas */
  .service-label { font-size: 0.72rem; letter-spacing: 0.02em; padding: 0.75rem 0.25rem; }
}
