/* ============================================
   WEB STORIES - Paper Depot Style
   Diseño de carrusel con tarjetas tipo revista
   Colores: Rojo #d22b4f, Amarillo #fdbb28, Azul #3873b7
   ============================================ */

/* Section Container */
.paper-stories-section {
    padding: 60px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    overflow: hidden;
    position: relative;
}

.paper-stories-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d22b4f 0%, #d22b4f 33.33%, #fdbb28 33.33%, #fdbb28 66.66%, #3873b7 66.66%, #3873b7 100%);
}

.paper-stories-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header Styles */
.paper-stories-header {
    text-align: center;
    margin-bottom: 40px;
}

.paper-stories-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.paper-stories-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #d22b4f 0%, #fdbb28 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(210, 43, 79, 0.3);
}

.paper-stories-icon i {
    font-size: 24px;
    color: white;
}

.paper-stories-title {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
    letter-spacing: -0.5px;
}

.paper-tiktok-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #000;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.paper-tiktok-link i {
    font-size: 16px;
}

.paper-tiktok-link:hover {
    background: linear-gradient(135deg, #25F4EE 0%, #FE2C55 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.paper-stories-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* Swiper Container */
.paper-stories-swiper {
    position: relative;
    padding: 20px 0 60px;
    overflow: visible !important;
    max-width: 1100px;
    margin: 0 auto;
}

.paper-stories-swiper .swiper-wrapper {
    padding: 10px 0;
    display: flex;
    justify-content: center;
}

.paper-stories-swiper .swiper-slide {
    width: 240px;
    height: auto;
    flex-shrink: 0;
}

/* Story Card - Paper Depot Style */
.paper-story-card {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.paper-story-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 25px 50px rgba(210, 43, 79, 0.2),
        0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Story Number Badge */
.paper-story-number {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #d22b4f 0%, #fdbb28 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(210, 43, 79, 0.4);
    transform: rotate(-5deg);
    transition: all 0.3s ease;
}

.paper-story-card:hover .paper-story-number {
    transform: rotate(0deg) scale(1.1);
}

/* Animated Border */
.paper-story-border {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(135deg, #d22b4f, #fdbb28, #3873b7, #d22b4f);
    background-size: 300% 300%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: borderGradient 4s linear infinite;
    z-index: 5;
}

.paper-story-card:hover .paper-story-border {
    opacity: 1;
}

@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Skeleton Loader */
.paper-story-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: paperLoading 1.5s infinite;
    z-index: 1;
    transition: opacity 0.3s ease;
}

@keyframes paperLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Video */
.paper-story-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: transform 0.6s ease;
}

.paper-story-card:hover .paper-story-video {
    transform: scale(1.05);
}

/* Overlay */
.paper-story-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 80px 20px 20px;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 40%,
        transparent 100%);
    z-index: 3;
    pointer-events: none;
}

.paper-story-content {
    color: white;
}

.paper-story-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.paper-story-description {
    font-size: 13px;
    margin: 0;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Badges */
.paper-story-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 4;
}

.paper-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.paper-badge-duration {
    background: rgba(210, 43, 79, 0.9);
    color: white;
}

.paper-badge-views {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.paper-badge i {
    font-size: 10px;
}

/* Play Button */
.paper-story-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    opacity: 0;
    transition: all 0.3s ease;
}

.paper-story-card:hover .paper-story-play {
    opacity: 1;
}

.paper-play-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #d22b4f 0%, #fdbb28 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(210, 43, 79, 0.5);
    transition: transform 0.3s ease;
}

.paper-play-btn:hover {
    transform: scale(1.1);
}

.paper-play-btn i {
    font-size: 22px;
    color: white;
    margin-left: 4px;
}

/* Navigation Arrows */
.paper-stories-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.paper-stories-nav:hover {
    background: #d22b4f;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 30px rgba(210, 43, 79, 0.4);
}

.paper-stories-nav i {
    font-size: 18px;
    color: #374151;
    transition: color 0.3s ease;
}

.paper-stories-nav:hover i {
    color: white;
}

.paper-stories-prev {
    left: 0;
}

.paper-stories-next {
    right: 0;
}

.paper-stories-nav.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Pagination */
.paper-stories-pagination {
    position: absolute;
    bottom: 10px !important;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.paper-stories-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #d1d5db;
    opacity: 1;
    transition: all 0.3s ease;
}

.paper-stories-pagination .swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 5px;
    background: linear-gradient(90deg, #d22b4f 0%, #fdbb28 100%);
}

/* ============================================
   MODAL - Paper Depot Style
   ============================================ */

.paper-story-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.paper-story-modal.active {
    display: flex;
}

.paper-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.paper-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 90vh;
    max-height: 900px;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.paper-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    z-index: 10;
}

.paper-modal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.paper-modal-logo {
    height: 32px;
    width: auto;
}

.paper-modal-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.paper-modal-close:hover {
    background: #d22b4f;
    transform: rotate(90deg);
}

/* Modal Video Container */
.paper-modal-video-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.paper-modal-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Modal Navigation */
.paper-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 5;
}

.paper-modal-nav:hover {
    background: #d22b4f;
    transform: translateY(-50%) scale(1.1);
}

.paper-modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.paper-modal-prev {
    left: 16px;
}

.paper-modal-next {
    right: 16px;
}

/* Modal Info */
.paper-modal-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 24px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 100%);
    color: white;
    z-index: 10;
}

.paper-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}

.paper-modal-description {
    font-size: 14px;
    opacity: 0.85;
    margin: 0 0 16px;
    line-height: 1.5;
}

.paper-modal-product-link {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #d22b4f 0%, #fdbb28 100%);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(210, 43, 79, 0.4);
}

.paper-modal-product-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(210, 43, 79, 0.5);
    color: white;
    text-decoration: none;
}

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

@media (max-width: 992px) {
    .paper-stories-section {
        padding: 48px 0;
    }

    .paper-stories-title {
        font-size: 30px;
    }

    .paper-stories-swiper .swiper-slide {
        width: 220px;
    }

    .paper-story-card {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .paper-stories-section {
        padding: 40px 0;
    }

    .paper-stories-container {
        padding: 0 16px;
    }

    .paper-stories-title-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .paper-stories-title {
        font-size: 26px;
    }

    .paper-stories-icon {
        width: 42px;
        height: 42px;
    }

    .paper-stories-icon i {
        font-size: 20px;
    }

    .paper-stories-subtitle {
        font-size: 14px;
    }

    .paper-stories-swiper .swiper-slide {
        width: 180px;
    }

    .paper-story-card {
        height: 300px;
    }

    .paper-story-number {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .paper-stories-nav {
        width: 42px;
        height: 42px;
    }

    .paper-stories-nav i {
        font-size: 16px;
    }

    .paper-modal-content {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .paper-modal-nav {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .paper-stories-section {
        padding: 32px 0;
    }

    .paper-stories-title {
        font-size: 22px;
    }

    .paper-stories-swiper {
        padding-left: 16px;
        padding-right: 16px;
        overflow: visible !important;
    }

    .paper-stories-swiper .swiper-wrapper {
        justify-content: flex-start;
    }

    .paper-stories-swiper .swiper-slide {
        width: 140px;
    }

    .paper-story-card {
        height: 220px;
        border-radius: 14px;
    }

    .paper-story-number {
        width: 28px;
        height: 28px;
        font-size: 11px;
        top: -4px;
        left: -4px;
        border-radius: 8px;
    }

    .paper-story-title {
        font-size: 14px;
    }

    .paper-story-description {
        font-size: 12px;
    }

    .paper-play-btn {
        width: 50px;
        height: 50px;
    }

    .paper-play-btn i {
        font-size: 18px;
    }

    .paper-stories-nav {
        width: 36px;
        height: 36px;
    }

    .paper-stories-nav i {
        font-size: 14px;
    }

    .paper-modal-title {
        font-size: 18px;
    }

    .paper-modal-description {
        font-size: 13px;
    }
}
