/**
 * Estilos para Homepage
 * Radio Presidente Ibáñez
 */

/* ==========================================================================
   HOMEPAGE GENERAL
   ========================================================================== */

.homepage-container {
    width: 100%;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* Layout con sidebar en homepage */
.homepage-content-wrap {
    display: flex;
    width: 95%;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    gap: 25px;
    align-items: flex-start;
}

.homepage-main-content {
    flex: 1;
    min-width: 0;
}

.homepage-sidebar {
    flex: 0 0 400px;
    width: 400px;
    max-width: 400px;
    min-width: 400px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 32px;
    color: #333;
    font-weight: bold;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: #ff8c00;
}

.section-link {
    color: #ff8c00;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.section-link:hover {
    color: #e67e00;
}

/* ==========================================================================
   SECCIÓN HERO / SLIDER
   ========================================================================== */

.hero-section {
    width: 100%;
    max-width: 100%;
    background-color: #000;
    margin-bottom: 0;
    overflow: hidden;
    padding: 0;
}

.hero-main-wrapper {
    display: flex;
    width: 100%;
    max-width: 100%;
    height: 600px;
    background-color: #000;
    margin: 0;
}

.hero-slider-column {
    flex: 0 0 70%;
    position: relative;
    overflow: hidden;
    height: 600px;
    background-color: #000;
}

.hero-buttons-column {
    flex: 0 0 30%;
    background: #e8e8e8;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

/* Video Streaming */
.hero-video-container {
    width: 100%;
    text-align: center;
}

.video-title {
    color: #2b2b2b;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding: 0 10px;
    letter-spacing: 0.5px;
}

.hero-video-container video {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Botones horizontales */
.hero-buttons-horizontal {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.hero-action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 20px 10px;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    color: #2b2b2b;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero-action-button:hover {
    background: #ff8c00;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.3);
}

.hero-action-button svg {
    color: #ff8c00;
    transition: color 0.3s;
}

.hero-action-button:hover svg {
    color: #ffffff;
}

.hero-action-button span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-slider-column .hero-slider {
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 600px;
    display: flex;
    align-items: flex-end;
    padding: 60px;
}

.hero-content-inner {
    max-width: 700px;
}

.hero-category {
    display: inline-block;
    background-color: #ff8c00;
    color: #ffffff;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-radius: 3px;
}

.hero-title {
    font-size: 42px;
    color: #ffffff;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.hero-title a:hover {
    color: #ff8c00;
}

.hero-excerpt {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.6;
}

.hero-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ff8c00;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.hero-button:hover {
    background-color: #e67e00;
}

/* Controles del slider */
.hero-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 140, 0, 0.8);
    color: #ffffff;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    z-index: 3;
    transition: background-color 0.3s;
}

.hero-controls button:hover {
    background-color: rgba(255, 140, 0, 1);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

/* Indicadores */
.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.hero-dot.active,
.hero-dot:hover {
    background-color: #ff8c00;
}

/* ==========================================================================
   SECCIÓN ÚLTIMAS NOTICIAS
   ========================================================================== */

.latest-news-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.latest-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.news-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-card-image img {
    transform: scale(1.1);
}

.news-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #ff8c00;
    color: #ffffff;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
}

.news-card-content {
    padding: 20px;
}

.news-card-meta {
    margin-bottom: 10px;
}

.news-card-date {
    color: #999;
    font-size: 13px;
}

.news-card-title {
    font-size: 20px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.news-card-title a:hover {
    color: #ff8c00;
}

.news-card-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================================================
   SECCIÓN CATEGORÍAS DESTACADAS
   ========================================================================== */

.featured-categories-section {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.category-block {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #ff8c00;
}

.category-block-title {
    font-size: 24px;
    margin: 0;
}

.category-block-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.category-block-title a:hover {
    color: #ff8c00;
}

.category-block-link {
    color: #ff8c00;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.category-post {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.category-post:last-child {
    border-bottom: none;
}

.category-post.featured {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    padding-bottom: 20px;
}

.category-post-image {
    flex: 0 0 150px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
}

.category-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-post-content {
    flex: 1;
}

.category-post-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.category-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.category-post-title a:hover {
    color: #ff8c00;
}

.category-post-excerpt {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.category-post-date {
    color: #999;
    font-size: 12px;
}

/* ==========================================================================
   SECCIÓN MULTIMEDIA / VIDEOS
   ========================================================================== */

.multimedia-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.multimedia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.multimedia-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.multimedia-card:hover {
    transform: translateY(-5px);
}

.multimedia-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background-color: #000;
}

.multimedia-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.multimedia-card:hover .multimedia-card-image img {
    opacity: 0.8;
}

.multimedia-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: transform 0.3s;
}

.multimedia-card:hover .multimedia-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

.multimedia-card-content {
    padding: 15px;
}

.multimedia-card-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.multimedia-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.multimedia-card-title a:hover {
    color: #ff8c00;
}

.multimedia-card-meta {
    color: #999;
    font-size: 13px;
}

/* ==========================================================================
   SECCIÓN BANNER PUBLICITARIO
   ========================================================================== */

.advertising-section,
.banner-section {
    padding: 40px 0;
    background-color: #f5f5f5;
    text-align: center;
}

.banner-section .section-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-section .widget,
.advertising-section .widget {
    display: inline-block;
    max-width: 100%;
    text-align: center;
}

.banner-section img,
.advertising-section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.advertising-banner {
    text-align: center;
    width: 100%;
}

.advertising-placeholder,
.banner-placeholder {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    padding: 60px 20px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    margin: 0 auto;
    max-width: 970px;
}

.advertising-placeholder p,
.banner-placeholder p {
    color: #999;
    margin: 5px 0;
}

.banner-placeholder a {
    color: #ff8c00;
    text-decoration: underline;
}

/* ==========================================================================
   SECCIÓN GALERÍA DE FOTOS
   ========================================================================== */

.photo-gallery-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gallery-item-link {
    display: block;
    text-decoration: none;
}

.gallery-item-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.gallery-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-item-image img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-icon {
    margin-bottom: 10px;
}

.gallery-item-title {
    color: #ffffff;
    font-size: 16px;
    text-align: center;
    margin-bottom: 5px;
}

.gallery-item-date {
    color: #ffffff;
    font-size: 12px;
}

/* ==========================================================================
   SECCIÓN REDES SOCIALES Y CONTACTO (Ahora en el Footer Global)
   ========================================================================== */

.social-contact-section {
    padding: 50px 0 30px 0;
    background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%);
    margin-top: 0;
}

/* Cuando está en el homepage, agregar margen superior */
.homepage-container .social-contact-section {
    padding: 60px 0;
}

.social-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.social-block,
.contact-block,
.live-radio-block {
    color: #ffffff;
}

.social-block-title,
.contact-block-title,
.live-radio-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ff8c00;
}

.social-block-text,
.live-radio-text {
    color: #cccccc;
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: #ff8c00;
    transform: translateX(5px);
}

.social-link.facebook:hover { background-color: #1877f2; }
.social-link.twitter:hover { background-color: #1da1f2; }
.social-link.instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-link.youtube:hover { background-color: #ff0000; }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #cccccc;
}

.contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
    fill: #ff8c00;
}

.btn-live-radio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background-color: #ff8c00;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-live-radio:hover {
    background-color: #e67e00;
}

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

/* Tablet específico (768px - 1024px) - Hero full width */
@media (min-width: 768px) and (max-width: 1024px) {
    body {
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .site-container {
        overflow-x: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .homepage-container {
        overflow-x: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    body .homepage-container .hero-section {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateX(0) !important;
    }
    
    body .homepage-container .hero-main-wrapper {
        width: 100vw !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

@media (max-width: 1024px) {
    /* Secciones en una columna para tablet */
    .latest-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .multimedia-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* Posts de categorías en formato vertical */
    .category-post.featured {
        flex-direction: column;
    }
    
    .category-post-image {
        flex: 0 0 auto;
        height: 200px;
        width: 100%;
    }
    
    /* Ajustar títulos de sección */
    .section-title {
        font-size: 26px;
    }
    
    /* Sidebar en homepage */
    .homepage-content-wrap {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }
    
    .homepage-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        position: static;
    }
    
    .homepage-main-content {
        width: 100%;
    }
    
    /* Hero section en tablet - layout vertical */
    .homepage-container .hero-section {
        width: 100vw !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        box-sizing: border-box !important;
    }
    
    .homepage-container .hero-main-wrapper {
        flex-direction: column;
        height: auto;
        width: 100vw !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .hero-slider-column {
        flex: 1;
        width: 100% !important;
        max-width: none !important;
        height: 450px;
        padding: 0 !important;
    }
    
    .hero-slide {
        height: 450px;
    }
    
    .hero-image,
    .hero-overlay,
    .hero-content {
        height: 450px;
    }
    
    .hero-content {
        padding: 35px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-buttons-column {
        flex: 1;
        width: 100% !important;
        max-width: none !important;
        padding: 30px 20px;
        box-sizing: border-box !important;
    }
    
    .video-title {
        font-size: 14px;
    }
    
    .hero-action-button {
        padding: 15px 8px;
    }
    
    .hero-action-button span {
        font-size: 10px;
    }
    
    .hero-action-button svg {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Hero section se vuelve vertical */
    .hero-main-wrapper {
        flex-direction: column;
        height: auto;
    }
    
    .hero-slider-column {
        flex: 1;
        width: 100%;
        height: 400px;
    }
    
    .hero-slide {
        height: 400px;
    }
    
    .hero-image,
    .hero-overlay,
    .hero-content {
        height: 400px;
    }
    
    .hero-buttons-column {
        flex: 1;
        width: 100%;
        padding: 30px 20px;
    }
    
    .video-title {
        font-size: 16px;
    }
    
    /* Sidebar en homepage - móvil */
    .homepage-content-wrap {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }
    
    .homepage-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        position: static;
    }
    
    .homepage-main-content {
        width: 100%;
    }
    
    .hero-buttons-horizontal {
        flex-direction: row;
        gap: 15px;
    }
    
    .hero-action-button {
        padding: 20px 15px;
    }
    
    .hero-action-button span {
        font-size: 11px;
    }
    
    .hero-action-button svg {
        width: 40px;
        height: 40px;
    }
    
    .hero-content {
        padding: 30px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-excerpt {
        font-size: 16px;
    }
    
    .hero-controls button {
        padding: 10px 15px;
        font-size: 18px;
    }
    
    .latest-news-grid,
    .multimedia-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-post.featured {
        flex-direction: column;
    }
    
    .category-post-image {
        flex: 0 0 auto;
        height: 150px;
        width: 100%;
    }
    
    .social-contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Hero más pequeño en móvil */
    .hero-slider-column {
        height: 300px;
    }
    
    .hero-slide {
        height: 300px;
    }
    
    .hero-image,
    .hero-overlay,
    .hero-content {
        height: 300px;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .hero-excerpt {
        font-size: 14px;
        display: none; /* Ocultar excerpt en móvil pequeño */
    }
    
    .hero-button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .hero-controls button {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .hero-prev {
        left: 10px;
    }
    
    .hero-next {
        right: 10px;
    }
    
    .video-title {
        font-size: 14px;
    }
    
    .hero-buttons-horizontal {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-action-button {
        width: 100%;
        padding: 15px;
    }
    
    .hero-action-button span {
        font-size: 12px;
    }
    
    .hero-action-button svg {
        width: 35px;
        height: 35px;
    }
    
    .section-title {
        font-size: 20px;
    }
}
