/* 
 * Smiley Storytelling Images + Mi Historia Section
 * Branding: #ff0000 (rojo) + #33cc33 (verde)
 * Version: 3.0
 */

/* ============================================
   SECCIÓN MI HISTORIA - Layout 60/40
   Dimensiones: 1400px × 850px
   ============================================ */

.mi-historia-section {
    max-width: 1400px;
    min-height: 850px;
    margin: 4rem auto;
    padding: 3rem;
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.mi-historia-container {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

/* ============================================
   60% IZQUIERDA: Contenido de Historia
   ============================================ */

.historia-content {
    padding-right: 2rem;
}

.historia-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.25);
}

.historia-titulo {
    font-size: 3rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.historia-subtitulo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.historia-paragraphs {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
}

.historia-paragraphs p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.historia-paragraphs p:last-child {
    margin-bottom: 0;
}

/* ============================================
   40% DERECHA: Timeline (Plugin existente)
   ============================================ */

.historia-timeline {
    position: sticky;
    top: 2rem;
}

/* Ajustes para timeline dentro de Mi Historia */
.mi-historia-section .smiley-story-v2 {
    max-width: 100%;
    margin: 0;
    border-width: 4px;
}

.mi-historia-section .story-main-container {
    aspect-ratio: 3 / 4;
    min-height: 500px;
}

/* ============================================
   CITA FULL WIDTH
   ============================================ */

.historia-cita {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 6px solid #33cc33;
    padding: 2.5rem 3rem;
    border-radius: 1rem;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.historia-cita blockquote {
    margin: 0;
    font-size: 1.5rem;
    font-style: italic;
    color: #2c3e50;
    line-height: 1.8;
    position: relative;
}

.historia-cita blockquote::before {
    content: '"';
    position: absolute;
    left: -2rem;
    top: -1rem;
    font-size: 6rem;
    color: #33cc33;
    opacity: 0.2;
    font-family: Georgia, serif;
}

.historia-cita cite {
    display: block;
    margin-top: 1.5rem;
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 600;
    color: #ff0000;
    text-align: right;
}

/* ============================================
   CTA BUTTON - Rojo → Verde hover
   ============================================ */

.historia-cta {
    text-align: center;
    margin-top: 3rem;
}

.historia-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 3rem;
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.historia-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #33cc33 0%, #28a428 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.historia-button span {
    position: relative;
    z-index: 1;
}

.historia-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(51, 204, 51, 0.4);
}

.historia-button:hover::before {
    opacity: 1;
}

.historia-button:active {
    transform: translateY(-1px);
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */

@media (max-width: 1200px) {
    .mi-historia-section {
        max-width: 100%;
        padding: 2rem;
        min-height: auto;
    }
    
    .mi-historia-container {
        grid-template-columns: 55% 45%;
        gap: 2rem;
    }
    
    .historia-titulo {
        font-size: 2.5rem;
    }
    
    .historia-subtitulo {
        font-size: 1.25rem;
    }
    
    .historia-paragraphs {
        font-size: 1rem;
    }
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

@media (max-width: 768px) {
    .mi-historia-section {
        padding: 1.5rem;
        margin: 2rem auto;
    }
    
    .mi-historia-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .historia-content {
        padding-right: 0;
    }
    
    .historia-timeline {
        position: static;
    }
    
    .historia-titulo {
        font-size: 2rem;
    }
    
    .historia-subtitulo {
        font-size: 1.125rem;
        margin-bottom: 1.5rem;
    }
    
    .historia-paragraphs {
        font-size: 0.9375rem;
    }
    
    .historia-cita {
        padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    }
    
    .historia-cita blockquote {
        font-size: 1.125rem;
    }
    
    .historia-cita blockquote::before {
        left: -1.5rem;
        font-size: 4rem;
    }
    
    .historia-button {
        padding: 1rem 2.5rem;
        font-size: 1rem;
        width: 100%;
    }
}

/* ============================================
   PLUGIN STORYTELLING - Base Styles
   ============================================ */

.smiley-story-v1,
.smiley-story-v2 {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   VERSION 1: Single Image LinkedIn Style
   ============================================ */

.smiley-story-v1 {
    max-width: 500px;
    margin: 0 auto;
}

.smiley-story-v1 .story-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4 !important;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 4px solid #ffffff;
}

.smiley-story-v1 .story-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.smiley-story-v1 .story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 0.85) 0%, 
        rgba(0, 0, 0, 0.4) 30%,
        transparent 50%
    );
}

.smiley-story-v1 .story-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
}

.smiley-story-v1 .story-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.smiley-story-v1 .story-subtitle {
    font-size: 0.875rem;
    opacity: 0.95;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.smiley-story-v1 .story-description {
    font-size: 0.75rem;
    opacity: 0.85;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.smiley-story-v1 .story-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #33cc33;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(51, 204, 51, 0.4);
}

/* ============================================
   VERSION 2: Timeline Story
   ============================================ */

.smiley-story-v2 {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    border: 6px solid #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.smiley-story-v2 .story-main-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4 !important;
    max-height: none;
    min-height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    background: #1F2937;
    margin-bottom: 1rem;
}

.smiley-story-v2 .story-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.smiley-story-v2 .story-main-image.active {
    display: block !important;
    opacity: 1;
    z-index: 1;
}

.smiley-story-v2 .story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 0.75) 0%, 
        rgba(0, 0, 0, 0.1) 15%,
        transparent 25%
    );
    pointer-events: none;
    z-index: 2;
}

.smiley-story-v2 .story-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.smiley-story-v2 .story-content.active {
    display: block !important;
}

.smiley-story-v2 .story-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.9),
        0 0 4px rgba(0, 0, 0, 0.8);
    color: #ffffff;
}

.smiley-story-v2 .story-subtitle {
    font-size: 1rem;
    opacity: 0.98;
    margin-bottom: 0.5rem;
    text-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.9),
        0 0 3px rgba(0, 0, 0, 0.8);
    color: #ffffff;
}

.smiley-story-v2 .story-description {
    font-size: 0.875rem;
    opacity: 0.95;
    line-height: 1.5;
    text-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.9),
        0 0 3px rgba(0, 0, 0, 0.8);
    color: #ffffff;
}

.smiley-story-v2 .story-timeline-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.smiley-story-v2 .story-label {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.smiley-story-v2 .story-year {
    font-size: 1rem;
    opacity: 0.85;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ============================================
   THUMBNAILS
   ============================================ */

.smiley-story-v2 .story-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0;
}

.smiley-story-v2 .story-thumbnail {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #f4f4f4;
}

.smiley-story-v2 .story-thumbnail:hover {
    transform: scale(1.08);
    border-color: #ff0000;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

.smiley-story-v2 .story-thumbnail.active {
    transform: scale(1.1);
    border: 4px solid #33cc33;
    box-shadow: 0 10px 30px rgba(51, 204, 51, 0.6);
}

.smiley-story-v2 .story-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.smiley-story-v2 .thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(0, 0, 0, 0.2) 35%,
        transparent 50%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.smiley-story-v2 .story-thumbnail:hover .thumbnail-overlay {
    opacity: 0;
}

.smiley-story-v2 .thumbnail-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}

.smiley-story-v2 .thumbnail-label {
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.smiley-story-v2 .thumbnail-year {
    color: white;
    opacity: 0.9;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.smiley-story-v2 .story-helper-text {
    text-align: center;
    font-size: 0.875rem;
    color: #6B7280;
    margin-top: 0.75rem;
    padding: 0.5rem;
    font-style: italic;
}

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

@media (max-width: 768px) {
    .smiley-story-v2 {
        max-width: 100%;
        padding: 0.75rem;
        border-width: 4px;
    }
    
    .smiley-story-v2 .story-main-container {
        aspect-ratio: 3 / 4 !important;
        min-height: 350px;
    }
    
    .smiley-story-v2 .story-title {
        font-size: 1.5rem;
    }
    
    .smiley-story-v2 .story-label {
        font-size: 1.25rem;
    }
    
    .smiley-story-v2 .thumbnail-label {
        font-size: 0.75rem;
    }
    
    .smiley-story-v2 .story-thumbnails {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .smiley-story-v2 .story-main-container {
        aspect-ratio: 3 / 4 !important;
        min-height: 300px;
    }
    
    .smiley-story-v2 .story-content {
        padding: 1rem;
    }
    
    .smiley-story-v2 .story-title {
        font-size: 1.25rem;
    }
    
    .smiley-story-v2 {
        padding: 0.5rem;
    }
}