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

:root {
  --primary: #667eea;
  --secondary: #f093fb;
  --accent: #06b6d4;
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
}

body {
  font-family: 'Arial', sans-serif;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
  color: white;
  position: relative;
}

/* Partículas flotantes de fondo */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(6, 182, 212, 0.2) 0%, transparent 50%);
  animation: float-particles 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes float-particles {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* Partículas decorativas */
.floating-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float-up 20s infinite ease-in-out;
}

.particle-1 {
  left: 10%;
  animation-delay: 0s;
}

.particle-2 {
  left: 30%;
  animation-delay: 2s;
}

.particle-3 {
  left: 50%;
  animation-delay: 4s;
}

.particle-4 {
  left: 70%;
  animation-delay: 1s;
}

.particle-5 {
  left: 85%;
  animation-delay: 3s;
}

.particle-6 {
  left: 95%;
  animation-delay: 5s;
}

@keyframes float-up {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

/* Contenedor principal - removido, ahora en index.css */

/* Espacios publicitarios - removidos, ahora en index.css */

/* Contenido principal - removido, ahora en index.css */


/* H1 oculto para SEO */
.seo-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Selector de idioma */
/* Header */
.header-section {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 30px;
}

/* Botón de emergencias */
.emergency-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(220, 38, 38, 0.9);
  backdrop-filter: blur(10px);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
}

.emergency-button:hover {
  background: rgba(220, 38, 38, 1);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
}

.main-title {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Sección de búsqueda */
.search-section {
  width: 100%;
  max-width: 700px;
  margin: 30px 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 100;
}

.search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  z-index: 200;
}

.city-input {
  width: 100%;
  padding: 15px 20px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #333;
  transition: all 0.3s ease;
}

.city-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.city-input::placeholder {
  color: #999;
}

.search-btn {
  padding: 15px 30px;
  font-size: 16px;
  font-weight: bold;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.search-btn:active {
  transform: translateY(0);
}

.location-btn {
  padding: 15px 20px;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.location-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.search-hint {
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
  margin-top: 10px;
}

/* Lista de sugerencias */
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 99999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.suggestions-list.hidden {
  display: none;
}

.suggestion-item {
  padding: 12px 20px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: rgba(102, 126, 234, 0.1);
}

.suggestion-item.no-results {
  cursor: default;
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #ffc107;
}

.suggestion-item.no-results:hover {
  background: rgba(255, 193, 7, 0.1);
}

.suggestion-item strong {
  color: #667eea;
}

.suggestion-item small {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* Resultado del clima */
.weather-result {
  width: 100%;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 25px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.5s ease;
  position: relative;
  z-index: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-icon-large {
  font-size: 100px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.weather-info {
  flex: 1;
}

.city-name {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.country-name {
  font-size: 1.2rem;
  opacity: 0.8;
  margin-bottom: 15px;
}

.temperature-display {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}

.temperature {
  font-size: 4rem;
  font-weight: bold;
  line-height: 1;
}

.degree {
  font-size: 2rem;
  margin-top: 5px;
  opacity: 0.8;
}

.weather-description {
  font-size: 1.3rem;
  text-transform: capitalize;
  opacity: 0.9;
}

/* Detalles meteorológicos */
.weather-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.detail-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.detail-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

.detail-icon {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
}

.detail-label {
  display: block;
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 5px;
}

.detail-value {
  display: block;
  font-size: 20px;
  font-weight: bold;
}

/* Pronóstico */
.forecast-section {
  margin-bottom: 20px;
}

.forecast-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.forecast-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.forecast-day {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.forecast-day:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.forecast-date {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
}

.forecast-icon {
  font-size: 50px;
  margin: 10px 0;
}

.forecast-temp {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
}

.forecast-desc {
  font-size: 14px;
  opacity: 0.9;
  text-transform: capitalize;
}

/* Atribución */
.weather-attribution {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  opacity: 0.8;
}

.weather-attribution p {
  margin-bottom: 5px;
}

.api-link {
  color: white;
  text-decoration: none;
  padding: 5px 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: inline-block;
  transition: all 0.3s ease;
}

.api-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Mensajes de error y carga */
.error-message,
.loading {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  margin: 20px 0;
}

.error-message {
  border-color: rgba(255, 100, 100, 0.5);
  background: rgba(255, 100, 100, 0.1);
}

.error-icon {
  font-size: 50px;
  display: block;
  margin-bottom: 15px;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

/* Sección de contenido informativo */
.content-section {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  padding: 60px 20px;
  margin-top: 40px;
}

.info-article {
  max-width: 900px;
  margin: 0 auto;
}

.info-article h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.info-block {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
}

.info-block h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #fff;
}

.info-block p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 15px;
  opacity: 0.9;
}

.info-block ul {
  list-style: disc;
  padding-left: 25px;
  margin-top: 10px;
}

.info-block ul li {
  margin-bottom: 8px;
  line-height: 1.6;
  opacity: 0.9;
}

.info-block ul li strong {
  color: rgba(255, 255, 255, 0.95);
  opacity: 1;
}

/* Footer */
.legal-footer {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  padding: 30px 20px;
  text-align: center;
  margin-top: auto;
}

.legal-footer nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.legal-footer nav a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.legal-footer nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

.copyright {
  font-size: 14px;
  opacity: 0.7;
}

/* Páginas legales */
.legal-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.legal-page .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  border-radius: 15px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.legal-page h1 {
  color: var(--primary);
  margin-bottom: 10px;
}

.legal-page h2 {
  color: var(--primary);
  margin-top: 30px;
  margin-bottom: 15px;
}

.legal-page h3 {
  color: #764ba2;
  margin-top: 20px;
  margin-bottom: 10px;
}

.legal-page p,
.legal-page li {
  line-height: 1.8;
  margin-bottom: 15px;
}

.legal-page ul {
  padding-left: 30px;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.legal-page table th,
.legal-page table td {
  padding: 12px;
  text-align: left;
  border: 1px solid #ddd;
}

.legal-page table th {
  background: var(--primary);
  color: white;
}

.legal-page .info-box {
  background: rgba(102, 126, 234, 0.1);
  border-left: 4px solid var(--primary);
  padding: 15px;
  margin: 20px 0;
  border-radius: 5px;
}

.legal-page .last-update {
  font-style: italic;
  opacity: 0.7;
  margin-bottom: 30px;
}

.legal-page .back-link {
  display: inline-block;
  margin-top: 30px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.legal-page .back-link:hover {
  background: #764ba2;
  transform: translateY(-2px);
}

.cookie-type {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.type-technical {
  background: #4caf50;
  color: white;
}

.type-advertising {
  background: #ff9800;
  color: white;
}

/* Pronóstico horario */
.hourly-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: none;
  /* Oculto inicialmente */
}

.hourly-section h3 {
  margin: 0 0 20px 0;
  font-size: 22px;
  color: white;
  font-weight: 600;
  text-align: center;
}

.hourly-wrapper {
  position: relative;
}

.hourly-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  font-size: 20px;
  font-weight: bold;
}

.hourly-nav-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.hourly-nav-btn.prev {
  left: -15px;
}

.hourly-nav-btn.next {
  right: -15px;
}

.hourly-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.hourly-nav-btn:disabled:hover {
  transform: translateY(-50%) scale(1);
}

.hourly-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0;
  scroll-behavior: smooth;
  position: relative;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

.hourly-container::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.hour-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 12px 8px;
  min-width: 90px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.hour-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.2);
}

.hour-card .hour-time {
  font-size: 12px;
  font-weight: 600;
  color: white;
  margin-bottom: 5px;
}

.hour-card .hour-icon {
  width: 40px;
  height: 40px;
  margin: 5px auto;
}

.hour-card .hour-temp {
  font-size: 16px;
  font-weight: bold;
  color: white;
  margin: 5px 0;
}

.hour-card .hour-condition {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 3px;
  line-height: 1.2;
}

/* Responsive */
@media (max-width: 1200px) {
  .ad-space {
    display: none;
  }

  .content-wrapper {
    justify-content: center;
  }

  .emergency-button {
    top: 10px;
    right: 10px;
    padding: 10px 18px;
    font-size: 13px;
  }

  .ad-mobile-top,
  .ad-mobile-bottom {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    margin: 20px 0;
  }

  .desktop-ad {
    display: none !important;
  }

  .mobile-ad {
    display: block !important;
  }
}

@media (max-width: 768px) {
  .main-title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .search-section {
    padding: 20px;
  }

  .search-container {
    flex-direction: column;
  }

  .weather-result {
    padding: 25px;
  }

  .weather-main {
    flex-direction: column;
    text-align: center;
  }

  .city-name {
    font-size: 2rem;
  }

  .temperature {
    font-size: 3rem;
  }

  .weather-details {
    grid-template-columns: repeat(2, 1fr);
  }

  .forecast-container {
    grid-template-columns: 1fr;
  }

  .language-selector {
    position: static;
    justify-content: center;
    margin-bottom: 20px;
  }

  .legal-footer nav ul {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 2rem;
  }

  .weather-icon-large {
    font-size: 70px;
  }

  .city-name {
    font-size: 1.5rem;
  }

  .temperature {
    font-size: 2.5rem;
  }

  .degree {
    font-size: 1.5rem;
  }
}

/* Anuncio móvil responsivo */
.mobile-ad-container {
  display: none;
  margin: 20px 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  min-height: 250px;
}

@media (max-width: 1024px) {
  .mobile-ad-container {
    display: block;
  }
}

/* ==========================================
   ESTILOS PARA FAQ
   ========================================== */
.faq-section {
  margin-top: 40px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 25px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.faq-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.faq-item h3 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.25rem;
  margin-bottom: 15px;
  line-height: 1.4;
  font-weight: 600;
}

.faq-item p {
  line-height: 1.7;
  margin-bottom: 12px;
  opacity: 0.9;
  font-size: 1rem;
}

.faq-item a {
  color: #fbbf24;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.faq-item a:hover {
  color: #fcd34d;
}

/* Estilos para secciones educativas y estacionales */
.educational-section,
.seasonal-tips,
.weather-phenomena {
  margin-top: 40px;
}

.educational-section h2,
.seasonal-tips h2,
.weather-phenomena h2 {
  font-size: 1.75rem;
  margin-bottom: 25px;
  text-align: center;
}