/* ===== Variables & Reset ===== */
:root {
  --color-1: #000;
  --color-2: #BE2129;
  --color-3: #3B3B3B;
  --white: #fff;
  --gray-light: #f5f5f5;
  --gray-medium: #e0e0e0;
  --font: 'Inter', sans-serif;
  --transition: 0.3s ease;
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  color: var(--color-3);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
}

.btn--primary {
  background: var(--color-2);
  color: var(--white);
}

.btn--primary:hover {
  background: #a01b22;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(190, 33, 41, 0.3);
}

.btn--full {
  width: 100%;
}

/* ===== Section Titles ===== */
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-1);
  text-align: center;
  margin-bottom: 12px;
}

.section__title--left {
  text-align: left;
}

.section__subtitle {
  text-align: center;
  color: var(--color-3);
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
  opacity: 0.8;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.header--scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.header__logo img {
  height: 48px;
  width: auto;
}

.header__menu {
  display: flex;
  gap: 8px;
}

.header__link {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.header__link:hover {
  color: var(--color-2);
}

.header__link--cta {
  background: var(--color-2);
  color: var(--white);
}

.header__link--cta:hover {
  background: #a01b22;
  color: var(--white);
}

.header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.header__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

.header__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.header__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-1);
  position: relative;
  overflow: hidden;
}

/* Background carousel */
.hero__carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero__slide--active {
  opacity: 1;
}

/* Dark overlay for text readability */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.82) 0%, rgba(26, 26, 26, 0.6) 50%, rgba(26, 26, 26, 0.75) 100%);
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding: 120px 0 80px;
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero__title br + br {
  display: none;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* ===== Trabajos / Galería ===== */
.trabajos {
  padding: 100px 0;
  background: var(--gray-light);
}

.trabajos__filtros {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filtro {
  padding: 10px 24px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid var(--gray-medium);
  background: var(--white);
  color: var(--color-3);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.filtro:hover {
  border-color: var(--color-2);
  color: var(--color-2);
}

.filtro--activo {
  background: var(--color-2);
  color: var(--white);
  border-color: var(--color-2);
}

.trabajos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.trabajo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: var(--transition);
}

.trabajo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.trabajo:hover img {
  transform: scale(1.05);
}

.trabajo__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: var(--transition);
}

.trabajo:hover .trabajo__overlay {
  opacity: 1;
}

.trabajo__overlay span {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.trabajo.oculto {
  display: none;
}

/* ===== Nosotros ===== */
.nosotros {
  padding: 100px 0;
}

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

.nosotros__contenido p {
  margin-bottom: 16px;
  font-size: 1.05rem;
  opacity: 0.85;
  line-height: 1.8;
}

.nosotros__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.stat {
  text-align: center;
  padding: 24px 12px;
  background: var(--gray-light);
  border-radius: var(--radius);
}

.stat__numero {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-2);
  line-height: 1;
}

.stat__signo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-2);
}

.stat__label {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--color-3);
  opacity: 0.7;
}

.nosotros__imagen {
  position: relative;
  height: 400px;
  border-radius: var(--radius);
  background: var(--color-1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nosotros__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== Contacto ===== */
.contacto {
  padding: 100px 0;
  background: var(--gray-light);
}

.contacto__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.contacto__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.form__group--full {
  grid-column: 1 / -1;
}

.contacto__form input,
.contacto__form select,
.contacto__form textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 0.95rem;
  border: 2px solid var(--gray-medium);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--color-1);
  transition: var(--transition);
  outline: none;
}

.contacto__form input:focus,
.contacto__form select:focus,
.contacto__form textarea:focus {
  border-color: var(--color-2);
}

.contacto__form textarea {
  resize: vertical;
  min-height: 120px;
}

.contacto__form .btn {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.contacto__info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 20px;
}

.contacto__info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contacto__info-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--color-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contacto__info-icon svg {
  width: 20px;
  height: 20px;
  color: var(--white);
}

.contacto__info-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--color-1);
  margin-bottom: 2px;
}

.contacto__info-item p {
  font-size: 0.9rem;
  opacity: 0.75;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-1);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 64px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo {
  height: 40px;
  width: auto;
  margin-bottom: 16px;
}

.footer__brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer__links h4,
.footer__contact h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer__links li {
  margin-bottom: 10px;
}

.footer__links a {
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer__links a:hover {
  color: var(--color-2);
}

.footer__contact p {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer__bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.5;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox.activo {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 2rem;
  padding: 12px;
  transition: var(--transition);
  z-index: 2001;
}

.lightbox__close {
  top: 20px;
  right: 24px;
  font-size: 2.5rem;
}

.lightbox__prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  color: var(--color-2);
}

/* ===== WhatsApp Float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

/* ===== Footer Social ===== */
.footer__social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  transition: var(--transition);
}

.footer__social a:hover {
  background: var(--color-2);
  color: var(--white);
}

.footer__social svg {
  width: 18px;
  height: 18px;
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gallery items should always be visible */
.trabajo.fade-in {
  opacity: 1;
  transform: none;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .nosotros__inner {
    grid-template-columns: 1fr;
  }

  .nosotros__imagen {
    height: 280px;
  }

  .contacto__inner {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .header__hamburger {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-1);
    padding: 100px 32px 32px;
    transition: right 0.4s ease;
    z-index: 999;
  }

  .header__nav.open {
    right: 0;
  }

  .header__menu {
    flex-direction: column;
    gap: 4px;
  }

  .header__link {
    display: block;
    padding: 14px 16px;
    font-size: 1rem;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .nosotros__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .contacto__form {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .trabajos__grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .trabajos,
  .nosotros,
  .contacto {
    padding: 64px 0;
  }

  .nosotros__stats {
    grid-template-columns: 1fr;
  }
}
