/* responsive.css - Estilos responsive para todas las páginas del observatorio */

/* ===== ESTILOS GENERALES RESPONSIVE ===== */
.responsive-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.coordinates {
  font-size: medium;
  padding: 0px;
  text-align: center;
  color: #cccccc;
}

/* ===== ESTILOS PARA INDEX.HTML (IMÁGENES) ===== */
.image-container {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.image-container img {
  width: 100%;
  height: auto;
  max-width: 100%;
  transition: transform 0.3s ease;
  display: block;
}

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

.image-title {
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
  color: #eeeeee;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.image-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2%;
  padding: 20px 0;
}

.image-col {
  margin-bottom: 30px;
}

/* ===== ESTILOS PARA FORECAST.HTML (WIDGETS) ===== */
.windguru-container {
  width: 100%;
  min-height: 400px;
  margin: 20px 0;
}

.forecast-widgets {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 15px;
}

.responsive-title {
  font-weight: bold;
  padding: 20px 0 10px 0;
  margin-bottom: 0px;
  text-align: center;
  color: #eeeeee;
}

/* ===== MEDIA QUERIES PARA INDEX.HTML ===== */

/* Móviles - Index */
@media (max-width: 767px) {
  .image-col {
    width: 100%;
    flex: 0 0 100%;
  }

  .image-title {
    font-size: 1.25rem;
  }
}

/* Tablets - Index */
@media (min-width: 768px) and (max-width: 1199px) {
  .image-col {
    flex: 0 0 48%;
    max-width: 48%;
  }

  .image-title {
    font-size: 1.75rem;
  }
}

/* Escritorio - Index */
@media (min-width: 1200px) {
  .image-col {
    flex: 0 0 45%;
    max-width: 45%;
  }

  .image-title {
    font-size: 2rem;
  }
}

/* ===== MEDIA QUERIES PARA FORECAST.HTML ===== */

/* Móviles - Forecast */
@media (max-width: 767px) {
  .responsive-title {
    font-size: 1.5rem;
    padding-top: 20px;
    padding-bottom: 5px;
  }

  .coordinates {
    font-size: 0.8rem;
    margin-top: 10px;
  }

  .windguru-container {
    min-height: 300px;
    margin: 10px 0;
  }
}

/* Tablets - Forecast */
@media (min-width: 768px) and (max-width: 1199px) {
  .responsive-title {
    font-size: 2rem;
    padding-top: 25px;
    padding-bottom: 0px;
  }

  .coordinates {
    font-size: 0.9rem;
  }

  .windguru-container {
    min-height: 450px;
  }
}

/* Escritorio - Forecast */
@media (min-width: 1200px) {
  .responsive-title {
    font-size: 2.5rem;
    padding-top: 30px;
    padding-bottom: 0px;
  }

  .windguru-container {
    min-height: 500px;
    margin: 30px 0;
  }
}

/* ===== ESTILOS COMPARTIDOS Y MEJORAS GENERALES ===== */

/* Navegación responsive mejorada */
.navbar-collapse {
  transition: all 0.3s ease;
}

/* Mejorar navegación en móviles */
@media (max-width: 767px) {
  .navbar-nav {
    text-align: center;
  }

  .dropdown-menu {
    text-align: center;
    background-color: #0e334b;
  }

  .navbar-collapse {
    max-height: 70vh;
    overflow-y: auto;
  }

  .dropdown-menu {
    position: static !important;
    float: none;
    border: none;
  }

  .coordinates {
    margin-top: 10px;
  }

  .dropdown-item {
    color: #6ecaff;
  }
}

/* Scroll horizontal suave */
html {
  scroll-behavior: smooth;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.image-container a:focus {
  outline: 2px solid #008FFB;
  outline-offset: 2px;
}

/* Soporte para modo oscuro del sistema */
@media (prefers-color-scheme: dark) {
  .image-container {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  }

  .windguru-container {
    background: transparent;
  }
}

/* Estilos de impresión */
@media print {
  .navbar {
    display: none;
  }

  .image-container {
    box-shadow: none;
    break-inside: avoid;
  }

  .image-title,
  .responsive-title {
    color: #000000;
    font-size: 1.5rem;
  }

  .windguru-container {
    min-height: auto;
    page-break-inside: avoid;
  }
}

/* Utilidades responsive generales */
.text-responsive {
  font-size: 1rem;
}

@media (min-width: 768px) {
  .text-responsive {
    font-size: 1.1rem;
  }
}

@media (min-width: 1200px) {
  .text-responsive {
    font-size: 1.2rem;
  }
}

/* Contenedor flex responsive */
.flex-responsive {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

@media (min-width: 768px) {
  .flex-responsive {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Grid responsive genérico */
.grid-responsive {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .grid-responsive {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Asegurar que los scripts/widgets externos se adapten */
script[src*="windguru"] {
  display: block;
  width: 100%;
}

/* Asegurar que los iframes/widgets sean responsive */
.windguru-container iframe,
.windguru-container script {
  max-width: 100%;
  width: 100% !important;
}