/* ==== PALETA CELeste MEDITERRÁNEA ==== */
:root {
  --azul-oscuro: #004c91;
  --azul-primario: #009fe3;
  --azul-suave: #b3e5fc;
  --celeste: #e1f5fe;
  --celeste-claro: #f0fbff;
  --blanco: #ffffff;
  --texto: #083c5a;
  --texto-secundario: #1b4e73;
  --sombra: rgba(0, 100, 180, 0.1);
}

/* ==== RESETEO ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--celeste-claro);
  color: var(--texto);
  line-height: 1.6;
}

/* ==== CABECERA ==== */
.site-header {
  background: linear-gradient(90deg, var(--azul-primario), var(--azul-oscuro));
  color: var(--blanco);
  box-shadow: 0 2px 10px var(--sombra);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.logo img {
  height: 75px;
  transition: transform 0.3s ease;
}

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

.actions a {
  margin-left: 1.2rem;
  text-decoration: none;
  color: var(--blanco);
  font-weight: 500;
  transition: color 0.3s ease;
}

.actions a:hover {
  color: var(--azul-suave);
}

.actions .btn {
  background: var(--blanco);
  color: var(--azul-primario);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease, color 0.3s ease;
}

.actions .btn:hover {
  background: var(--azul-suave);
  color: var(--azul-oscuro);
}

/* ==== HERO ==== */
.hero {
  background: linear-gradient(135deg, var(--azul-suave), var(--celeste));
  text-align: center;
  padding: 6rem 1.5rem;
}

.hero h2 {
  font-size: 2.4rem;
  color: var(--azul-oscuro);
  margin-bottom: 1rem;
}

.hero h2 span {
  color: var(--azul-primario);
}

.hero p {
  max-width: 700px;
  margin: 0 auto 2rem auto;
  color: var(--texto-secundario);
}

.hero .btn {
  display: inline-block;
  background: var(--azul-primario);
  color: var(--blanco);
  padding: 0.9rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
}

.hero .btn:hover {
  background: var(--azul-oscuro);
  transform: translateY(-3px);
}

/* ==== SECCIONES ==== */
section {
  padding: 5rem 1.5rem;
  text-align: center;
}

section h2 {
  font-size: 2rem;
  color: var(--azul-oscuro);
  margin-bottom: 2.5rem;
}

/* ==== TARJETAS ==== */
.card {
  background: var(--blanco);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--sombra);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid var(--azul-suave);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 25px rgba(0, 100, 200, 0.2);
}

/* ==== SERVICIOS ==== */
.servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.servicio .icon {
  font-size: 2.2rem;
  color: var(--azul-primario);
  margin-bottom: 1rem;
}

/* ==== POR QUÉ ELEGIRNOS ==== */
.porque-elegirnos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.item .icon {
  font-size: 2rem;
  color: var(--azul-primario);
  margin-bottom: 1rem;
}

/* ==== BLOG ==== */
#blog {
  background: linear-gradient(180deg, var(--celeste-claro), var(--celeste));
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.btn-link {
  color: var(--azul-primario);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.btn-link:hover {
  color: var(--azul-oscuro);
  text-decoration: underline;
}

/* ==== CONTACTO ==== */
.contacto {
  background: linear-gradient(180deg, var(--celeste), var(--azul-suave));
}

.contacto form {
  background: var(--blanco);
  max-width: 600px;
  margin: 2rem auto 0 auto;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--sombra);
  border: 2px solid var(--azul-suave);
  text-align: left;
}

.contacto label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--texto);
}

.contacto input,
.contacto textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.2rem;
  border: 2px solid var(--azul-suave);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
  background: var(--celeste-claro);
}

.contacto input:focus,
.contacto textarea:focus {
  outline: none;
  border-color: var(--azul-primario);
  box-shadow: 0 0 8px rgba(0, 160, 255, 0.4);
}

.contacto button {
  background: var(--azul-primario);
  color: var(--blanco);
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
}

.contacto button:hover {
  background: var(--azul-oscuro);
  transform: translateY(-2px);
}

/* ==== FOOTER ==== */
footer {
  background: var(--azul-oscuro);
  color: var(--blanco);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .site-header .wrap {
    flex-direction: column;
    text-align: center;
  }

  .actions {
    margin-top: 1rem;
  }

  .logo img {
    height: 65px;
  }
}
/* ===== BLOG INDIVIDUAL ===== */
.post-hero img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 5px 15px rgba(0, 140, 186, 0.2);
  display: block;
}

.blog-post {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.blog-post .card {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 20px rgba(0, 140, 186, 0.1);
}

.blog-post .card h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #0a5c89;
}

.blog-post .card .meta {
  color: #5a7b91;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.blog-post ul {
  margin: 1rem 0 1.5rem 1.5rem;
}

.post-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.btn-link.back {
  background-color: #a4e4ff;
  color: #0a4d70;
}

.btn-link.back:hover {
  background-color: #87d6f8;
}
/* === SECCIÓN CONTACTO === */
.contact-section {
  background: #f2f9ff;
  padding: 5rem 1rem;
}

.contact-section h1 {
  color: #0077b6;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.contact-section .intro {
  color: #333;
  text-align: center;
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* === DISTRIBUCIÓN PRINCIPAL === */
.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* === TARJETAS === */
.card {
  background: #fff;
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid #cfe8ff;
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.1);
  flex: 1 1 500px;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
}

/* === FORMULARIO === */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  color: #0077b6;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  padding: 0.9rem 1rem;
  border: 1px solid #b7dcff;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #00a6e0;
  box-shadow: 0 0 6px rgba(0, 166, 224, 0.25);
}

/* === BOTÓN === */
.btn-primary {
  background: #00a6e0;
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  width: 100%;
}

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

/* === INFO CONTACTO === */
.contact-info {
  background: #e8f6ff;
  border: 1px solid #b9e0ff;
  flex: 1 1 300px;
  padding: 2rem;
  border-radius: 12px;
  text-align: left;
}

.contact-info h2 {
  color: #0077b6;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.contact-info a {
  color: #0077b6;
  font-weight: 600;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }
  .card {
    flex: 1 1 100%;
  }
}
/* ===== TRANSICIÓN DE IMAGEN A PANTALLA COMPLETA ===== */
.image-transition {
  width: 100vw; /* ocupa todo el ancho real de la pantalla */
  height: 80vh; /* alto visible, ajustable */
  background-image: url('images/equipo-desatoros.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover; /* se ve la imagen completa */
  background-color: #f8f9fa; /* color del fondo de tu web */
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInFull 2.5s ease-out forwards;
}

/* Animación de entrada */
@keyframes fadeInFull {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Ajuste para móviles */
@media (max-width: 768px) {
  .image-transition {
    height: 60vh;
    background-size: cover;
  }
}
/* ===== TRANSICIÓN DE IMAGEN A PANTALLA COMPLETA ===== */
.image-transition {
  width: 100%;                /* ocupa el ancho total del viewport */
  height: 80vh;               /* alto visible ajustable */
  margin: 0;
  padding: 0;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;        /* truco para eliminar límites del contenedor */
  background-image: url('images/equipo-desatoros.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;   /* se muestra completa */
  background-color: #ffffff;  /* mismo fondo que la web */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: fadeInFull 6.5s ease-out forwards;
}

/* Animación suave de entrada */
@keyframes fadeInFull {
  0% {
    opacity: 0;
    transform: scale(0.25);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* En móviles, ajustamos altura y visibilidad */
@media (max-width: 768px) {
  .image-transition {
    height: 60vh;
    background-size: cover;
  }
}
/* ===== CABECERA ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 10px 20px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header .logo img {
  max-width: 180px;
  height: auto;
}

/* Menú principal */
.site-header .actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-header .actions a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.site-header .actions a:hover {
  color: #0077cc;
}

/* Botón de llamada */
.site-header .actions .btn {
  background-color: #0077cc;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.95rem;
  transition: background 0.3s ease;
}

.site-header .actions .btn:hover {
  background-color: #005fa3;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-header .actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
  }

  .site-header .actions a {
    font-size: 1rem;
  }

  .site-header .actions .btn {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 1rem;
  }
}









/* === RESET / seguridad de caja === */
* { box-sizing: border-box; }

/* === FORZAR SIN DESBORDAMIENTO GLOBAL === */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

/* === HEADER: base estable === */
.site-header {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: relative;
  z-index: 1000;
}

/* .wrap actúa como grid central con límite de ancho */
.site-header .wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

/* Logo: siempre visible y no se estira */
.site-header .logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
}

.site-header .logo img {
  display: block;
  height: auto;
  max-height: 72px;
  max-width: 220px;
  width: auto;
}

/* Nav: ocupa el espacio restante, pero no provoca overflow */
.site-header .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0; /* clave para evitar overflow en flex */
}

/* enlaces: no forzaremos ancho */
.site-header .actions a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 8px;
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botón teléfono: límite de ancho y no estira el nav */
.site-header .actions .btn {
  background-color: #0077cc;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.95rem;
  flex: 0 0 auto;
  max-width: 340px; /* no deja que llegue al borde */
  box-shadow: none;
  border: none;
}

/* evita que el botón fuerce el ancho del nav */
.site-header .actions .btn,
.site-header .actions a {
  box-sizing: border-box;
}

/* === COMPORTAMIENTO EN MÓVIL: CENTRADO PERFECTO === */
@media (max-width: 768px) {

  /* .wrap se centra y se apila */
  .site-header .wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 12px;
    gap: 10px;
  }

  /* logo centrado arriba */
  .site-header .logo {
    justify-content: center;
    width: 100%;
  }
  .site-header .logo img {
    max-height: 64px;
    margin: 0 auto;
  }

  /* nav en columna centrada, pero con un ancho interior limitado para evitar tocar bordes */
  .site-header .actions {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    padding: 0;
    margin: 0;
  }

  /* Los enlaces ocupan máximo un 92% del ancho con centrado */
  .site-header .actions a {
    width: 92%;
    max-width: 480px;
    text-align: center;
    white-space: normal;
    padding: 10px 12px;
    border-radius: 8px;
  }

  /* Botón teléfono: 92% ancho y centrado, no llega al borde */
  .site-header .actions .btn {
    width: 92%;
    max-width: 480px;
    text-align: center;
    padding: 12px;
    font-size: 1rem;
  }

  /* Forzar que no aparezcan barras extras por padding no simétrico en iOS */
  body, html { -webkit-text-size-adjust: 100%; -webkit-overflow-scrolling: touch; }
}




/* === CENTRAR LOGO EN MÓVIL DEFINITIVAMENTE === */
@media (max-width: 768px) {
  .site-header .logo {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .site-header .logo img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 220px;
    height: auto;
  }
}


/* === CENTRAR Y AJUSTAR LOGO EN MÓVIL === */
@media (max-width: 768px) {
  .site-header .logo {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .site-header .logo img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 380px; /* 🔹 aumenta el tamaño del logo */
    height: auto;
  }
}



/* === LOGO CENTRADO Y MÁS GRANDE EN MÓVIL === */
@media (max-width: 768px) {
  .site-header .logo {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .site-header .logo img {
    display: block !important;
    margin: 0 auto !important;
    width: 500px !important; /* 🔹 Fuerza el tamaño del logo */
    max-width: none !important;
    height: auto !important;
  }
}

/* === CABECERA AJUSTADA Y LOGO CENTRADO CON PROPORCIÓN CORRECTA === */
@media (max-width: 768px) {

  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden !important;
  }

  .site-header .wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 0;
    text-align: center;
    gap: 12px;
  }

  .site-header .logo {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .site-header .logo img {
    display: block !important;
    margin: 0 auto !important;
    height: 95px !important;   /* 🔹 Aumenta altura del logo */
    width: auto !important;    /* 🔹 Mantiene proporción original */
    max-width: 100% !important;
  }

  .site-header .actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    padding: 0;
    margin: 0;
  }

  .site-header .actions a {
    text-align: center;
    width: 90%;
    max-width: 480px;
    padding: 10px 12px;
    border-radius: 6px;
  }

  .site-header .actions .btn {
    width: 90%;
    max-width: 480px;
    text-align: center;
    padding: 12px;
    font-size: 1rem;
  }
}
