/* Estilos generales */
:root {
    --primary-color: #3f6bad;
    --primary-hover: #4474bb;
    --secondary-color: #f0f7ff;
    --accent-color: #48bb78;
    --alert-color: #e53e3e;
    --text-color: #2d3748;
    --text-light: #718096;
    --text-lighter: #a0aec0;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --card-shadow: 0 2px 4px rgba(0,0,0,0.04);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    padding: 24px 0;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 48px);
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}


/* Header */
header {
    background-color: var(--bg-white);
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
}

.ad-space {
    width: 468px;
    height: 60px;
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    color: var(--text-lighter);
    font-weight: 500;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
}

/* Navegación */
.main-nav {
    position: relative;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(to right, #f9fafb, #f3f4f6);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-menu {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    padding: 0 1rem;
}

.nav-item {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--text-color);
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-item:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
    display: none;
}

.nav-item:hover {
    color: white; 
    background-color: var(--primary-color); 
}

.nav-item:hover:after {
    width: 60%;
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item.active:after {
    width: 80%;
}

.nav-item.active:hover {
    color: #fff;
}

/* Main content */
main {
    flex: 1;
}

.main-container {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.no-data {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.page-title {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.page-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.page-title h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.parameter-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.parameter-unit {
    font-size: 0.85em;
    color: #7f8c8d;
}

.parameter-value {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2c3e50;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 300;
}

.section {
    margin-bottom: 50px;
}

.section-h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 300;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 15px;
}

.status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 15px;
}

.status-level {
    font-weight: 600;
    font-size: 1.1em;
}

.status-risk {
    font-size: 0.95em;
    color: #5a6c7d;
}

.value-display {
    text-align: right;
}

.weather-section {
    margin-bottom: 3rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.wind-content, .moon-content, .pron-today-content, .f12h-content {
    display: flex;
    padding: 16px;
}

.wind-info, .moon-info, .f12h-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wind-direction, .moon-phase, .f12h-1part {
    display: flex;
    align-items: flex-start; /* alinea el contenido al tope */
    gap: 0.5rem;
}

.wind-arrow {
    color: var(--primary-color);
}

/* Clases para las diferentes direcciones del viento */
.wind-needle {
    /* El círculo seguirá tomando el color de --primary-color */
    color: var(--primary-color);
    /* Rotar alrededor del centro del SVG */
    transform-origin: 50% 50%;
    transition: transform 0.3s ease;
}

.wind-details, .moon-details, .f12h-details-head {
    font-weight: 500;
    margin-left: 10px;
}

.wind-variable {
    animation: rotate-variable 3s linear infinite;
}

@keyframes rotate-variable {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


.light-bold-text {
    font-weight: 500;
    color: var(--text-light);
    display: block;
    margin-top: 0.25rem;
}

.wind-gusts {
    color: var(--text-light);
    margin-left: 43px;
}

/* Estilos para la sección de calidad del aire y polen */
.weather-quality-container {
    display: flex;
    padding: 16px;
    flex-wrap: wrap;
}

.air-quality-container {
    width: 50%;
    padding-right: 10px;
    border-right: 1px solid #e0e0e0;
    min-width: 0;
}

.air-quality-container,
.pollen-container {
  flex: 1 1 50%;
}

.pollen-container {
    width: 50%;
    padding-left: 10px;
    min-width: 0;
}

.section-title {
    margin-bottom: 12px;
    font-size: 16px;
}

.air-data-row {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.air-data-item {
    margin-bottom: 10px;
}

.air-data-label {
    font-weight: 500;
    white-space: normal;
}

.air-data-value {
    margin-left: 8px;
    font-weight: 500;
}

.level-row {
    margin-bottom: 4px;
}

.level-value {
    margin-left: 8px;
    font-weight: 500;
}

.status-good {
    color: #48bb78;
}

.f12h-content {
    display: flex;
    flex-direction: column; 
    width: 100%;
    padding: 16px 0;
}

.f12h-1part {
    display: flex !important;
    flex-wrap: wrap;             
    align-items: flex-start;     
    width: 100% !important;                 
    box-sizing: border-box !important;      
    padding: 16px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    cursor: pointer;
    position: relative; 
    min-height: 60px;
}

.f12h-1part:hover {
    background-color: #f7f7f7; 
}

.f12h-content > .f12h-info:last-child > .f12h-1part {
  border-bottom: none;
}

.f12h-details-head {
    display: flex;
    flex-direction: column;      
    justify-content: center;
    margin-left: 10px;           
    flex: 1; 
}

.f12h-details-head .f12h-date,
.f12h-details-head .f12h-estado {
    display: block;              
}

.f12h-details-head .f12h-date {
    font-weight: 300; 
    font-size: 0.9rem;
}

.f12h-details-head .f12h-estado {
    font-weight: 700; 
    margin-left: 0; 
}

.f12h-details-info {
    flex-basis: 100%;            
    display: none;
    padding: 10px;
    box-sizing: border-box;
    width: 100%; 
    font-size: 0.9rem;
}

.f12h-info {
    width: 100%;
margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
    box-sizing: border-box;
}

.f12h-info:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.forecast5-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.forecast5-day {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.forecast5-day:last-child {
    border-bottom: none;
}

.forecast5-date {
    width: 100%;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.forecast5-periods {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.forecast5-period {
    flex: 1;
    display: flex;
    flex-direction: column; 
    padding: 15px;
    border-radius: 8px;
    position: relative;
}

.forecast5-temp-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 10px;
}

.forecast5-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.forecast5-temp {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-color);
}

.forecast5-desc {
    font-size: 0.9em;
    text-align: left;
    width: 100%;
}

.forecast5-details {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Ajuste de padding para dejar espacio al label */
.forecast5-period {
  padding-top: 0.6em;
  box-sizing: border-box;
  /* si tus periodos tienen padding horizontal, mantenlo aquí */
  padding-left: 16px; 
  padding-right: 16px;
}

/* Primer periodo de cada día: DÍA */
.forecast5-day .forecast5-period:first-child::before {
  content: "DÍA";
  display: block;
  text-align: left;           /* <-- antes era center */
  padding-left: 0;            /* opcional: quita si no necesitas más indent */
  font-size: 0.85em;
  margin-bottom: 0.4em;
  color: var(--text-color);
}

.forecast5-day .forecast5-period:first-child .forecast5-temp {
  color: #d33;
}

.forecast5-day .forecast5-period:last-child .forecast5-temp {
  color: #06c;
}

/* Segundo periodo de cada día: NOCHE */
.forecast5-day .forecast5-period:last-child::before {
  content: "NOCHE";
  display: block;
  text-align: left;           /* <-- aquí también */
  padding-left: 0;
  font-size: 0.85em;
  margin-bottom: 0.4em;
  color: var(--text-color);
}

.forecast5-details-info {
  display: none;
  box-sizing: border-box;
  background-color: #ffffff;
}

.forecast5-day {
  box-sizing: border-box;
  cursor: pointer;
  transition: background-color 0.3s ease;
  /* fondo por defecto blanco, para que los hijos transparentes se vean bien */
  background-color: #ffffff;
}

/* 2) Sobre hover, pinta TODO el bloque (.forecast5-day) */
.forecast5-day:hover {
  background-color: #f7f7f7;
}

/* 3) Hijos transparentes: quita cualquier fondo propio */
.forecast5-day .forecast5-period,
.forecast5-day .forecast5-details-info {
  background-color: transparent !important;
}

/* 4) Asegura que el detalle ocupa todo el ancho */
.forecast5-details-info {
    width: 100%;
    box-sizing: border-box;
    background-color: transparent;
    color: var(--text-light);
    font-size: 0.9em;
}



/* Info cards */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.info-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--primary-color);
    border-left: 4px solid currentColor;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    margin-right: 1.25rem;
    color: var(--primary-color);
}

.card-icon.alert {
    background-color: rgba(229, 62, 62, 0.1);
    color: var(--alert-color);
}

.card-icon.tips {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--accent-color);
}

.card-content {
    flex-grow: 1;
}

.info-card h3 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card p {
    margin-bottom: 1.25rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.btn-more {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.2);
}

.btn-more:hover {
    background-color: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 6px rgba(67, 97, 238, 0.3);
}

.info-card.full-width {
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
}

.card-icon.weather {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--accent-color);
}

/* Partners section */
.partners {
    margin-bottom: 2.5rem;
}

.partners-container {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
}

.partners h2 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

.partners h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.partner-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.partner {
    width: 100%;
    max-width: 350px;
}

.partner-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.partner-logo {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.partner-card p {
    padding: 1rem;
    color: var(--text-color);
    font-weight: 500;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--bg-white);
    color: var(--text-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-top: auto;
}

.footer-container {
    padding: 2.5rem 2rem 1.5rem;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    color: var(--text-color);
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-column h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.footer-column p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul a {
    color: var(--text-light);
    transition: var(--transition);
    position: relative;
    padding-left: 1rem;
    display: inline-block;
}

.footer-column ul a:before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    line-height: 1;
    transition: var(--transition);
}

.footer-column ul a:hover {
    color: var(--primary-color);
    padding-left: 1.25rem;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #f1f5f9;
    border-radius: 50%;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.contact-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}


       
/* Estilos para el widget del clima */

.parent {
    display: grid;
    grid-template-columns: minmax(0, 460px) 1fr;
    grid-template-rows: 1fr;
    grid-column-gap: 20px;
    grid-row-gap: 20px;
    width: 100%;
    margin-bottom: 2.5rem;
}  
.weather-now { 
    grid-area: 1 / 1 / 2 / 2; 
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    width: 100%;
}

.map-header {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.map-icon {
    margin-right: 6px;
}

.map-title {
    font-weight: 500;
    margin-left: 10px;
}

.weather-container-section {
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    width: 100%;
}

.weather-header-icon {
    margin-left: 10px;
    font-weight: 500;
}

.weather-container {
    width: 100%;
    height: 100%;
}

.weather-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    font-size: 14px;
    color: #555;
}

.weather-main {
    display: flex;
    padding: 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fbfbfb;
}

.weather-icon {
    display: flex;
    align-items: center;
    margin: 0 20px 0 10px;
    gap: 30px;
    position: relative;
}

.temperature {
    text-align: center;
    font-size: 48px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: #333
}

.temperature-units {
    color: #808080;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.22;
    margin-left: -17px
}

.weather-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.realfeel {
    color: #555;
    margin-bottom: 8px;
    font-size: 15px;
    text-align: right;
}

.fenomeno-row {
    padding: 14px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: var(--primary-color);
    background-color: #f2f5f8;
}

.weather-data {
    display: flex;
    justify-content: space-between;
    padding: 14px 15px;
    border-bottom: 1px solid #f0f0f0;
    background-color: white;
    transition: background-color 0.2s;
}

.weather-data:hover {
    background-color: #f7f9fc;
}

.data-label {
    color: #444;
    font-weight: 500;
}

.data-value {
    color: var(--primary-color);
    font-weight: 500;
    text-align: right;
}

.weather-data:last-child {
    border-bottom: none;
}

.iframe-container {
    width: 100%;
    height: 100%;
}

.iframe-container iframe {
    width: 100%;
    height: 420px;
    border: 0;
}

.meteoblue-attribution {
    padding: 8px 15px;
    font-size: 14px;
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.meteoblue-attribution a {
    color: #0066cc;
    text-decoration: none;
}

.meteoblue-attribution a:hover {
    text-decoration: underline;
}

/* Colores según nivel de calidad del aire y del polen */
.calidad-nivel-Bueno,
.calidad-nivel-Bajo {
  color: #6a9;
}

.calidad-nivel-Aceptable {
  color: #2a7;
}

.calidad-nivel-Moderado {
  color: rgb(252, 207, 7);
}

.calidad-nivel-Pobre,
.calidad-nivel-Alto {
  color: #d33;
}

.calidad-nivel-Muy_pobre {
  color: #a0a;
}

.calidad-nivel-Extremadamente_pobre,
.calidad-nivel-Muy_alto {
  color: #555;
}

.sun-section {
    display: flex;
    flex-wrap: wrap;
    padding: 16px;
    gap: 0;
}

.sun-info {
    flex: 1 1 50%;
    min-width: 0;
    padding: 20px 10px 0 10px;
    box-sizing: border-box;
}

/* línea separadora solo en la primera columna */
.sun-info:first-child {
    border-right: 1px solid var(--border-color);
}


.sunmoon {
    position:relative;
}

.sunmoon > div {
    margin-left:10px;
}

.sun-times {
    width:220px;
    height:55px;
    border-bottom:1px solid #999;
    overflow-y:hidden;
}

.sun-times .sun-path {
    margin-left:25px;
    width:170px;
    height:190px;
    overflow:hidden;
    border:1px dashed #ddc29e;
    border-radius:50%;
}

.sun-times .sun-symbol-path {
    position: absolute;
    color: yellow;
    text-shadow: 0 0 5px black;
    height: 85px;
    -webkit-transition: -webkit-transform 2s linear;
    transition: transform 2s linear;
    -webkit-transform-origin: 50% 100%;
    transform-origin: 50% 100%;
    -webkit-transform: rotateZ(-75deg);
    transform: rotateZ(-75deg);
    left: 110px;
    bottom: 0;
}

.sun-times .sun-symbol-path .symbol {
    position:relative;
    font-size:18px;top:-8px;
} 

.legend {
    position:absolute;bottom:1em;
}

.legend > div {
    position:absolute;
    font-size:14px;width:80px;
}

.legend .sunrise {
    left:15px;
}

.legend .sunset {
    left:175px;
}

/* Colores según el índice UV y WBGT */
.index-bajo         { color: #2a7;} 
.index-moderado     { color: #ffa500; }
.index-alto         { color: #ff632a; }
.index-muyalto      { color: #ff0000; }
.index-extremo      { color: #85156d; }

/* Estilo para el contenedor de alerta */
.alert-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 20px;
    font-family: 'Poppins', sans-serif;
}

/* Botón que muestra/oculta la alerta */
.alert-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fff4e5;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    padding: 10px 15px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: #e65100;
    transition: all 0.3s ease;
}

.alert-button:hover {
    background-color: #ffe0b2;
}

.alert-button svg {
    flex-shrink: 0;
}


/* Niveles de alerta */
.alert-level-amarillo {
    background-color: #ffeb3b;
    color: #212121;
}

.alert-level-naranja {
    background-color: #ff9800;
    color: #fff;
}

.alert-level-rojo {
    background-color: #f44336;
    color: #fff;
}

.alert-context-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 6px;
    background-color: #fafafa;
}

.alert-context-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.alert-context-circle.alert-context-yellow {
    background-color: #f7e96d;
    border-color: #f1bc35;
}

.alert-context-circle.alert-context-orange {
    background-color: #FF8C00;
    border-color: #FF6600;
}

.alert-context-circle.alert-context-red {
    background-color: #DC143C;
    border-color: #B22222;
}

.alert-context-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: bold;
}

.alert-context-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #444;
}

.alert-context-section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}


/* Sección de alerta */
.breadcrumb {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1rem 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--text-lighter);
}

.breadcrumb-current {
    color: var(--text-color);
    font-weight: 500;
}

.alerts-container {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.alert-item {
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-item:hover {
    background-color: #f8fafc;
    transform: translateX(5px);
}


.alerts-header {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-color);
}

.alerts-title h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.alerts-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.count-label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
}

.count-number {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 24px;
    text-align: center;
}

.alert-logo {
    flex-shrink: 0;
    width: 60px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--primary-color);
}



.alert-text {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
}

.alert-arrow {
    flex-shrink: 0;
    margin-left: 1rem;
    color: var(--text-lighter);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.alert-item:hover .alert-arrow {
    color: var(--primary-color);
    transform: translateX(3px);
}

.alert-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    margin-right: 15px;
}

.aemet-logo {
    max-width: 50px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

 /* Contenedor principal de la alerta */
.alert-detail-container {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Header de la alerta con fechas */
.alert-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    font-weight: 500;
}

.timeline-item {
    text-align: center;
}

.timeline-label {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-time {
    font-size: 1.1rem;
    font-weight: 600;
}

.timeline-date {
    font-size: 0.9rem;
    opacity: 0.95;
}

/* Contenedor del mapa */
.alert-map-container {
    position: relative;
    width: 100%;
    height: 500px;
    background-color: #f5f5f5;
    overflow: hidden;
}

.alert-map {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#map {
    height: 500px;
    width: 100%;
    margin-bottom: 1em;
}


/* Contenido de la alerta */
.alert-content {
    padding: 2rem;
}

.alert-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-level-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-description {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin-bottom: 1.5rem;
}

.alert-description p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.alert-description p:last-child {
    margin-bottom: 0;
}

/* alerta actividades al aire libre */

.shoe-icon {
    width: 50px;
    height: 50px;
    display: block;
    transform-origin: center;
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg) translateX(0);
    }
    25% {
        transform: rotate(-3deg) translateX(-2px);
    }
    50% {
        transform: rotate(0deg) translateX(0);
    }
    75% {
        transform: rotate(3deg) translateX(2px);
    }
}

/* Aplicar animación wiggle al hover */
.alert-item:hover .shoe-icon {
    animation: wiggle 0.8s infinite ease-in-out;
}

/************ Responsive design ************/

@media (min-width: 1140px) {
  .main-wrapper{
    max-width: none;
    width: 1140px;
  }
}

@media (max-width: 1024px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ad-space {
        width: 100%;
        max-width: 468px;
    }

    .air-quality-container,
    .pollen-container {
        flex: none;
        width: 100%;
        margin: 0 0 1rem;
        padding: 0 !important;
    }

    .air-quality-container {
        border-right: none;
    }


    header {
        overflow: visible;
    }

    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 1rem;

        z-index: 100;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--text-color);
        margin: 5px 0;
        transition: var(--transition);
    }

    .main-nav {
        min-height: 56px;
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-white);
        flex-direction: column;
        z-index: 99;
        box-shadow: var(--box-shadow);
        transition: var(--transition);
        overflow-y: auto;
        padding: 5rem 0 2rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        width: 100%;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-item:after {
        display: none;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(6.9px) rotate(45deg);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-6.9px) rotate(-45deg);
    }
        
    .info-card {
        flex-direction: column;
    }
    
    .card-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .partner-logos {
        grid-template-columns: 1fr;
    }
    
    .partner {
        max-width: 100%;
    }

    .parameter-value {
        font-size: 1.5em;
    }

    .parent {
        grid-template-columns: 100%;
        grid-template-rows: auto auto;
    }
    
    .weather-now {
        grid-area: 1 / 1 / 2 / 2;
        max-width: 100%;
    }
    
    .weather-map {
        grid-area: 2 / 1 / 3 / 2;
    }
    
    /* Ajusta el tamaño del iframe para móviles */
    .iframe-container iframe {
        height: 350px;
    }

    .wind-content, .moon-content, .f12h-content {
        flex-direction: column;
        gap: 12px;
    }

    .forecast5-day {
        flex-direction: column;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .forecast5-date {
        margin-bottom: 10px;
    }
    
    .forecast5-periods {
        flex-direction: column;
        gap: 15px;
    }
    
    .forecast5-period {
        width: 100%;
    }

    .breadcrumb {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .alert-item {
        padding: 0.75rem 1rem;
    }

    .alerts-header {
        padding: 1rem 1.25rem;
        margin-bottom: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        border-left: 3px solid var(--primary-color);
    }
    
    .alerts-title h2 {
        font-size: 1.25rem;
    }
    
    .alerts-count {
        align-self: flex-end;
        gap: 0.375rem;
    }
    
    .count-label {
        font-size: 0.875rem;
    }
    
    .count-number {
        padding: 0.2rem 0.625rem;
        font-size: 0.8rem;
        min-width: 20px;
    }

    .alert-logo {
        width: 50px;
        height: 35px;
        font-size: 0.7rem;
    }

    .alert-text {
        font-size: 0.9rem;
    }

    .alert-logo {
        min-width: 50px;
        height: 50px;
        margin-right: 10px;
    }

    .alert-timeline {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .timeline-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .timeline-label {
        min-width: 60px;
        text-align: left;
        margin-bottom: 0;
    }

    .timeline-details {
        flex: 1;
        text-align: left;
    }

    .alert-content {
        padding: 1.5rem;
    }

    .alert-title {
        font-size: 1.20rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .alert-map-container {
        height: 300px;
    }

    #map {
        height: 300px;
    }
    
}

@media (max-width: 480px) {
    body {
        padding: 12px 0;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
    }
    
    .main-container, .partners-container {
        padding: 1.5rem;
    }

    .parent {
        grid-row-gap: 15px;
    }
    
    .iframe-container iframe {
        height: 300px;
    }

    .sun-section {
        flex-direction: column;
    }

    .sun-info {
        /* quitamos el separador vertical */
        border-right: none !important;
        padding: 8px 0;
    }

    .alert-item {
        padding: 0.75rem;
    }

    .alerts-header {
        padding: 0.875rem 1rem;
        border-radius: calc(var(--border-radius) * 0.75);
        border-left-width: 2px;
    }
    
    .alerts-title h2 {
        font-size: 1.125rem;
        line-height: 1.3;
    }
    
    .alerts-count {
        gap: 0.25rem;
    }
    
    .count-label {
        font-size: 0.8rem;
    }
    
    .count-number {
        padding: 0.15rem 0.5rem;
        font-size: 0.75rem;
        min-width: 18px;
        border-radius: 16px;
    }

    .alert-logo {
        width: 45px;
        height: 32px;
        margin-right: 0.75rem;
    }

    .alert-text {
        font-size: 0.85rem;
    }

    .aemet-logo {
        max-width: 40px;
        max-height: 40px;
    }

     .alert-timeline {
        padding: 0.75rem;
    }

    .timeline-time {
        font-size: 1rem;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    .alert-content {
        padding: 1rem;
    }

    .alert-title {
        font-size: 1.1rem;
    }

    .alert-description {
        padding: 1rem;
    }

    .alert-map-container {
        height: 250px;
    }

    #map {
        height: 250px;
    }
}
