body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f8ff;
    color: #333;
    text-align: center;

}
header {
    background-color: #0066cc;
    color: white;
    padding: 20px;
    text-align: center;
}
img {
    max-width: 100%;
    height: auto;
}
.container {
    width: 90%;
    margin: auto;
    overflow: hidden;
    align-content: center;
    height: auto;
}

footer {
    background-color: #0066cc;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
}
.update-time {
    padding: 10px;
    background: #f0f0f0;
    text-align: center;
    font-style: italic;
    color: #555;
    border-bottom: 1px solid #ddd;
}

.region-title {
    color: #0066cc;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.storm-container {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sections-container {
    display: flex;
    flex-direction: column; /* Cambiamos a columna por defecto */
    gap: 20px;
    margin-top: 15px;
}

/* Estilos para la información de la tormenta */
.storm-basic-info {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: left;
}

.storm-basic-info p {
    margin: 5px 0;
}

.storm-intensity {
    color: #dc3545;
    font-weight: bold;
    margin-left: 10px;
}

.storm-pressure {
    color: #007bff;
    font-weight: bold;
    margin-left: 10px;
}

/* Contenedor principal para botones y iframes */
.advisories-main-container {
    margin: 10px 0;
    position: relative;
}

.storm-links {
    margin-bottom: 10px;
}

/* Botones para avisos */
.advisory-toggle {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
    padding: 10px 15px;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.advisory-toggle:hover {
    background-color: #0056b3;
}

.advisory-toggle.active {
    background-color: #004a99;
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.3);
}

/* Color diferente para el botón de Forecast Discussion */
.advisory-toggle[data-type="discussion"] {
    background-color: #28a745;
}

.advisory-toggle[data-type="discussion"]:hover {
    background-color: #218838;
}

.advisory-toggle[data-type="discussion"].active {
    background-color: #1e7e34;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

/* Contenedores para iframes desplegables */
.advisory-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 5px;
}

.advisory-container.active {
    max-height: 600px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.advisory-container iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 5px;
}

/* Estilos para sección de alertas */
.warnings-section {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.warnings-section .section-title {
    color: #856404;
    border-bottom-color: #ffeaa7;
}

/* Para pantallas grandes (más de 900px) */
@media (min-width: 900px) {
    .sections-container {
        flex-direction: row; /* Solo horizontal en pantallas grandes */
        flex-wrap: wrap;
    }
}

/* Estilos para cada sección */
.cone-section, .discussion-section, .satellite-section {
    flex: 1 1 100%; /* Ocupa todo el ancho por defecto */
    min-width: 0; /* Permite que se ajuste correctamente */
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media (min-width: 900px) {
    .cone-section, .satellite-section {
        flex: 1 1 45%; /* Dos columnas para imágenes en pantallas grandes */
    }
    
    .discussion-section {
        flex: 2 1 100%; /* Toma todo el ancho debajo en pantallas grandes */
    }
}

/* Estilos para contenedores de imágenes */
.image-container {
    width: 100%;
    margin: 0 auto;
    text-align: center;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.cone-section .image-container img,
.satellite-container img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border: 1px solid #ddd;
}

/* Mapas de SST */
.sst-map {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 10px 0;
}

.image-caption {
    color: #555;
    margin: 5px 0 20px 0;
    line-height: 1.4;
}

/* Seccion de Tropical Weather Outlook */
.outlook-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.outlook-pubdate {
    color: #666;
    margin-bottom: 15px;
}

.formation-chances {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.formation-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #0066cc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.formation-card h4 {
    margin: 0 0 8px 0;
    color: #003366;
    font-size: 1.1em;
}

.formation-details {
    color: #444;
    font-size: 0.95em;
    margin-bottom: 12px;
    line-height: 1.4;
}

.chances-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chance-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    color: white;
    background: #666;
}

.chance-high {
    background: #d32f2f;
}

.chance-medium {
    background: #f57c00;
}

.chance-low {
    background: #388e3c;
}

.outlook-toggle {
    margin-top: 10px;
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.outlook-toggle:hover {
    background: #bbdefb;
}

.outlook-text {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.outlook-text.active {
    display: block;
}

.outlook-text pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: 0.9em;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

.noaa-link {
    margin-top: 10px;
    text-align: right;
}

.noaa-link a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.noaa-link a:hover {
    text-decoration: underline;
}

/* Imagenes del Outlook */
.outlook-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.outlook-image-box {
    text-align: center;
}

.outlook-image-box h3 {
    margin: 0 0 8px 0;
    color: #003366;
    font-size: 1em;
}

.outlook-image-box img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Iframe de discusión */
.iframe-container {
    width: 100%;
    height: 400px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-top: 10px;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Títulos de sección */
.section-title {
    margin: 0 0 10px 0;
    color: #0066cc;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    font-size: 1.2rem;
}

/* Mensajes de error */
.image-error {
    color: #dc3545;
    padding: 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin: 10px 0;
}

.image-error small {
    color: #6c757d;
    display: block;
    margin-top: 5px;
    font-size: 0.8em;
}

/* fin nuevas secciones */


.container-big {
	width: 100%;
    height: 600px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-top: 10px;
}
.iframe-noaa-history {
	width: 90%;
	height: 600px;
}

/* Estilos para el historial de tormentas */
.history-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.history-toggle {
    padding: 10px 15px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.history-toggle:hover {
    background-color: #0056b3;
}

.history-toggle.active {
    background-color: #004a99;
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.3);
}

.history-content {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
}

.history-item {
    display: none;
    text-align: center;
}

.history-item.active {
    display: block;
}

.history-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 600px) {
    .history-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .history-toggle {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Para pantallas móviles */
@media (max-width: 600px) {
    .advisory-toggle {
        display: block;
        margin-bottom: 10px;
        text-align: center;
        width: 100%;
    }
    
    .storm-intensity, .storm-pressure {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
    
    .advisory-container.active {
        max-height: 400px;
    }
    
    .advisory-container iframe {
        height: 350px;
    }
}

/* ============================================================
   NUEVOS ESTILOS - Dashboard, Tabs, Marine, Names
   ============================================================ */

/* Status Dashboard */
.status-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border-bottom: 2px solid #90caf9;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    text-align: left;
}

.status-card .status-icon {
    font-size: 1.8em;
    line-height: 1;
}

.status-card strong {
    display: block;
    font-size: 0.85em;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-card span:last-child {
    font-size: 1.1em;
    font-weight: bold;
    color: #003366;
}

.status-card.status-green {
    border-left: 4px solid #4caf50;
}
.status-card.status-yellow {
    border-left: 4px solid #ff9800;
}
.status-card.status-red {
    border-left: 4px solid #f44336;
}

/* Toggle Button */
.toggle-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    margin: 10px 0;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    background: #bbdefb;
}

.toggle-btn.active {
    background: #1565c0;
    color: white;
}

/* Discussion Frame */
.discussion-frame {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    margin-top: 5px;
}

.discussion-frame.active {
    max-height: 650px;
}

.discussion-frame iframe {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Satellite Tabs */
.satellite-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 0.95em;
    color: #555;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: #0066cc;
    color: white;
}

.tab-content {
    display: none;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.tab-content.active {
    display: block;
}

/* Windy Embed */
.windy-embed {
    width: 100%;
    height: 500px;
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.windy-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Marine Analysis */
.marine-analysis {
    margin-top: 20px;
}

.marine-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.marine-images img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* History Tabs */
.history-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.history-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    color: #555;
    transition: all 0.2s ease;
}

.history-btn:hover {
    background: #e0e0e0;
}

.history-btn.active {
    background: #0066cc;
    color: white;
}

.history-placeholder {
    color: #888;
    font-style: italic;
    padding: 30px;
}

/* Names Grid */
.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.name-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 0.95em;
}

.name-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #0066cc;
    color: white;
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: bold;
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE - Móvil y Tablet
   ============================================================ */

@media (max-width: 768px) {
    /* Header más compacto */
    header {
        padding: 15px 10px;
    }
    header h1 {
        font-size: 1.4em;
    }
    header p {
        font-size: 0.9em;
    }
    
    /* Dashboard: una sola columna */
    .status-dashboard {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }
    .status-card {
        padding: 10px 12px;
    }
    .status-card .status-icon {
        font-size: 1.5em;
    }
    
    /* Contenedor general */
    .container {
        width: 95%;
        padding: 0 5px;
    }
    
    /* Imágenes del outlook apiladas */
    .outlook-images {
        grid-template-columns: 1fr;
    }
    
    /* Windy embed más bajo */
    .windy-embed {
        height: 350px;
    }
    
    /* Discussion iframe más bajo */
    .discussion-frame iframe {
        height: 400px;
    }
    
    /* Marine images apiladas */
    .marine-images {
        grid-template-columns: 1fr;
    }
    
    /* Formation cards una columna */
    .formation-chances {
        grid-template-columns: 1fr;
    }
    
    /* Tabs de satélite: scroll horizontal si no caben */
    .satellite-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    .satellite-tabs .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* History tabs más compactos */
    .history-tabs {
        gap: 5px;
    }
    .history-btn {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    /* Grid de nombres: 2 columnas en móvil */
    .names-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .name-item {
        padding: 6px 10px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    /* Móvil muy pequeño */
    header h1 {
        font-size: 1.2em;
    }
    
    .windy-embed {
        height: 300px;
    }
    
    .discussion-frame iframe {
        height: 350px;
    }
    
    /* Chances badges apilados */
    .chances-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Nombres en 2 columnas más pequeñas */
    .names-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
