/* ======================================================
   ESTILOS PARA servicios.html
====================================================== */

/* HERO */
.page-hero {
    padding: 9rem 2rem 2rem;
    text-align: center;
    max-width: 100%;
}

.page-hero .container {
    max-width: var(--container-width);
}

.page-hero .page-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.page-hero .page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* CTA FINAL */
.section-cta {
    padding: 80px 0;
    text-align: center;
}

.section-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section-cta p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ======================================================
   SECCIÓN GRID SERVICIOS
====================================================== */
.services-grid-section {
    padding: 10px 0 0;
}

.services-grid-visual {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin: 3.2rem 0 0;
}

/* ======================================================
   CARD BASE
====================================================== */
.service-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 340px;
    padding: 2rem;
    border-radius: 22px;
    background: #141414;
    border: 1px solid #262626;
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.service-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.35s ease;
}

.service-visual::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

/* Glow/control visual por tarjeta */
.service-web::before {
    box-shadow:
        inset 0 0 0 1px rgba(255, 131, 131, 0.04),
        0 0 0 0 rgba(255, 131, 131, 0);
}

.service-ai::before {
    box-shadow:
        inset 0 0 0 1px rgba(70, 192, 230, 0.05),
        0 0 0 0 rgba(70, 192, 230, 0);
}

.service-visual:hover {
    transform: translateY(-8px);
}

.service-web:hover {
    border-color: rgba(255, 131, 131, 0.22);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.42),
        0 0 28px rgba(255, 131, 131, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.service-ai:hover {
    border-color: rgba(70, 192, 230, 0.24);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.42),
        0 0 28px rgba(70, 192, 230, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Línea/acento superior */
.service-visual .service-accent-line {
    display: none;
}

.service-visual.service-web {
    background-image:
        linear-gradient(180deg, rgba(255, 131, 131, 0.025), transparent 22%);
}

.service-visual.service-ai {
    background-image:
        linear-gradient(180deg, rgba(70, 192, 230, 0.03), transparent 22%);
}

/* ======================================================
   ICONO
====================================================== */
.service-icon-large {
    width: 74px;
    height: 74px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: #191919;
    border: 1px solid #2a2a2a;
    box-shadow:
        0 10px 18px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        background 0.35s ease;
    position: relative;
    overflow: hidden;
}

.service-icon-large::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 1;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.service-web .service-icon-large::before {
    background: linear-gradient(135deg, rgba(255, 131, 131, 0.10), transparent 70%);
}

.service-ai .service-icon-large::before {
    background: linear-gradient(135deg, rgba(70, 192, 230, 0.12), transparent 70%);
}

.service-icon-large i {
    position: relative;
    z-index: 1;
    font-size: 1.95rem;
    color: var(--text-primary);
    transition:
        transform 0.35s ease,
        color 0.35s ease,
        text-shadow 0.35s ease;
}

.service-web .service-icon-large i {
    color: #ff9a9a;
    text-shadow: 0 0 14px rgba(255, 131, 131, 0.14);
}

.service-ai .service-icon-large i {
    color: rgb(102, 220, 255);
    text-shadow: 0 0 14px rgba(70, 192, 230, 0.16);
}

.service-web:hover .service-icon-large {
    border-color: rgba(255, 131, 131, 0.22);
    box-shadow:
        0 0 22px rgba(255, 131, 131, 0.08),
        0 10px 18px rgba(0, 0, 0, 0.24);
}

.service-ai:hover .service-icon-large {
    border-color: rgba(70, 192, 230, 0.24);
    box-shadow:
        0 0 22px rgba(70, 192, 230, 0.10),
        0 10px 18px rgba(0, 0, 0, 0.24);
}

.service-visual:hover .service-icon-large {
    transform: translateY(-2px) scale(1.03);
}

.service-visual:hover .service-icon-large::before {
    transform: scale(1.08);
}

.service-visual:hover .service-icon-large i {
    transform: scale(1.05);
}

/* ======================================================
   TÍTULO
====================================================== */
.service-visual h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.85rem 0;
    letter-spacing: -0.03em;
    line-height: 1.15;
    position: relative;
    display: inline-block;
    width: fit-content;
}

.service-visual h3::after {
    content: "";
    position: absolute;
    bottom: -7px;
    left: 0;
    width: 38px;
    height: 2px;
    border-radius: 999px;
    transition: width 0.35s ease, opacity 0.35s ease;
    opacity: 0.95;
}

.service-web h3::after {
    background: linear-gradient(90deg, rgba(255, 131, 131, 0.95), transparent);
}

.service-ai h3::after {
    background: linear-gradient(90deg, rgba(70, 192, 230, 0.95), transparent);
}

.service-visual:hover h3::after {
    width: 100%;
}

/* ======================================================
   TEXTO
====================================================== */
.service-visual p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 1.6rem 0;
    opacity: 0.9;
    max-width: 34ch;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.service-visual:hover p {
    color: #cfcfcf;
    opacity: 1;
}

/* ======================================================
   BOTÓN
====================================================== */
.service-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: auto;
    background: #181818;
    color: var(--text-primary);
    border: 1px solid #2e2e2e;
    padding: 0.82rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.5s ease,
        border-color 0.5s ease,
        box-shadow 0.5s ease,
        background 0.5s ease,
        color 0.5s ease;
}

/* Glow base siempre activo */
.service-web .service-link-btn {
    border-color: rgba(255, 131, 131, 0.25);
    box-shadow: 0 0 12px rgba(255, 131, 131, 0.08);
}

.service-ai .service-link-btn {
    border-color: rgba(70, 192, 230, 0.25);
    box-shadow: 0 0 12px rgba(70, 192, 230, 0.10);
}

/* Efecto shine */
.service-link-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    transform: skewX(-20deg);
    transition: none;
}

.service-link-btn:hover::after {
    animation: shine 0.8s ease forwards;
}

@keyframes shine {
    0% {
        left: -120%;
    }
    100% {
        left: 140%;
    }
}

.service-link-btn:hover {
    transform: translateY(-3px) scale(1.04);
}

.service-link-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.service-link-btn:hover i {
    transform: translateX(6px);
}

/* Pulso suave continuo */
@keyframes pulseGlowWeb {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 131, 131, 0.08);
    }
    50% {
        box-shadow: 0 0 18px rgba(255, 131, 131, 0.14);
    }
}

@keyframes pulseGlowAI {
    0%, 100% {
        box-shadow: 0 0 12px rgba(70, 192, 230, 0.10);
    }
    50% {
        box-shadow: 0 0 20px rgba(70, 192, 230, 0.16);
    }
}

.service-web .service-link-btn {
    animation: pulseGlowWeb 2.8s ease-in-out infinite;
}

.service-ai .service-link-btn {
    animation: pulseGlowAI 2.8s ease-in-out infinite;
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 1200px) {
    .page-hero .container {
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
}

@media (max-width: 992px) {
    .page-hero .container {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .page-hero {
        padding: 7rem 1.25rem 2rem !important;
    }

    .page-title {
        font-size: 2.4rem !important;
        line-height: 1.15 !important;
    }

    .page-subtitle {
        font-size: 1.05rem !important;
    }

    .services-grid-visual {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-visual {
        min-height: unset;
    }
}

@media (max-width: 768px) {
    .services-container {
        padding: 0 20px;
    }

    .services-grid-visual {
        margin-top: 2.5rem;
    }

    .service-visual {
        padding: 1.5rem;
        border-radius: 18px;
    }

    .service-icon-large {
        width: 66px;
        height: 66px;
        border-radius: 16px;
        margin-bottom: 1.2rem;
    }

    .service-icon-large i {
        font-size: 1.7rem;
    }

    .service-visual h3 {
        font-size: 1.55rem;
    }

    .service-visual p {
        font-size: 0.96rem;
        line-height: 1.65;
        margin-bottom: 1.35rem;
    }

    .service-link-btn {
        padding: 0.78rem 1.05rem;
        font-size: 0.93rem;
    }

    .section-cta h2 {
        font-size: 1.8rem !important;
    }
}

@media (max-width: 576px) {
    .btn-primary,
    .btn-secondary,
    .btn-large {
        width: 100% !important;
        max-width: 420px;
    }
}

@media (max-width: 480px) {
    .page-hero .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .page-title {
        font-size: 1.85rem !important;
    }

    .service-link-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .page-title {
        font-size: 1.65rem !important;
    }

    .page-subtitle {
        font-size: 0.95rem !important;
    }
}