/* ================================
   RESET & BASE
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: #f5f7fa;
  color: #111;
  line-height: 1.6;
}

/* ================================
   UTILITIES
================================ */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 0;
}
.section { padding: 80px 0; }
.section-title {
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 2rem;
}
.grid-2 {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; } }
.bg-light { background-color: #fff; }
.bg-dark  { background-color: #0f172a; color: #fff; }
.highlight { color: #1e40af; }
.btn-primary {
  background-color: #1e40af;
  color: #fff;
  padding: .9rem 2rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s;
}
.btn-primary:hover { background-color: #1e3a8a; }

/* ================================
   HEADER
================================ */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  z-index: 1000;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}
.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
}
.logo img { height: 42px; margin-right: 10px; }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  position: absolute;
  top: 70px;
  right: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  overflow: hidden;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 1rem 2rem; border-bottom: 1px solid #f3f4f6; }
@media (max-width: 768px) { .nav-links { display: none; } .hamburger { display: block; } }

/* ================================
   HERO 
================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 1rem;
  background: linear-gradient(rgba(0,0,0,.50), rgba(0,0,0,.50)),
            url('IMG/Como-prevenir-accidentes-en-oper.png') center/cover no-repeat;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Logo centrado → más pequeño y sin fondo */
.hero-content .logo-central {
  width: clamp(180px, 35vw, 350px);
  height: auto;
  filter:
    drop-shadow(0 4px 10px rgba(0, 0, 0, .45))
    brightness(1.25)          /* +25 % brillo */
    contrast(1.15);           /* +15 % contraste */
  animation: fadeIn 1s ease;
  background: none !important;
  border: none !important;
  mix-blend-mode: normal;
  image-rendering: crisp-edges;
}

/* Título */
.hero-content h1 {
  font-size: clamp(2rem, 5vw + 1rem, 4rem);
  margin: 0;
  letter-spacing: -.02em;
}

/* Párrafo */
.hero-content p {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  margin: 0;
}

/* Botón */
.hero-content .btn-primary {
  font-size: 1.1rem;
  padding: .9rem 2.2rem;
}

/* Animación suave */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ================================
   Nosotros
================================ */
#nosotros h2 {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}
#nosotros h2 .highlight {
  font-size: 3.2rem;
  color: #1e40af;
}

/* Ajuste imagen de Nosotros → siempre proporcional */
#nosotros .image img {
  width: 100%;
  height: 100%;               /* ocupa todo el alto disponible */
  max-height: 420px;          /* límite para que no crezca demasiado */
  object-fit: cover;          /* cubre sin deformar */
  object-position: center;    /* enfoca el centro de la foto */
  border-radius: 12px;
}

@media (max-width: 768px) {
  #nosotros .image img {
    max-height: 280px;        /* más pequeña en móvil */
  }
}

/* ================================
   Servicios
================================ */
.servicios-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 768px) {
  .servicios-2col { grid-template-columns: 1fr; }
}
.servicio-card:hover {
  transform: scale(1.05);
}
.servicio-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transition: transform .3s ease;
  cursor: pointer;
  max-height: 220px;
  transition: max-height .6s ease, padding .6s ease;
}
.servicio-card.expanded {
  max-height: 2000px;
}
.img-overlay {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
}
.img-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.overlay-text {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
  gap: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.3;
}
.overlay-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.overlay-text ul {
  list-style: disc inside;
  padding-left: 0;
}
.extra-text {
  max-height: 0;
  opacity: 0;
  transition: max-height .5s ease, opacity .5s ease;
  overflow: hidden;
  padding: 0 1rem;
  margin-top: 0;
}
.servicio-card.expanded .extra-text {
  max-height: 1000px;
  opacity: 1;
  padding: 1rem;
}
.detail-mobile {
  display: none;
  padding: 1.2rem;
  background: #fff;
}
@media (max-width: 768px) {
  .detail-mobile {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 1.2rem;
  }
}
@media (min-width: 769px) {
  .detail-mobile { display: none; }
}

/* ================================
   Features
================================ */
.features {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 768px) {
  .features {
    flex-direction: row;
  }
}
.feature {
  flex: 1;
  text-align: center;
  padding: 1.5rem;
}
.feature .icon {
  font-size: 3rem;
  color: #1e40af;
  margin-bottom: 1rem;
}
.feature h3 {
  margin-bottom: 0.5rem;
}

/* ================================
   Cards
================================ */
.card {
  background: rgba(255,255,255,.1);
  padding: 2rem;
  border-radius: 8px;
}

/* ================================
   Contacto
================================ */
.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  text-align: center;
}
@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
}
.btn-whatsapp {
  background-color: #25d366;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none !important;
}
.linkedin {
  font-size: 2rem;
  color: #0a66c2;
  margin-left: 1rem;
  text-decoration: none !important;
}

/* ================================
   Footer
================================ */
footer {
  text-align: center;
  padding: 2rem 0;
  background: #5e5e5e;
  color: #fff;
}
.footer-logo {
  height: 50px;
  margin-bottom: 1rem;
  background: transparent !important;
  border: none;
  mix-blend-mode: multiply;
  filter: brightness(1);
}

/* ================================
   WhatsApp flotante
================================ */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  text-decoration: none !important;
  transition: transform 0.2s;
}
.whatsapp-float:hover {
  transform: scale(1.1);
}
.whatsapp-float:active,
.btn-whatsapp:active,
.linkedin:active {
  transform: scale(.85);
  animation: bounce-btn .45s ease-out forwards;
}
@keyframes bounce-btn {
  0%   { transform: scale(.85); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ================================
   Ajustes varios
================================ */
#ofrecemos h2 {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 2rem;
}
.color-acento { color: #1e40af; }

.ofrecemos-grupo {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .ofrecemos-grupo { grid-template-columns: repeat(3, 1fr); }
}
.ofrece {
  text-align: center;
  padding: 1.5rem;
}
.ofrece img {
  width: 100%;
  max-width: 220px;
  margin-bottom: 1rem;
}
.ofrece h3 {
  margin-bottom: .75rem;
  font-size: 1.25rem;
}

/* ================================
   Navbar links
================================ */
.nav-links a,
.mobile-menu a {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none !important;
  color: #1e40af;
  transition: color .25s ease;
}
.nav-links a:hover,
.mobile-menu a:hover {
  color: #1e40af;
}
.nav-links a:active,
.mobile-menu a:active {
  color: #000;
}
.nav-links .btn-primary,
.mobile-menu .btn-primary {
  color: #fff !important;
  transition: color .25s ease;
}
.nav-links .btn-primary:hover,
.mobile-menu .btn-primary:hover {
  color: #fff !important;
}
.nav-links .btn-primary:active,
.mobile-menu .btn-primary:active {
  color: #000 !important;
}

/* ================================
   Servicio-card overlay alineación
================================ */
.servicio-card:not(.expanded) .img-overlay {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}