/* ====== RESET Y BASE ====== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #f2f2f2;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* ====== HEADER ====== */
.header {
  width: 100%;
  background-color: #ffffff;
  text-align: center;
  padding: 40px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.logo {
  max-width: 300px;
  height: auto;
  display: inline-block;
}

/* ====== CONTENIDO PRINCIPAL ====== */
.content {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 80%;
  max-width: 1900px;
  margin-top: 50px;
  gap: 20px;
  min-height: 700px; /* altura base en desktop */
}

/* ====== COLUMNA IZQUIERDA ====== */
.left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch; /* clave: igual altura que .right */
}

.img-cuadrada {
  width: 100%;
  height: 100%; /* en lugar de aspect-ratio */
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.img-cuadrada:hover {
  transform: scale(1.02);
}

/* ====== COLUMNA DERECHA ====== */
.right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.right a {
  display: block;
  flex: 1;
  border: 5px solid #0066cc;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.right a:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  border-color: #3399ff;
}

.right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-rect {
  width: 100%;
  height: calc((100% - 40px) / 3); /* divide el alto total en 3 partes */
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

/* Efecto simple al pasar el mouse */
.img-rect:hover,
.img-cuadrada:hover {
  transform: scale(1.02);
}

/* ====== FOOTER ====== */
.footer {
  width: 100%;
  background-color: #ffffff;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  font-size: 0.95rem;
  color: #555;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.footer a {
  color: #0056b3;
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

/* ====== AJUSTES PROGRESIVOS ====== */


/* --- 1500px: balancea proporciones --- */
@media (max-width: 1500px) {
  .content {
    width: 90%;
    gap: 16px;
  }

  .left {
    flex: 1.1; /* le damos un poco más de espacio */
  }

  .right {
    flex: 0.9;
  }

  .right a {
    border-width: 4px;
  }
}

/* --- 1200px: reducimos más la derecha --- */
@media (max-width: 1200px) {
  .content {
    width: 92%;
  }

  .left {
    flex: 1.2;
  }

  .right {
    flex: 0.8;
  }

  .right a {
    border-width: 3px;
  }

  .right img {
    object-position: center center;
  }
}

/* --- 900px: más compacta, mantiene proporción visible --- */
@media (max-width: 900px) {
  .content {
    gap: 14px;
  }

  .left {
    flex: 1.3;
  }

  .right {
    flex: 0.7;
  }

  .right a {
    border-width: 2px;
  }
}

/* --- 768px y menor: pasa a modo columna --- */
@media (max-width: 768px) {
  .content {
    flex-direction: column;
    align-items: center;
    width: 95%;
  }

  .left, .right {
    width: 100%;
  }

  .right {
    flex-direction: column;
    gap: 15px;
  }

  .img-cuadrada {
    height: auto;
    aspect-ratio: 1/1;
  }

  .right a {
    height: auto;
  }

  .right img {
    height: auto;
  }
}

/* ====== RESPONSIVE DESIGN ====== */

/* --- Tablet horizontal (entre 1024px y 1200px) --- */
@media (max-width: 1200px) {
  .content {
    width: 90%;
    gap: 15px;
    min-height: 600px;
  }

  .right a {
    border-width: 4px; /* mantiene buena visibilidad en menor escala */
  }
}

/* --- Tablet vertical (menor a 768px) --- */
@media (max-width: 890px) {
  .content {
    flex-direction: column;
    align-items: center;
    width: 95%;
    gap: 30px;
    min-height: auto;
  }

  .left,
  .right {
    width: 100%;
  }

  .img-cuadrada {
    aspect-ratio: auto;
    width: 100%;
    height: auto;
  }

  .right {
    flex-direction: column;
    justify-content: center;
  }

  .right a {
    width: 100%;
    height: auto;
  }

  .right img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .right a:last-child {
    margin-bottom: 30px; /* espacio de respiro final */
  }
}
/* --- Ajuste especial para 1530px (notebooks 15.6") --- */
@media (max-width: 1540px) and (min-width: 1480px) {
  .left {
    flex: 1.15; /* le damos más ancho a la publicidad */
  }

  .right {
    flex: 0.85;
  }

  .img-cuadrada {
    object-fit: contain; /* evita que se recorte contenido */
    background-color: #fff;
  }
}

/* --- Ajuste especial para 1366px (resolución muy común en notebooks) --- */
@media (max-width: 1380px) and (min-width: 1300px) {
  .left {
    flex: 1.25; /* todavía más espacio a la izquierda */
  }

  .right {
    flex: 0.75;
  }

  .img-cuadrada {
    object-fit: contain; /* muestra la imagen completa */
    background-color: #fff;
  }
}

/* --- Ajuste especial: evitar recorte de la imagen cuadrada entre 1000px y 1200px --- */
@media (max-width: 1250px) and (min-width: 1000px) {
  .left {
    flex: 1.2; /* agranda un poco la columna izquierda */
  }

  .right {
    flex: 0.8; /* achica un poco la derecha */
  }

  .img-cuadrada {
    object-fit: contain; /* evita que se recorte */
    background-color: #fff; /* relleno limpio si sobran márgenes */
  }
}
