/* ==========================================================================
   Module: Nosotros / Nuestra Historia (Story Section)
   ========================================================================== */

.story-section {
    position: relative;
    padding: clamp(80px, 10vh, 120px) 0 clamp(60px, 8vh, 100px);
    overflow: hidden;
    scroll-margin-top: var(--header-height, 80px);
}

body[data-page="nosotros"] .story-section,
body[data-page="historia"] .story-section {
    padding-top: calc(var(--header-height, 80px) + clamp(48px, 7vh, 80px));
}

.story-header {
    max-width: 860px;
    margin: 0 auto 50px;
    padding-top: clamp(16px, 2.5vh, 32px);
}

.story-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 9999px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #a855f7;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: clamp(20px, 3vh, 36px);
    margin-bottom: 24px;
}

.story-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a855f7;
    box-shadow: 0 0 10px #a855f7;
}

.story-title {
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary, #101828);
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.story-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary, #475467);
    line-height: 1.6;
}

.story-subtitle strong {
    color: var(--text-primary, #0f172a);
}

/* Main Story Card */
.story-main-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(20, 16, 38, 0.95) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 28px;
    padding: clamp(32px, 5vw, 52px);
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.4), 0 0 35px -10px rgba(147, 51, 234, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 48px;
}

.story-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 991px) {
    .story-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.story-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #38bdf8;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.story-card-heading {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.3;
}

.story-highlight {
    background: linear-gradient(135deg, #a855f7, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.story-text {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 22px;
}

.story-text strong {
    color: #f8fafc;
}

/* J C Flow letter boxes */
.story-breakdown {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 28px;
    flex-wrap: wrap;
}

.story-letter-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 16px;
}

.story-letter {
    font-size: 1.6rem;
    font-weight: 900;
    color: #a855f7;
    line-height: 1;
}

.story-letter-info {
    display: flex;
    flex-direction: column;
}

.story-letter-info strong {
    font-size: 0.95rem;
    color: #ffffff;
}

.story-letter-info span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.story-plus {
    font-size: 1.3rem;
    font-weight: 700;
    color: #64748b;
}

/* Quote */
.story-quote {
    position: relative;
    border-left: 3px solid #a855f7;
    padding: 16px 20px;
    margin: 24px 0;
    background: rgba(168, 85, 247, 0.08);
    border-radius: 0 12px 12px 0;
}

.story-quote p {
    font-style: italic;
    color: #e2e8f0;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Visual Chibi Character side */
.story-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-character-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.story-character-img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 25px rgba(168, 85, 247, 0.3));
    transition: transform 0.3s ease;
}

.story-character-wrapper:hover .story-character-img {
    transform: scale(1.03);
}

.story-character-caption {
    margin-top: 14px;
    padding: 6px 16px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 3 Pillars Grid */
.story-pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

@media (max-width: 900px) {
    .story-pillars-grid {
        grid-template-columns: 1fr;
    }
}

.story-pillar-card {
    position: relative;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(20, 16, 38, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.story-pillar-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5), 0 0 25px -8px rgba(147, 51, 234, 0.25);
}

.story-pillar-card--featured {
    background: linear-gradient(165deg, rgba(28, 20, 56, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: rgba(168, 85, 247, 0.4);
}

.story-pillar-chibi {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    height: 120px;
    align-items: flex-end;
}

.story-chibi-badge {
    height: 110px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.6));
    transition: transform 0.25s ease;
}

.story-pillar-card:hover .story-chibi-badge {
    transform: scale(1.08) translateY(-4px);
}

.story-pillar-icon-box {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    margin-bottom: 16px;
    color: #38bdf8;
    font-size: 3rem;
}

.story-pillar-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
    margin-bottom: 12px;
}

.story-pillar-tag--fire {
    background: rgba(168, 85, 247, 0.2);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.story-pillar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.35;
}

.story-pillar-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.story-pillar-desc strong {
    color: #e2e8f0;
}

.story-pillar-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 500;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.story-pillar-feature i {
    color: #10b981;
}

/* CTA Box */
.story-cta-box {
    background: linear-gradient(135deg, rgba(24, 18, 48, 0.95) 0%, rgba(13, 22, 38, 0.95) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 24px;
    padding: clamp(28px, 4vw, 44px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.6);
}

@media (max-width: 820px) {
    .story-cta-box {
        flex-direction: column;
        text-align: center;
    }
}

.story-cta-text h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.story-cta-text p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0;
}

.story-cta-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}


/* --- Manifesto Hermano Mayor --- */
.story-manifesto-wrap {
    margin: 80px 0 60px;
}

.story-manifesto-header {
    max-width: 780px;
    margin: 0 auto 44px;
}

.story-subbadge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.story-manifesto-title {
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 800;
    color: var(--text-primary, #101828);
    line-height: 1.3;
    margin-bottom: 14px;
}

.story-manifesto-desc {
    color: var(--text-secondary, #475467);
    font-size: 1.05rem;
    line-height: 1.6;
}

.story-manifesto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 820px) {
    .story-manifesto-grid {
        grid-template-columns: 1fr;
    }
}

.manifesto-card {
    position: relative;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(22, 18, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 36px 30px;
    transition: transform 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.manifesto-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.35);
}

.manifesto-card-num {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
    pointer-events: none;
}

.manifesto-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c084fc;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.manifesto-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.35;
}

.manifesto-card-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* --- Tabla Comparativa --- */
.story-comparison-box {
    margin: 70px 0 60px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(20, 16, 38, 0.95) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 24px;
    padding: clamp(32px, 5vw, 48px);
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.5);
}

.story-comparison-header {
    max-width: 700px;
    margin: 0 auto 36px;
}

.story-comparison-title {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
}

.story-comparison-subtitle {
    color: #94a3b8;
    font-size: 1rem;
}

.story-table-responsive {
    overflow-x: auto;
}

.story-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.story-table th {
    padding: 16px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.story-table th.col-traditional {
    color: #f87171;
}

.story-table th.col-jcflow {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.08);
    border-radius: 8px 8px 0 0;
}

.story-table td {
    padding: 18px 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.story-table td:first-child strong {
    color: #ffffff;
}

.story-table td:last-child {
    background: rgba(168, 85, 247, 0.04);
}

.story-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.story-table tbody tr:hover td:last-child {
    background: rgba(168, 85, 247, 0.08);
}

.text-danger {
    color: #fca5a5 !important;
}

.text-success {
    color: #86efac !important;
}


.story-manifesto-chibi-badge {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.story-team-svg {
    max-height: 150px;
    width: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
    transition: transform 0.3s ease;
}

.story-team-svg:hover {
    transform: scale(1.06);
}
