html {
    font-size: clamp(15px, 4vw, 18px);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}
body {
    min-height: 100vh;
    margin: 0;
    padding: 40px;
    overflow-x: hidden;

    background:
        linear-gradient(
            120deg,
            #d80032,
            #ff003c,
            #ff7a00,
            #ff005d,
            #7b002c
        ),
        linear-gradient(
            240deg,
            #ff003c,
            #ff7a00,
            #d80032,
            #ff005d
        ),
        linear-gradient(
            60deg,
            #7b002c,
            #ff005d,
            #ff7a00,
            #d80032
        );

    background-size: 400% 400%;
    animation: gradientFlow 14s linear infinite;
}


@keyframes gradientFlow {
    0% {
        background-position:
            0% 50%,
            100% 50%,
            50% 0%;
    }
    50% {
        background-position:
            100% 50%,
            0% 50%,
            50% 100%;
    }
    100% {
        background-position:
            0% 50%,
            100% 50%,
            50% 0%;
    }
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: linear-gradient(rgb(255 255 255 / 31%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 26%) 1px, transparent 1px);
    background-size: 99px 98px;
    animation: gridDrift 40s linear infinite;
    mix-blend-mode: overlay;
}
@keyframes gridDrift {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 200px 200px, 200px 200px;
    }
}

body::before {
    content: "";
    position: fixed;
    inset: -20%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255,255,255,0.18),
        transparent 50%
    );
    animation: glowMove 9s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes glowMove {
    from { transform: translate(-5%, -5%); }
    to   { transform: translate(5%, 5%); }
}




.hero {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    background-color: white; /* fondo blanco de la card */
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    overflow: hidden;
}

/* Imagen de fondo semitransparente */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(assets/fondos/hero.png) center/cover no-repeat;
    opacity: 0.5; /* solo la imagen con opacidad */
    z-index: 0;
}

/* Contenido por encima de la imagen */
.hero-header,
.hero-content {
    position: relative;
    z-index: 1;
}


/* HEADER */
.hero-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo {
    height: 60px;
}

.hero-header nav a {
    margin-left: 24px;
    text-decoration: none;
    color: #111;
    font-weight: 500;
}

/* CONTENIDO */
.hero-content {
    justify-self: center;
    text-align: center;
    margin: 40px 0;
}
.tag {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    margin-bottom: 18px;
}

.hero-content h1 {
    font-size: 44px;
    line-height: 1.15;
    margin-bottom: 16px;
    color: #ffffff;
    text-shadow: 1px 1px 8px #333;
}

.hero-content p {
    color: #555;
    margin-bottom: 28px;
    font-size: 16px;
}

.hero-content button {
    background: #ffffff;
    color: #101010;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    margin: 20px 0;
    box-shadow: 1px 1px 8px #333;
}
.hero-content button:hover {
    opacity: .9;
}
h3.fade {
    margin-bottom: 6px;
    color: #fff;
    text-shadow: 1px 1px 8px #333;
}

.hero-disclaimer {
    margin-top: 20px;
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.45;
    color: #222;
    background: #ffffff;
    border-radius: 12px;
    border-left: 4px solid #bd1433;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    position: relative;
    z-index: 20;
}


/* ===== LAYOUT GENERAL ===== */
.layout {
    display: grid;
    grid-template-columns: 220px 1fr 300px;
    gap: 30px;
    max-width: 1300px;
    margin: 60px auto;
    padding: 0 20px;
}

/* ===== ASIDE IZQUIERDO ===== */
.aside-left .placeholder {
    background: #f4f4f4;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    color: #777;
}

/* ===== HISTORIAS ===== */
.stories {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.story-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.story-card h2 {
    margin-bottom: 10px;
    font-size: 22px;
    color: #0b0f1a;
}

.story-card p {
    color: #555;
    line-height: 1.6;
}

/* ===== ASIDE DERECHO STICKY ===== */
.aside-right {
    position: relative;
}

.sticky-card {
    position: sticky;
    top: 30px;
    background: #0b0f1a;
    color: #fff;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

.sticky-card h3 {
    margin-bottom: 12px;
}

.sticky-card p {
    font-size: 14px;
    opacity: .9;
    margin-bottom: 20px;
}

.sticky-card button {
    width: 100%;
    background: #ffffff;
    color: #0b0f1a;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .aside-left,
    .aside-right {
        display: none;
    }
}
.add-anecdote-btn {
    background-color: #ee2142;
    color: #fff;
    font-weight: 700;
    border: 1px solid #bd001e;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    width: 40%;
}
.add-anecdote-btn:hover {
    opacity: 0.9;
    transform: scale(1.1);
}
.story-versions {
    margin-top: 20px;
    padding-left: 15px;
    border-left: 3px solid #bd1433;
}

.story-version {
    background: #fafafa;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.story-version small {
    color: #888;
}


/* analizar luego */

        .story-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #777;
}

.story-tags {
    display: flex;
    gap: 6px;
}

.tag {
    background: #f2dede;
    color: #bd1433;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.story-meta-bottom {
    margin-top: 10px;
    max-width: max-content;
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.story-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    max-width: 80%;
    justify-self: self-end;
}

.alt-version-btn {
    flex: 1;
    background: #bd1433;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all ease .5s;
}
.alt-version-btn:hover {
    transform: scale(1.1);
}
.report-btn {
    background: transparent;
    color: #999;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .5s ease;
}
.report-btn:hover {
    background: #373737;
    color: #fff;
    transform: scale(1.1);
}
.like-btn.liked {
    background: #f8c1cc;       /* rosadito */
    border-radius: 999px;      /* bien redondeado */
    padding: 6px 12px;
    cursor: default;
    opacity: 0.85;
}

.like-btn.liked:hover {
    background: #f8c1cc;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;   /* ✅ CLAVE */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}


.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}


.report-btn.disabled {
    cursor: not-allowed;
    background: #eee;
    color: #aaa;
    border-color: #ddd;
}

.report-btn.disabled:hover {
    transform: none;
    background: #eee;
    color: #aaa;
}
#saveVersion:hover {
    transform: scale(1.05);
}


/* footer */
.site-footer {
    background: #0f0f0f;
    color: #ddd;
    padding: 40px 20px 20px;
    margin-top: 80px;
    position: absolute;
    z-index: 4;
    left: 0px;
    width: 100%;
}
.footer-content {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.footer-brand img {
    width: 48px;
    margin-bottom: 10px;
}

.footer-brand h3 {
    margin: 0;
    color: #bd1433;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.85;
}

.footer-links h4,
.footer-disclaimer h4 {
    margin-bottom: 10px;
    color: #fff;
}

.footer-links a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #bd1433;
}

.footer-disclaimer p {
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.8;
}

.footer-age {
    display: inline-block;
    margin-top: 10px;
    background: #bd1433;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #222;
    font-size: 0.85rem;
    opacity: 0.6;
}


/*mobile responsive */

/* ===== MOBILE OPTIMIZATION ===== */
@media (max-width: 600px) {

    body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: linear-gradient(120deg, #d80032, #ff003c, #ff7a00, #ff005d, #7b002c), linear-gradient(240deg, #ff003c, #ff7a00, #d80032, #ff005d), linear-gradient(60deg, #7b002c, #ff005d, #ff7a00, #d80032);
    background-size: 400% 400%;
    animation: gradientFlow 14s linear infinite;
    padding: 0;
}

    /* HERO */
    .hero {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    background-color: white;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    overflow: hidden;
}

    .hero-content h1 {
    font-size: 4rem;
    line-height: 1.15;
    margin-bottom: 16px;
    color: #ffffff;
    text-shadow: 1px 1px 8px #333;
}

    .hero-content p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-content button {
    background: #ffffff;
    color: #101010;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    margin: 20px 0;
    box-shadow: 1px 1px 8px #333;
    display: none;
}

    .hero-disclaimer {
    padding: 14px 18px;
    font-size: 1.5rem;
    line-height: 1.45;
    color: #222;
    background: #ffffff;
    border-radius: 12px;
    border-left: 4px solid #bd1433;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 20;
}

    /* STORIES */
    .story-card {
        padding: 18px;
    }

    .story-card h2 {
    margin-bottom: 10px;
    font-size: 3rem;
    color: #0b0f1a;
}

    .story-card p {
    color: #555;
    line-height: 1.6;
    font-size: 2rem;
}

    /* METAS */
    .story-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1.85rem;
    color: #777;
}

    /* BOTONES */
    .story-actions {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    max-width: 80%;
    justify-self: self-end;
}

    .alt-version-btn,
    .report-btn {
        font-size: 0.95rem;
        padding: 12px;
    }
    .report-btn
 {
    background: transparent;
    color: #999;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .5s ease;
    font-size: 2.3rem;
}
.alt-version-btn {
    flex: 1;
    background: #bd1433;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all ease .5s;
    font-size: 1.3rem;
}

    /* FOOTER */
    .site-footer {
        padding: 30px 16px 20px;
    }

    .footer-brand p,
    .footer-links a,
    .footer-disclaimer p {
        font-size: 0.9rem;
    }
    .add-anecdote-btn {
    background-color: #ee2142;
    color: #fff;
    font-weight: 700;
    border: 1px solid #bd001e;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 2.5rem;
    cursor: pointer;
    transition: 0.3s;
} 
.story-version small {
    color: #ff6969;
    font-size: 2rem;
}
.story-version p {
    color: #fff;
}
.story-version {
    background: #272727;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.9rem;
}
.story-versions h4 {
    font-size: 2rem;
}
.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2.9rem;
}
.tag {
    background: #f2dede;
    color: #bd1433;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 1.75rem;
    font-weight: 600;
}
h3.fade {
    margin-bottom: 0rem;
    color: #fff;
    text-shadow: 1px 1px 8px #333;
    font-size: 2rem;
}



}
