/* =====================================================
   SCRATLOOP DIGITAL
   BLOG — REVISTA DIGITAL
   RESPONSIVE / LIMPIO / SIN ALTERAR EL DISEÑO
===================================================== */


/* =====================================================
   BLOG HERO
===================================================== */

.blog-hero {
    position: relative;
    overflow: hidden;

    padding: 75px 0;

    text-align: center;

    background:
        radial-gradient(
            circle at 20% 30%,
            rgba(0, 200, 255, .13),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 40%,
            rgba(139, 61, 255, .15),
            transparent 35%
        ),
        var(--bg);
}

.blog-hero::before {
    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    top: -250px;
    left: 50%;

    transform: translateX(-50%);

    border-radius: 50%;

    background: rgba(0, 200, 255, .08);

    filter: blur(120px);

    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 850px;

    margin: 0 auto;
}


/* =====================================================
   BLOG HERO — TÍTULO
===================================================== */

.blog-hero h1 {
    margin: 25px 0;

    font-family: var(--font-heading);

    font-size: clamp(2.7rem, 6vw, 5.5rem);
    line-height: 1;

    letter-spacing: -.045em;

    background: var(--blog-gradient);

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;

    background-size: 100% 100%;

    overflow-wrap: break-word;
}

.blog-hero h1 span {
    display: block;

    margin: 0;

    background: inherit;

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;
}

.blog-hero-content > p {
    width: 100%;
    max-width: 700px;

    margin: 0 auto;

    color: var(--text-muted);

    font-size: clamp(.95rem, 1.5vw, 1.08rem);
    line-height: 1.8;
}


/* =====================================================
   BLOG TOPICS
===================================================== */

.blog-topics {
    display: flex;

    justify-content: center;
    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    width: 100%;

    margin-top: 35px;
}

.blog-topics span {
    max-width: 100%;

    padding: 8px 14px;

    border: 1px solid rgba(0, 200, 255, .18);
    border-radius: var(--radius-pill);

    background: rgba(0, 200, 255, .05);

    color: var(--text-soft);

    font-size: .75rem;

    line-height: 1.3;

    overflow-wrap: anywhere;
}


/* =====================================================
   FEATURED ARTICLE
===================================================== */

.blog-featured {
    padding: 30px 0 110px;

    background: var(--bg);
}

.featured-article {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    min-height: 500px;

    width: 100%;

    overflow: hidden;

    border: 1px solid rgba(0, 200, 255, .22);
    border-radius: var(--radius-xl);

    background:
        linear-gradient(
            145deg,
            rgba(15, 23, 42, .9),
            rgba(5, 8, 22, .92)
        );

    box-shadow:
        0 30px 80px rgba(0, 0, 0, .35),
        0 0 50px rgba(0, 200, 255, .05);
}


/* =====================================================
   FEATURED VISUAL
===================================================== */

.featured-visual {
    position: relative;

    min-width: 0;
    min-height: 500px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle,
            rgba(0, 200, 255, .15),
            transparent 55%
        ),
        linear-gradient(
            135deg,
            rgba(0, 200, 255, .06),
            rgba(139, 61, 255, .12)
        );
}

.featured-glow {
    position: absolute;

    width: clamp(200px, 28vw, 280px);
    height: clamp(200px, 28vw, 280px);

    border-radius: 50%;

    background: var(--gradient-scratty);

    opacity: .15;

    filter: blur(60px);

    animation: blogGlow 5s ease-in-out infinite;

    pointer-events: none;
}

.featured-icon {
    position: relative;
    z-index: 5;

    width: clamp(110px, 12vw, 150px);
    height: clamp(110px, 12vw, 150px);

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: clamp(28px, 3vw, 40px);

    background: rgba(5, 8, 22, .75);

    border: 1px solid rgba(0, 200, 255, .35);

    font-size: clamp(3.5rem, 5vw, 5rem);

    box-shadow:
        0 0 40px rgba(0, 200, 255, .2),
        inset 0 0 30px rgba(0, 200, 255, .05);

    animation: blogFloat 4s ease-in-out infinite;
}


/* =====================================================
   FEATURED ORBITS
===================================================== */

.featured-orbit {
    position: absolute;

    max-width: 90%;
    max-height: 80%;

    border: 1px solid rgba(0, 200, 255, .16);

    border-radius: 50%;

    pointer-events: none;
}

.orbit-a {
    width: clamp(260px, 34vw, 430px);
    height: clamp(120px, 14vw, 180px);

    transform: rotate(-25deg);

    animation: blogOrbit 12s linear infinite;
}

.orbit-b {
    width: clamp(220px, 28vw, 330px);
    height: clamp(100px, 11vw, 140px);

    transform: rotate(35deg);

    border-color: rgba(139, 61, 255, .2);

    animation: blogOrbitReverse 16s linear infinite;
}


/* =====================================================
   FLOATING CARDS
===================================================== */

.featured-floating-card {
    position: absolute;
    z-index: 8;

    max-width: calc(100% - 30px);

    padding: 12px 18px;

    border: 1px solid rgba(0, 200, 255, .2);
    border-radius: 14px;

    background: rgba(5, 8, 22, .75);

    backdrop-filter: blur(12px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, .25);
}

.featured-floating-card strong {
    display: block;

    color: var(--primary);

    font-size: .75rem;

    line-height: 1.25;
}

.featured-floating-card small {
    display: block;

    color: var(--text-muted);

    font-size: .65rem;

    line-height: 1.25;
}

.card-a {
    left: clamp(15px, 3vw, 35px);
    top: clamp(55px, 7vw, 100px);

    animation: blogFloat 4s ease-in-out infinite;
}

.card-b {
    right: clamp(15px, 3vw, 35px);
    bottom: clamp(55px, 7vw, 100px);

    animation:
        blogFloat 5s ease-in-out infinite reverse;
}


/* =====================================================
   FEATURED CONTENT
===================================================== */

.featured-content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    justify-content: center;

    padding: clamp(30px, 4.5vw, 65px);
}

.article-category {
    color: var(--primary);

    font-size: .72rem;
    font-weight: 700;

    letter-spacing: .12em;

    overflow-wrap: anywhere;
}

.featured-content h2 {
    margin: 20px 0;

    font-family: var(--font-heading);

    font-size: clamp(2rem, 3.2vw, 3.4rem);

    line-height: 1.08;

    letter-spacing: -.035em;

    overflow-wrap: break-word;
}

.featured-content > p {
    width: 100%;
    max-width: 600px;

    margin: 0 0 25px;

    color: var(--text-muted);

    line-height: 1.8;
}

.article-meta {
    display: flex;

    align-items: center;
    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 30px;

    color: var(--text-muted);

    font-size: .75rem;
}


/* =====================================================
   BLOG ARTICLES
===================================================== */

.blog-articles {
    padding: 110px 0;

    background: var(--surface);
}

.blog-section-heading {
    display: flex;
    flex-direction: column;

    align-items: flex-start;

    gap: 15px;

    margin-bottom: 55px;
}

.blog-section-heading h2 {
    margin-top: 15px;
}

.blog-section-heading > p {
    width: 100%;
    max-width: 450px;

    margin: 0;

    color: var(--text-muted);

    line-height: 1.7;
}


/* =====================================================
   ARTICLES GRID
===================================================== */

.articles-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 28px;

    width: 100%;
}


/* =====================================================
   BLOG CARD
===================================================== */

.blog-card {
    min-width: 0;

    overflow: hidden;

    border: 2px solid rgba(0, 200, 255, .45);
    border-radius: var(--radius-lg);

    background: rgba(255, 255, 255, .025);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, .2);

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.blog-card:hover {
    transform: translateY(-8px);

    border-color: rgba(0, 200, 255, .7);

    box-shadow:
        0 25px 55px rgba(0, 200, 255, .08);
}


/* =====================================================
   CARD IMAGE / VISUAL
===================================================== */

.blog-card-image {
    position: relative;

    width: 100%;
    height: clamp(180px, 17vw, 220px);

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.blog-card-image::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    max-width: 60%;
    max-height: 80%;

    border-radius: 50%;

    filter: blur(50px);

    opacity: .25;

    pointer-events: none;
}

.hosting-image {
    background:
        linear-gradient(
            135deg,
            #071b2b,
            #101b3d
        );
}

.hosting-image::before {
    background: var(--primary);
}

.wordpress-image {
    background:
        linear-gradient(
            135deg,
            #09152d,
            #24143e
        );
}

.wordpress-image::before {
    background: var(--accent);
}

.ai-image {
    background:
        linear-gradient(
            135deg,
            #061b2a,
            #1c1038
        );
}

.ai-image::before {
    background: var(--gradient);
}

.blog-card-icon {
    position: relative;
    z-index: 3;

    width: clamp(75px, 7vw, 95px);
    height: clamp(75px, 7vw, 95px);

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid rgba(0, 200, 255, .3);

    border-radius: clamp(20px, 2vw, 25px);

    background: rgba(5, 8, 22, .65);

    font-size: clamp(2.4rem, 3vw, 3rem);

    box-shadow:
        0 0 35px rgba(0, 200, 255, .12);
}

.blog-card-image > span {
    position: absolute;

    left: clamp(12px, 2vw, 20px);
    bottom: clamp(12px, 1.5vw, 18px);

    z-index: 5;

    max-width: calc(100% - 24px);

    color: rgba(255, 255, 255, .7);

    font-size: clamp(.55rem, .65vw, .65rem);
    font-weight: 700;

    letter-spacing: .1em;

    overflow-wrap: anywhere;
}


/* =====================================================
   CARD CONTENT
===================================================== */

.blog-card-content {
    min-width: 0;

    padding: clamp(22px, 2.2vw, 30px);
}

.blog-card-content h3 {
    margin: 14px 0;

    font-family: var(--font-heading);

    font-size: clamp(1.15rem, 1.5vw, 1.35rem);

    line-height: 1.2;

    overflow-wrap: break-word;
}

.blog-card-content > p {
    min-height: 75px;

    margin-bottom: 20px;

    color: var(--text-muted);

    font-size: .9rem;

    line-height: 1.7;
}

.blog-card-content .article-meta {
    margin-bottom: 18px;
}

.card-link {
    color: var(--primary);

    font-weight: 600;

    font-size: .85rem;

    transition: color .25s ease;
}

.card-link:hover {
    color: var(--text);
}


/* =====================================================
   SCRATTY TIP
===================================================== */

.scratty-tip {
    padding: 100px 0;

    background: var(--bg);
}

.scratty-tip-box {
    position: relative;

    display: grid;

    grid-template-columns:
        minmax(180px, 260px)
        minmax(0, 1fr);

    align-items: center;

    gap: clamp(25px, 4vw, 50px);

    min-height: 280px;

    padding: clamp(35px, 4vw, 45px)
             clamp(25px, 5vw, 60px);

    overflow: hidden;

    border: 1px solid rgba(139, 61, 255, .25);

    border-radius: var(--radius-xl);

    background:
        linear-gradient(
            135deg,
            rgba(0, 200, 255, .05),
            rgba(139, 61, 255, .08)
        );
}

.scratty-tip-character {
    position: relative;

    min-width: 0;

    display: flex;

    align-items: center;
    justify-content: center;
}

.scratty-tip-character img {
    position: relative;
    z-index: 3;

    width: clamp(130px, 14vw, 180px);
    height: clamp(130px, 14vw, 180px);

    object-fit: contain;

    filter:
        drop-shadow(
            0 0 25px rgba(0, 200, 255, .35)
        );

    animation:
        blogFloat 4s ease-in-out infinite;
}

.scratty-tip-glow {
    position: absolute;

    width: clamp(140px, 14vw, 180px);
    height: clamp(140px, 14vw, 180px);

    border-radius: 50%;

    background: var(--gradient-scratty);

    opacity: .16;

    filter: blur(45px);

    pointer-events: none;
}

.scratty-tip-content {
    min-width: 0;
}

.scratty-tip-content h2 {
    margin: 15px 0;

    overflow-wrap: break-word;
}

.scratty-tip-content p {
    width: 100%;
    max-width: 700px;

    margin: 0;

    color: var(--text-muted);

    line-height: 1.8;
}


/* =====================================================
   BLOG CTA
===================================================== */

.blog-cta {
    padding: 100px 0;

    text-align: center;

    background:
        radial-gradient(
            circle,
            rgba(0, 200, 255, .12),
            transparent 45%
        ),
        var(--bg);
}

.blog-cta-box {
    width: 100%;
    max-width: 800px;

    margin: 0 auto;
}

.blog-cta h2 {
    margin: 20px 0;

    font-family: var(--font-heading);

    font-size: clamp(2rem, 4vw, 3.5rem);

    line-height: 1.1;

    overflow-wrap: break-word;
}

.blog-cta p {
    width: 100%;
    max-width: 650px;

    margin: 0 auto 35px;

    color: var(--text-muted);

    line-height: 1.8;
}


/* =====================================================
   VOLVER AL INICIO
===================================================== */

.blog-back {
    width: 100%;

    display: flex;

    justify-content: center;

    margin: 0;

    padding: 0 0 50px;

    position: relative;

    top: 0;
}

.blog-back .container {
    width: 100%;

    display: flex;

    justify-content: center;
}

.blog-back a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    max-width: 100%;

    color: var(--primary);

    font-size: .9rem;
    font-weight: 600;

    text-decoration: none;

    transition:
        opacity .25s ease,
        transform .25s ease;
}

.blog-back a:hover {
    opacity: .8;

    transform: translateX(-3px);
}


/* =====================================================
   DEGRADADO SCRATLOOP
   CENTRALIZADO PARA LOS TÍTULOS DEL BLOG
===================================================== */

:root {
    --blog-gradient:
        linear-gradient(
            90deg,
            #ffffff 0%,
            #ffffff 15%,

            #bff7ff 22%,
            #00c8ff 30%,
            #00c8ff 35%,

            #9b6cff 45%,
            #8b3dff 50%,

            #ffffff 62%,
            #ffffff 70%,

            #bff7ff 77%,
            #00c8ff 84%,

            #8b3dff 94%,

            #ffffff 100%
        );
}


/* =====================================================
   TÍTULOS CON DEGRADADO
===================================================== */

.blog-hero h1,
.blog-section-heading h2,
.scratty-tip-content h2,
.blog-cta h2 {
    background: var(--blog-gradient);

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;

    background-size: 100% 100%;
}


/* =====================================================
   ANIMATIONS
===================================================== */

@keyframes blogFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes blogGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: .12;
    }

    50% {
        transform: scale(1.15);
        opacity: .22;
    }
}

@keyframes blogOrbit {

    from {
        transform: rotate(-25deg);
    }

    to {
        transform: rotate(335deg);
    }
}

@keyframes blogOrbitReverse {

    from {
        transform: rotate(35deg);
    }

    to {
        transform: rotate(-325deg);
    }
}


/* =====================================================
   RESPONSIVE — TABLET / LAPTOP PEQUEÑO
   1000px
===================================================== */

@media (max-width: 1000px) {

    .featured-article {
        grid-template-columns: 1fr;
    }

    .featured-visual {
        min-height: 400px;
    }

    .featured-content {
        padding: 50px;
    }

    .articles-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* =====================================================
   RESPONSIVE — TABLET / MÓVIL GRANDE
   700px
===================================================== */

@media (max-width: 700px) {

    .blog-hero {
        padding: 85px 0 70px;
    }

    .blog-hero h1 {
        font-size: clamp(2.7rem, 12vw, 4rem);
    }

    .blog-topics {
        gap: 8px;
    }

    .featured-article {
        border-radius: var(--radius-lg);
    }

    .featured-visual {
        min-height: 330px;
    }

    .featured-content {
        padding: 35px 25px;
    }

    .featured-content h2 {
        font-size: 2rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .scratty-tip-box {
        grid-template-columns: 1fr;

        text-align: center;

        padding: 40px 25px;

        gap: 20px;
    }

    .scratty-tip-content p {
        margin-inline: auto;
    }

    .scratty-tip-character img {
        width: 145px;
        height: 145px;
    }
}


/* =====================================================
   RESPONSIVE — MÓVIL
   500px
===================================================== */

@media (max-width: 500px) {

    .blog-hero {
        padding: 75px 0 60px;
    }

    .blog-hero h1 {
        font-size: clamp(2.35rem, 12vw, 3.5rem);
        line-height: 1.02;
    }

    .blog-hero-content > p {
        font-size: .95rem;
    }

    .blog-topics {
        gap: 7px;
        margin-top: 28px;
    }

    .blog-topics span {
        font-size: .68rem;
        padding: 7px 10px;
    }

    .blog-featured {
        padding-bottom: 75px;
    }

    .featured-visual {
        min-height: 290px;
    }

    .featured-icon {
        width: 110px;
        height: 110px;

        font-size: 3.5rem;
    }

    .orbit-a {
        width: min(300px, 88vw);
        height: 130px;
    }

    .orbit-b {
        width: min(250px, 78vw);
        height: 110px;
    }

    .card-a {
        left: 15px;
        top: 55px;
    }

    .card-b {
        right: 15px;
        bottom: 55px;
    }

    .featured-content {
        padding: 30px 20px;
    }

    .featured-content h2 {
        font-size: 1.85rem;
    }

    .featured-content > p {
        font-size: .92rem;
    }

    .blog-articles {
        padding: 80px 0;
    }

    .blog-section-heading {
        margin-bottom: 40px;
    }

    .blog-card-content {
        padding: 25px;
    }

    .blog-card-content > p {
        min-height: auto;
    }

    .scratty-tip {
        padding: 75px 0;
    }

    .blog-cta {
        padding: 75px 0;
    }
}


/* =====================================================
   RESPONSIVE — MÓVIL PEQUEÑO
   390px
===================================================== */

@media (max-width: 390px) {

    .blog-hero h1 {
        font-size: clamp(2.15rem, 11.5vw, 3rem);
    }

    .featured-visual {
        min-height: 270px;
    }

    .featured-icon {
        width: 95px;
        height: 95px;

        font-size: 3rem;

        border-radius: 25px;
    }

    .featured-floating-card {
        padding: 9px 12px;
    }

    .featured-floating-card strong {
        font-size: .68rem;
    }

    .featured-floating-card small {
        font-size: .58rem;
    }

    .card-a {
        left: 10px;
        top: 45px;
    }

    .card-b {
        right: 10px;
        bottom: 45px;
    }

    .featured-content {
        padding: 28px 18px;
    }

    .featured-content h2 {
        font-size: 1.7rem;
    }

    .article-meta {
        gap: 7px;
    }

    .scratty-tip-box {
        padding: 35px 18px;
    }
}


/* =====================================================
   RESPONSIVE — MÓVIL MUY PEQUEÑO
   340px
===================================================== */

@media (max-width: 340px) {

    .blog-hero {
        padding-top: 65px;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-topics span {
        font-size: .63rem;
        padding: 6px 8px;
    }

    .featured-visual {
        min-height: 250px;
    }

    .featured-icon {
        width: 85px;
        height: 85px;

        font-size: 2.7rem;
    }

    .orbit-a {
        width: 235px;
        height: 105px;
    }

    .orbit-b {
        width: 200px;
        height: 90px;
    }

    .featured-floating-card {
        padding: 7px 9px;
    }

    .featured-content {
        padding: 25px 15px;
    }

    .featured-content h2 {
        font-size: 1.55rem;
    }

    .blog-card-content {
        padding: 20px;
    }
}


/* =====================================================
   PREVENCIÓN DE DESBORDAMIENTOS
===================================================== */

.blog-hero,
.blog-featured,
.blog-articles,
.scratty-tip,
.blog-cta,
.blog-back,
.featured-article,
.featured-visual,
.featured-content,
.blog-card,
.blog-card-content,
.scratty-tip-box,
.scratty-tip-content,
.blog-cta-box {
    min-width: 0;
}


/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {

    .featured-glow,
    .featured-icon,
    .featured-orbit,
    .featured-floating-card,
    .scratty-tip-character img {
        animation: none !important;
    }

    .blog-card,
    .card-link,
    .blog-back a {
        transition: none !important;
    }
}

.blog-card-icon img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    display: block;
}
