/* Mostrar solo una versión de imágenes según pantalla */
.news-img-carousel-container {
    width: 100%;
}
.news-img-carousel {
    display: none;
}
.news-img-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 18px;
}
@media (max-width: 700px) {
    .news-img-carousel {
        display: block !important;
    }
    .news-img-column {
        display: none !important;
    }
}
/* Estilos para el área de detalle de noticias al estilo Google News */
.news-summary-container {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(60,64,67,.15);
    padding: 32px 40px;
    margin: 40px auto;
    max-width: 900px;
    font-family: 'Segoe UI', Arial, sans-serif;
}
.news-summary-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #202124;
}
.news-summary-date {
    color: #5f6368;
    font-size: 1.1rem;
    margin-bottom: 24px;
}
.news-featured {
    margin-bottom: 32px;
}
.news-featured-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1967d2;
    margin-bottom: 12px;
}
.news-featured-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.news-featured-img {
    width: 180px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(60,64,67,.10);
}
.news-featured-details {
    flex: 1;
}
.news-featured-source {
    font-size: 1rem;
    color: #5f6368;
    margin-bottom: 6px;
}
.news-featured-desc {
    font-size: 1.1rem;
    color: #3c4043;
    margin-bottom: 8px;
}
.news-featured-meta {
    font-size: 0.95rem;
    color: #5f6368;
}
.news-list {
    border-top: 1px solid #e0e0e0;
    padding-top: 24px;
}
    /* Ensure other news is visible below description on mobile */
    .news-list { display: block !important; width: 100%; margin-top: 18px; }
    
.news-list-item {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}
.news-list-source {
    font-weight: 600;
    color: #ea4335;
    margin-right: 8px;
    font-size: 1.05rem;
}
.news-list-title {
    font-size: 1.08rem;
    color: #202124;
    margin-bottom: 2px;
}
.news-list-meta {
    color: #5f6368;
    font-size: 0.95rem;
}
.news-list-img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(60,64,67,.10);
}
@media (max-width: 700px) {
    .news-summary-container {
        padding: 18px 6px;
    }
    .news-featured-details {
        position: relative;
    }
    #likeBtn {
        margin-top: 80px !important;
        position: absolute;
        left: 85%;
        top: 20px;
    }
    .weather-widget-desktop {
        display: none !important;
    }
    .news-summary-title {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
        margin-bottom: 6px !important;
        margin-left: 8px !important;
        margin-right: 8px !important;
    }
    .news-featured-title {
        margin-left: 8px !important;
        margin-right: 8px !important;
    }
    .news-summary-date {
        margin-left: 8px !important;
        margin-right: 8px !important;
    }
    .news-featured-desc {
        margin-left: 8px !important;
        margin-right: 8px !important;
    }
    .main-news-mobile {
        max-width: 100vw !important;
        width: 100vw !important;
        margin: 0 !important;
        border-radius: 0 0 18px 18px !important;
    }
    .news-detail-flex {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        align-items: stretch !important;
    }
    #weather-widget-mobile {
        margin: 10px 8px 18px 8px !important;
    }
    .news-featured-content {
        flex-direction: column;
        gap: 10px;
    }
    .news-img-carousel {
        width: 96vw !important;
        max-width: 96vw !important;
        margin: 0 auto 18px auto !important;
        border-radius: 18px !important;
        overflow: hidden;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }
    .carousel-item {
        display: none;
        width: 100%;
        justify-content: center;
        align-items: center;
    }
    .carousel-item.active {
        display: flex;
    }
    .news-featured-img {
        width: 92vw !important;
        max-width: 92vw !important;
        height: 92vw !important;
        max-height: 92vw !important;
        object-fit: cover;
        border-radius: 18px !important;
        margin: 0 auto;
        display: block;
    }
    .news-side-container {
        display: none !important;
    }
    #weather-widget-mobile {
        display: block !important;
    }
    .news-img-carousel {
        width: 100%;
        position: relative;
        margin-bottom: 18px;
    }
    .carousel-item {
        display: none;
        width: 100%;
    }
    .carousel-item.active {
        display: block;
    }
    .carousel-prev, .carousel-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(25,103,210,0.7);
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 2;
    }
    .carousel-prev { left: 8px; }
    .carousel-next { right: 8px; }
    .share-btn {
        margin: 18px auto 0 auto;
        display: block;
        padding: 10px 22px;
        background: #1967d2;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 1rem;
        cursor: pointer;
        box-shadow: 0 1px 4px rgba(60,64,67,.10);
    }
}
/* Desktop carrusel: columna de imágenes */
.news-img-carousel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 18px;
}
.carousel-item {
    display: block;
}
.carousel-prev, .carousel-next {
    display: none;
}
@media (max-width: 700px) {
    .news-img-carousel {
        display: block !important;
    }
    .carousel-item {
        display: none;
        width: 100%;
        transition: opacity 0.3s;
    }
    .carousel-item.active {
        display: block;
    }
    .carousel-prev, .carousel-next {
        display: block !important;
    }
}
/* Improved mobile layout (final override) -------------------------------------------------- */
@media (max-width: 700px) {
    /* Layout: stack everything vertically and keep desktop markup unchanged */
    .news-detail-flex { display: flex !important; flex-direction: column !important; gap: 12px !important; align-items: stretch !important; }

    /* Weather: mobile on top, desktop hidden */
    #weather-widget-mobile { display: block !important; margin: 8px auto; max-width: 92vw; width: 92vw; border-radius: 12px; padding: 12px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
    .weather-widget-desktop { display: none !important; }

    /* Make the main news container narrower and slightly inset from edges */
    .news-summary-container { max-width: 92vw !important; width: 92vw !important; margin: 0 auto !important; padding: 12px 10px !important; border-radius: 14px !important; }
    .main-news-mobile { border-radius: 14px !important; }

    /* Title / meta / description spacing and typography */
    .news-summary-title { font-size: 1.6rem !important; line-height: 1.08 !important; margin: 6px 4px 8px 4px !important; }
    .news-summary-date { font-size: 0.95rem !important; color: #6b6f74 !important; margin: 0 4px 10px 4px !important; }
    .news-featured-title { font-size: 1.05rem !important; margin: 6px 4px !important; }
    .news-featured-desc { margin: 4px 4px 12px 4px !important; padding: 0 12px !important; font-size: 1rem !important; }

    /* Show 'otras noticias' under the description on mobile */
    .news-list { display: block !important; width: 100% !important; margin-top: 12px !important; }

    /* Mobile carousel styling: centered, square-ish, with visible controls */
    .mobile-carousel { display: block !important; width: 92vw !important; max-width: 92vw !important; margin: 8px auto 12px auto !important; }
    .mobile-carousel-inner { position: relative; overflow: hidden; border-radius: 12px; }
    .mobile-carousel-item { display: none; width: 100%; box-sizing: border-box; }
    .mobile-carousel-item.active { display: block; }
    .mobile-carousel-item img { width: 100%; height: calc(100vw * 0.7); max-height: 420px; object-fit: cover; border-radius: 12px; display: block; }
    .mobile-carousel-prev, .mobile-carousel-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; z-index: 5; }
    .mobile-carousel-prev { left: 8px; }
    .mobile-carousel-next { right: 8px; }

    /* Hide desktop image column and use mobile carousel */
    .news-img-desktop { display: none !important; }
    /* Mobile share button: show mobile version and hide desktop share button */
    #shareBtn { display: none !important; }
    .share-btn-mobile { display: block !important; margin: 12px auto; padding: 10px 18px; background: #1967d2; color: #fff; border-radius: 8px; border: none; font-size: 1rem; cursor: pointer; box-shadow: 0 1px 4px rgba(60,64,67,.10); }
    /* When share button is inside the compact inline actions row, use a rounded-rectangle (not circular) */
    .mobile-actions-inline .share-btn-mobile, .mobile-actions-inline #shareBtnMobile {
        width: auto !important;
        height: auto !important;
        min-height: 36px !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        box-shadow: 0 1px 4px rgba(60,64,67,.10) !important;
    }
    /* Use top-level title only on mobile; hide duplicate inside details */
    .news-featured-title { display: none !important; }

    /* Share button full-width and visible spacing */
    .share-btn, #shareBtn { display: none !important; }
    .share-btn-mobile, #shareBtnMobile { display: block !important; width: calc(100% - 20px) !important; margin: 10px auto 0 auto !important; padding: 12px !important; box-shadow: 0 2px 6px rgba(25,103,210,0.12) !important; }

    /* Strong override: if share button sits inside the inline actions row, keep it small and circular */
    .news-summary-container .mobile-actions-inline #shareBtnMobile,
    .news-summary-container .mobile-actions-inline .share-btn-mobile {
        width: auto !important;
        height: auto !important;
        min-height: 36px !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Force the inline actions row to push the share button to the right */
    .news-summary-container .mobile-actions-inline { display:flex !important; }
    .news-summary-container .mobile-actions-inline #shareBtnMobile,
    .news-summary-container .mobile-actions-inline .share-btn-mobile {
        margin-left: auto !important;
        margin-right: 0 !important;
    }

    /* Tighten overall spacing for mobile readability */
    .news-featured-content { flex-direction: column !important; gap: 10px !important; }
    .news-featured-img { width: 100% !important; height: auto !important; border-radius: 12px !important; }
}

/* Mobile tweak: make the centered share button taller and move it slightly down */


/* Mobile-only nice overrides (do not change desktop layout) */
@media (max-width: 700px) {
    .mobile-carousel { display: block !important; width: 92vw; max-width:92vw; margin: 8px auto 16px auto; }
    .mobile-carousel-inner { position: relative; overflow: hidden; }
    .mobile-carousel-item { display: none; text-align: center; }
    .mobile-carousel-item.active { display: block; }
    .mobile-carousel-item img { width: 88vw; max-width:88vw; height: auto; border-radius: 14px; object-fit: cover; display:block; margin: 0 auto; }
    .mobile-carousel-prev, .mobile-carousel-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45); color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
    .mobile-carousel-prev { left: 10px; }
    .mobile-carousel-next { right: 10px; }
    .news-img-desktop { display: none !important; }
    .news-summary-container { padding: 12px 8px !important; max-width: 98vw !important; }
    .news-summary-title { font-size: 1.45rem !important; padding: 0 6px; }
    .news-summary-date, .news-featured-title { padding: 0 6px; }
    .news-featured-desc { padding: 0 12px !important; }
    .news-list { display: block !important; width: 100% !important; margin-top: 12px !important; }
    .share-btn, #shareBtn { width: auto; padding: 10px 20px; }
}

/* Ensure top weather widget inside main news container uses full container width */
@media (max-width:700px) {
    .news-summary-container > #weather-widget-mobile { width: 100% !important; box-sizing: border-box !important; margin: 20px 0 12px 0 !important; }
}

/* Added: force 20px top margin for news container and weather gauge */
.news-detail-flex { margin-top: 20px !important; }
#weather-widget-mobile, .weather-widget-desktop, .news-summary-container > #weather-widget-mobile { margin-top: 20px !important; }