/**
 * Guía Turismo Feed - Frontend Styles
 * 
 * Estilos para el carousel de posts compatible con Elementor
 */

/* Wrapper principal */
.gtf-carousel-wrapper {
    position: relative;
    width: 100%;
}

/* Carousel Swiper */
.gtf-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.gtf-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.gtf-carousel .swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
}

/* Post Card Styles */
.gtf-post-card {
    background: #f8f8f8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 450px;
}

.gtf-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Sin overlay - la imagen es el fondo completo */
.gtf-post-overlay {
    display: none;
}

/* Date Box - Flotante en esquina superior izquierda */
.gtf-post-date-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    text-align: center;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gtf-post-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gtf-date-month {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.gtf-date-day {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #333333;
    line-height: 1;
}

/* Content - Card blanca en la parte inferior */
.gtf-post-content {
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 2;
    min-height: 140px;
}

.gtf-post-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999999;
    margin-bottom: 10px;
}

.gtf-post-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.gtf-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.gtf-post-title a:hover {
    color: #666666;
}

/* Navigation Buttons - OCULTAS POR DEFECTO */
.gtf-carousel-wrapper .elementor-swiper-button {
    display: none !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gtf-carousel-wrapper .elementor-swiper-button:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.gtf-carousel-wrapper .elementor-swiper-button.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gtf-carousel-wrapper .gtf-button-prev {
    left: -22px;
}

.gtf-carousel-wrapper .gtf-button-next {
    right: -22px;
}

.gtf-carousel-wrapper .elementor-swiper-button svg {
    width: 20px;
    height: 20px;
    fill: #333;
}

/* Pagination */
.gtf-pagination {
    text-align: center;
    margin-top: 30px;
    position: relative;
}

.gtf-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #333333;
    opacity: 0.3;
    margin: 0 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gtf-pagination .swiper-pagination-bullet:hover {
    opacity: 0.6;
}

.gtf-pagination .swiper-pagination-bullet-active {
    background: #333333;
    opacity: 1;
    width: 30px;
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 1024px) {
    .gtf-post-title {
        font-size: 18px;
    }
    
    .gtf-carousel-wrapper .gtf-button-prev {
        left: 0;
    }
    
    .gtf-carousel-wrapper .gtf-button-next {
        right: 0;
    }
}

@media (max-width: 768px) {
    .gtf-post-date-box {
        padding: 10px 15px;
        top: 15px;
        left: 15px;
        border-width: 2px;
    }
    
    .gtf-date-month {
        font-size: 10px;
        margin-bottom: 3px;
    }
    
    .gtf-date-day {
        font-size: 28px;
    }
    
    .gtf-post-content {
        padding: 20px;
        min-height: 120px;
    }
    
    .gtf-post-title {
        font-size: 16px;
    }
    
    .gtf-post-card {
        min-height: 380px;
    }
    
    .gtf-carousel-wrapper .elementor-swiper-button {
        width: 40px;
        height: 40px;
    }
    
    .gtf-carousel-wrapper .elementor-swiper-button svg {
        width: 18px;
        height: 18px;
    }
}

/* Elementor Editor Specific */
.elementor-editor-active .gtf-carousel-wrapper {
    overflow: visible;
}

/* Loading State */
.gtf-carousel-wrapper.loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gtf-carousel-wrapper.loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: gtf-spin 1s linear infinite;
}

@keyframes gtf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RTL Support */
[dir="rtl"] .gtf-carousel-wrapper .gtf-button-prev {
    left: auto;
    right: -22px;
}

[dir="rtl"] .gtf-carousel-wrapper .gtf-button-next {
    right: auto;
    left: -22px;
}

[dir="rtl"] .gtf-carousel-wrapper .gtf-button-prev svg {
    transform: scaleX(-1);
}

[dir="rtl"] .gtf-carousel-wrapper .gtf-button-next svg {
    transform: scaleX(-1);
}
