/* ===============================
   ESTILO FRUTIGER AERO MODERNO
================================ */
:root {
  --primary-color: #5290fa;
  --secondary-color: #009c03;
  --background-gradient: linear-gradient(180deg, #62b8ff, #109110);
  --header-bg: linear-gradient(90deg, #03b7ff, #4ed4fc);
  --text-color: rgba(255,255,255,0.9);
  --text-dark: #333;
  --glass-bg: rgba(255,255,255,0.15);
  --custom-background: none;
}

body{
    margin:0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--custom-background), var(--background-gradient);
    background-attachment: fixed;
    min-height:100vh;
    color: var(--text-dark);
}

/* efecto cristal */

.container{
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border-radius:20px;
    padding:20px;
    margin:20px auto;
    max-width:1400px;
    box-shadow:0 10px 40px rgba(0,0,0,0.15); 
}

/* header moderno */

.header{
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow:0 5px 20px rgba(0,0,0,0.15);
    position:sticky !important;
    top:0;
    z-index:1000;
}

.navigation ul{
    display:flex;
    gap:20px;
}

.navigation a{
    color: var(--text-color);
    font-weight:600;
    text-decoration:none;
    transition:0.3s;
}

.navigation a:hover{
    color: var(--secondary-color);
}

/* iconos noticias */

.logo img{
    border-radius:10px;
    transition:0.25s;
}

.logo img:hover{
    transform:scale(1.15);
    box-shadow:0 5px 15px rgba(0,0,0,0.3);
}

/* títulos */

h3{
  color: var(--text-color);
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  padding:10px 20px;
  border-radius:15px;
  width:fit-content;
  box-shadow:0 4px 10px rgba(0,0,0,0.2);  
}

/* grid adaptable */

section{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

/* animación suave */

@keyframes float{
    0%{transform:translateY(0)}
    50%{transform:translateY(-4px)}
    100%{transform:translateY(0)}
}

.logo img:hover{
    animation:float 1.2s infinite;
}

/* barra superior widgets */

.widgets-bar{
    display:flex;
    gap:20px;
    justify-content:center;
    align-items:center;
    padding:10px;
    margin:10px auto;
    max-width:1200px;
}

.widget-box{
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    padding:10px 18px;
    border-radius:15px;
    box-shadow:0 3px 10px rgba(0,0,0,0.15);
    color: var(--text-color);
}
/* ===============================
   HEADER RESPONSIVE
================================ */

.logo-nav-container{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap: wrap;
}

/* menú escritorio */

.navigation ul{
    display:flex;
    gap:20px;
}

/* ===============================
   RESPONSIVE MOVIL
================================ */

@media only screen and (max-width:767px){

.header{
    padding:1rem 0;
}

.logo{
    font-size:1.2rem;
}

/* icono menú */

.menu-icon{
    display:block;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: transform 0.2s ease;
}
.menu-icon:hover {
        transform: scale(1.05);
}
/* ocultar menú */

.navigation ul{
    display:none;
    flex-direction: column;
    width:100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 15px;
    padding: 12px;
    margin: 10px auto;
    max-width: 95%;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}
   
/* mostrar menú cuando se activa */

.navigation ul.show{
    display:block;
    opacity: 1;
    transform: translateY(0);
    background: var(--header-bg);
    backdrop-filter:blur(10px);
    border-radius:10px;
    padding:10px;
}

/* enlaces verticales */

.navigation ul li{
    display:block;
    margin:5px 0;
}

.navigation ul li a{
    display:block;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
    border-radius: 5px;
}
.navigation ul li a:hover {
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
        color: white;
}
/* widgets responsive */

.widgets-bar{
    flex-direction:column;
    gap:10px;
}

.widget-box input{
    width:220px !important;
}
.main-dashboard{
    grid-template-columns: 1fr; /* columna única en móvil */
}
/* evitar overflow horizontal */

body{
overflow-x:hidden;
}

/* imágenes adaptables */

img{
max-width:100%;
height:auto;
}
/* ===== FIX MENÚ MOBILE (mejora visual + centrado) ===== */

.navigation ul.show{
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-radius:15px;
    padding:12px;

    /* centrado real */
    margin:10px auto;
    max-width:95%;

    /* alineación interna */
    align-items:center;
    text-align:center;
}

/* centrar elementos del menú */

.navigation ul.show li{
    width:100%;
    text-align:center;
}
/* ===============================
   FIX GLOBAL DESBORDAMIENTO + CLIMA
================================ */

/* evita cualquier scroll lateral */
html, body {
    overflow-x: clip;
}

/* todos los contenedores centrados */
.container,
section,
.main,
.widgets-bar {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* móvil ultra-fix */
@media only screen and (max-width:767px){

    /* esto elimina el desplazamiento fantasma */
    body {
        position: relative;
    }
}
/* ===============================
   FIX FINAL: WIDGET CLIMA CENTRADO 100%
================================ */

.weather-widget {
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.2);
    text-align: center;
    color: white;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-sizing: border-box;
}

.weather-widget .city-name {
    margin: 5px 0 15px 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.weather-widget .weather-icon {
    font-size: 70px;
    margin: 10px 0 20px 0;
    line-height: 1;
}

.weather-widget .temperature {
    font-size: 34px;
    margin: 5px 0;
}

.weather-widget .wind {
    font-size: 14px;
    margin: 5px 0;
}

.weather-widget .forecast {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.weather-widget .forecast-day {
    background: rgba(255,255,255,0.25);
    padding: 10px;
    border-radius: 15px;
    min-width: 85px;
    backdrop-filter: blur(6px);
    text-align: center;
}

.weather-widget .forecast-day .day {
    font-size: 12px;
}

.weather-widget .forecast-day .icon {
    font-size: 24px;
    margin: 5px 0;
}

.weather-widget .forecast-day .temp-range {
    font-size: 12px;
}

/* Responsive móvil */
@media only screen and (max-width: 767px) {
    .weather-widget {
        width: 95%;
        margin: 15px auto;
        padding: 15px;
    }
    .weather-widget .weather-icon {
        font-size: 48px;
        margin: 5px 0;
    }
    .weather-widget .temperature {
        font-size: 28px;
    }
    .weather-widget .forecast-day {
        min-width: 70px;
        padding: 6px;
    }
    .weather-widget .forecast-day .icon {
        font-size: 20px;
    }
}
/* TickerView personalizado */
.ticker-widget {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  padding: 15px 0;
}

/* Ajuste interno del widget TradingView */
.ticker-widget .tradingview-widget-container {
  width: 100%;
}

@media only screen and (max-width: 767px) {
    main.intro {
        padding-top: 80px; /* header más pequeño en móvil */
    }
}

/* mejora separación visual móvil */
@media only screen and (max-width:767px){
    #widgets-container{
        margin-top: 5px;
    }
}

#widgets-container{
    margin-bottom: 5px;
}

@media only screen and (max-width:767px){
    :root{
        --header-height: 110px;
    }
}
/* ===============================
   UNIFICAR WIDGETS DENTRO DEL CONTAINER
================================ */

/* Contenedor principal que centra todo */
main.intro .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Todos los widgets heredan el ancho del contenedor */
#widgets-container,
#news-ticker-container,
.ticker-widget {
    width: 100%;
    margin: 20px auto;
    box-sizing: border-box;
}
.feedwind-wrapper,
.weather-widget {
    width: 100%;
    margin: 20px auto;
    box-sizing: border-box;
}
/* Responsive: en móvil, el contenedor se adapta */
@media only screen and (max-width: 767px) {
    main.intro .container {
        padding: 0 15px;
    }
    
    /* Ajuste para el ticker de noticias */
    #news-ticker-container {
        padding: 10px 0;
    }
    
    .news-item {
        min-width: 260px;
        height: 140px;
    }
}
/* ===============================
   ESTILOS FEEDWIND - FRUTIGER AERO
================================ */

.feedwind-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Título del widget */
#news-ticker-title {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: white;
    padding: 8px 24px;
    margin-bottom: 20px;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    max-width: fit-content;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

/* Contenedor del carrusel (asumiendo que Feedwind usa .fw-items) */
.feedwind-wrapper .fw-items {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255,255,255,0.2);
    -webkit-overflow-scrolling: touch;
}

/* Ocultar scrollbar en Chrome/Safari (opcional, para diseño limpio) */
.feedwind-wrapper .fw-items::-webkit-scrollbar {
    height: 6px;
}
.feedwind-wrapper .fw-items::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
.feedwind-wrapper .fw-items::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* Cada noticia – ajusta la clase según la real */
.feedwind-wrapper .fw-item,
.feedwind-wrapper .fw-article,
.feedwind-wrapper [class*="item"] {
    min-width: 280px;
    width: 280px;
    height: 220px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.feedwind-wrapper .fw-item:hover,
.feedwind-wrapper .fw-article:hover,
.feedwind-wrapper [class*="item"]:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Imagen de fondo */
.feedwind-wrapper .fw-item img,
.feedwind-wrapper .fw-article img,
.feedwind-wrapper [class*="item"] img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.5s ease;
}

.feedwind-wrapper .fw-item:hover img,
.feedwind-wrapper .fw-article:hover img,
.feedwind-wrapper [class*="item"]:hover img {
    transform: scale(1.1);
}

/* Overlay degradado */
.feedwind-wrapper .fw-item::after,
.feedwind-wrapper .fw-article::after,
.feedwind-wrapper [class*="item"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
    z-index: 1;
    pointer-events: none;
}

/* Contenedor del texto */
.feedwind-wrapper .fw-item-content,
.feedwind-wrapper .fw-article-content,
.feedwind-wrapper [class*="content"] {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
    text-align: left;
}

/* Título */
.feedwind-wrapper .fw-item-title,
.feedwind-wrapper .fw-article-title,
.feedwind-wrapper [class*="title"] {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 6px 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fuente / fecha */
.feedwind-wrapper .fw-item-source,
.feedwind-wrapper .fw-article-source,
.feedwind-wrapper [class*="source"] {
    font-size: 0.75rem;
    opacity: 0.85;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Icono de fuente (opcional) */
.feedwind-wrapper .fw-item-source::before {
    content: "📰";
    font-size: 0.7rem;
}
.feedwind-wrapper .fw-custom-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 0 20px;
}
.feedwind-wrapper .fw-custom-item {
    min-width: 280px;
    width: 280px;
    height: 220px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    transition: transform 0.3s;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
/* Responsive móvil */
@media only screen and (max-width: 767px) {
    .feedwind-wrapper {
        padding: 15px 0;
        margin-bottom: 20px;
    }
    .feedwind-wrapper .fw-items {
        gap: 16px;
        padding: 0 12px;
    }
    .feedwind-wrapper .fw-item,
    .feedwind-wrapper .fw-article,
    .feedwind-wrapper [class*="item"] {
        min-width: 240px;
        width: 240px;
        height: 190px;
    }
    .feedwind-wrapper .fw-item-title,
    .feedwind-wrapper .fw-article-title,
    .feedwind-wrapper [class*="title"] {
        font-size: 0.9rem;
    }
}
/* Fuerza estilo frutiger aero sobre todo el contenido de Feedwind */
.feedwind-wrapper * {
    box-sizing: border-box;
}

.feedwind-wrapper .feedwind > div,
.feedwind-wrapper [class*="item"] {
    min-width: 260px;
    width: 260px;
    height: 200px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    margin: 0 8px;
}

.feedwind-wrapper [class*="item"]:hover {
    transform: scale(1.02);
}

.feedwind-wrapper [class*="item"] img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.feedwind-wrapper [class*="item"] a {
    display: block;
    height: 100%;
    text-decoration: none;
}

.feedwind-wrapper [class*="title"] {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 1;
}

.feedwind-wrapper [class*="source"] {
    display: none;
}

/* Contenedor del carrusel */
.feedwind-wrapper [class*="items"] {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px;
    scroll-behavior: smooth;
}

/* Ajuste en móvil */
@media (max-width: 767px) {
    .feedwind-wrapper [class*="item"] {
        min-width: 220px;
        width: 220px;
        height: 170px;
    }
}
