/* ============================================
   AIA Consultores – Página Servicios
   servicios.css  v1.0
   Paleta: Azul #030083 | Naranja #fe7f00 | Gris #d9d9d9 | Celeste #51d1f6
   ============================================ */

/* ===== ROOT TOKENS ===== */
:root {
    --blue: #030083;
    --orange: #fe7f00;
    --gray: #d9d9d9;
    --cyan: #51d1f6;
    --white: #ffffff;
    --dark: #111118;
    --text: #1a1a2e;
    --muted: #6b7280;
    --bg-page: #f7f8fc;
    --radius-card: 16px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {

    background: var(--bg-page);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== PAGE WRAPPER ===== */
.svc-page {
    min-height: 100vh;
}

/* ===== HERO BANNER ===== */
.svc-hero {
    background:
        /* Dark gradient overlay — controls transparency of the image */
        linear-gradient(135deg,
            rgba(2, 0, 82, 0.88) 0%,
            rgba(3, 0, 131, 0.82) 50%,
            rgba(10, 0, 184, 0.88) 100%),
        /* Architecture photo */
        url('../Assets/img/servicios/CasaAIA.jpg') center center / cover no-repeat;
    padding: 110px 32px 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Subtle blur on the image layer via backdrop — handled with pseudo-element below */
}

/* Blurred image layer so it looks soft / not sharp */
.svc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../Assets/img/servicios/CasaAIA.jpg') center center / cover no-repeat;
    filter: blur(3px) brightness(0.35) saturate(0.6);
    transform: scale(1.05);
    /* hide blur edges */
    z-index: 0;
}

/* Gradient sits on top of blurred image */
.svc-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(2, 0, 82, 0.82) 0%,
            rgba(3, 0, 131, 0.75) 50%,
            rgba(10, 0, 184, 0.80) 100%);
    z-index: 1;
}

/* decorative blobs — use inner divs since ::before/::after are used for the bg image */
.svc-hero__blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

.svc-hero__blob--1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(81, 209, 246, .15) 0%, transparent 70%);
    top: -180px;
    right: -80px;
    animation: blobFloat 10s ease-in-out infinite alternate;
}

.svc-hero__blob--2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(254, 127, 0, .12) 0%, transparent 70%);
    bottom: -150px;
    left: -60px;
    animation: blobFloat 12s ease-in-out 3s infinite alternate;
}

@keyframes blobFloat {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.15) translate(20px, -15px);
    }
}

.svc-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 20px;
    background: rgba(81, 209, 246, .12);
    border: 1px solid rgba(81, 209, 246, .25);
    border-radius: 999px;
    color: #7edcf8;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 22px;
    position: relative;
    z-index: 3;
    animation: fadeDown .6s var(--ease) both;
}

.svc-hero__title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -.03em;
    position: relative;
    z-index: 3;
    animation: fadeDown .6s var(--ease) .1s both;
}

.svc-hero__title span {
    background: linear-gradient(135deg, var(--orange), #ff9a33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.svc-hero__desc {
    margin-top: 16px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .75);
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    position: relative;
    z-index: 3;
    animation: fadeDown .6s var(--ease) .2s both;
}

.svc-hero__wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 3;
}

.svc-hero__wave svg {
    width: 100%;
    height: 55px;
    display: block;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FILTER BAR ===== */
.svc-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 40px 32px 0;
}

.svc-filter-btn {
    padding: 9px 24px;
    border-radius: 999px;
    border: 1.5px solid rgba(3, 0, 131, .15);
    background: var(--white);
    color: var(--muted);

    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s var(--ease);
}

.svc-filter-btn:hover {
    border-color: var(--cyan);
    color: var(--blue);
    background: rgba(81, 209, 246, .06);
}

.svc-filter-btn.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 4px 16px rgba(3, 0, 131, .22);
}

/* ===== MAIN GRID SECTION ===== */
.svc-section {
    padding: 48px 32px 80px;
    max-width: 1280px;
    margin: 0 auto;
}

.svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

/* ===== SERVICE CARD ===== */
.svc-card {
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid rgba(3, 0, 131, .06);
    box-shadow: 0 2px 16px rgba(3, 0, 131, .05);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
    cursor: pointer;
    opacity: 0;
    transform: translateY(28px);
    animation: cardReveal .55s var(--ease) forwards;
    min-height: 350px;
}

.svc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(3, 0, 131, .13);
    border-color: transparent;
}

/* Staggered reveal */
.svc-card:nth-child(1) {
    animation-delay: .05s;
}

.svc-card:nth-child(2) {
    animation-delay: .10s;
}

.svc-card:nth-child(3) {
    animation-delay: .15s;
}

.svc-card:nth-child(4) {
    animation-delay: .20s;
}

.svc-card:nth-child(5) {
    animation-delay: .25s;
}

.svc-card:nth-child(6) {
    animation-delay: .30s;
}

.svc-card:nth-child(7) {
    animation-delay: .35s;
}

.svc-card:nth-child(8) {
    animation-delay: .40s;
}

.svc-card:nth-child(9) {
    animation-delay: .45s;
}

.svc-card:nth-child(10) {
    animation-delay: .50s;
}

.svc-card:nth-child(11) {
    animation-delay: .55s;
}

.svc-card:nth-child(12) {
    animation-delay: .60s;
}

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image wrapper with overlay */
.svc-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.svc-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .6s var(--ease);
    display: block;
}

.svc-card:hover .svc-card__img-wrap img {
    transform: scale(1.06);
}

/* Color overlay per category variant */
.svc-card__overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .4s var(--ease);
}

.svc-card:hover .svc-card__overlay {
    opacity: 1;
}

/* Overlay colors mapped to brand palette */
.svc-card[data-cat="construccion"] .svc-card__overlay {
    background: linear-gradient(180deg, transparent 40%, rgba(3, 0, 131, .65) 100%);
}

.svc-card[data-cat="diseno"] .svc-card__overlay {
    background: linear-gradient(180deg, transparent 40%, rgba(254, 127, 0, .65) 100%);
}

.svc-card[data-cat="consultoria"] .svc-card__overlay {
    background: linear-gradient(180deg, transparent 40%, rgba(81, 209, 246, .55) 100%);
}

.svc-card[data-cat="tesis"] .svc-card__overlay {
    background: linear-gradient(180deg, transparent 40%, rgba(3, 0, 131, .65) 100%);
}

/* Icon badge on image */
.svc-card__icon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform .35s var(--spring);
}

.svc-card:hover .svc-card__icon {
    transform: scale(1.1) rotate(-5deg);
}

.svc-card[data-cat="construccion"] .svc-card__icon {
    background: rgba(3, 0, 131, .75);
    color: #fff;
}

.svc-card[data-cat="diseno"] .svc-card__icon {
    background: rgba(254, 127, 0, .8);
    color: #fff;
}

.svc-card[data-cat="consultoria"] .svc-card__icon {
    background: rgba(81, 209, 246, .8);
    color: var(--blue);
}

.svc-card[data-cat="tesis"] .svc-card__icon {
    background: rgba(3, 0, 131, .75);
    color: #fff;
}

/* Card body */
.svc-card__body {
    padding: 20px 22px 22px;
}

.svc-card__category {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.svc-card[data-cat="construccion"] .svc-card__category {
    color: var(--blue);
}

.svc-card[data-cat="diseno"] .svc-card__category {
    color: var(--orange);
}

.svc-card[data-cat="consultoria"] .svc-card__category {
    color: #0891b2;
}

.svc-card[data-cat="tesis"] .svc-card__category {
    color: var(--blue);
}

.svc-card__title {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px;
    transition: color .3s;
}

.svc-card:hover .svc-card__title {
    color: var(--blue);
}

.svc-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.svc-card__tag {
    font-size: .68rem;
    font-weight: 600;
    color: var(--muted);
    background: rgba(3, 0, 131, .05);
    border: 1px solid rgba(3, 0, 131, .08);
    border-radius: 999px;
    padding: 3px 10px;
    transition: all .3s var(--ease);
}

.svc-card:hover .svc-card__tag {
    background: rgba(254, 127, 0, .08);
    border-color: rgba(254, 127, 0, .15);
    color: var(--orange);
}

/* Animated underline on title */
.svc-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1.5px solid transparent;
    transition: all .3s var(--ease);
}

.svc-card__link i {
    font-size: .7rem;
    transition: transform .3s var(--ease);
}

.svc-card:hover .svc-card__link {
    border-bottom-color: var(--orange);
    color: var(--orange);
}

.svc-card:hover .svc-card__link i {
    transform: translateX(4px);
}

/* ===== CTA STRIP ===== */
.svc-cta {
    background: linear-gradient(135deg, var(--blue), #0a00b8);
    padding: 64px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.svc-cta::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(81, 209, 246, .12) 0%, transparent 70%);
    border-radius: 50%;
}

.svc-cta__title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -.02em;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}

.svc-cta__title span {
    color: var(--orange);
}

.svc-cta__desc {
    font-size: .95rem;
    color: rgba(255, 255, 255, .72);
    max-width: 500px;
    margin: 0 auto 28px;
    line-height: 1.65;
    position: relative;
    z-index: 2;
}

.svc-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--orange);
    color: #fff;

    font-size: .9rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all .35s var(--ease);
    box-shadow: 0 8px 24px rgba(254, 127, 0, .35);
    position: relative;
    z-index: 2;
}

.svc-cta__btn:hover {
    background: #e67300;
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(254, 127, 0, .45);
}

.svc-cta__btn i {
    transition: transform .3s var(--ease);
}

.svc-cta__btn:hover i {
    transform: translateX(4px);
}

/* ===== SCROLL-TO-TOP ===== */
.svc-scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--orange);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 8px 24px rgba(254, 127, 0, .35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: all .35s var(--ease);
    z-index: 500;
}

.svc-scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.svc-scroll-top:hover {
    background: #e67300;
    transform: translateY(-3px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .svc-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .svc-hero {
        padding: 100px 24px 56px;
    }
}

@media (max-width: 768px) {
    .svc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .svc-section {
        padding: 36px 20px 60px;
    }
}

@media (max-width: 520px) {
    .svc-grid {
        grid-template-columns: 1fr;
    }

    .svc-hero {
        padding: 90px 16px 48px;
    }

    .svc-filters {
        padding: 28px 16px 0;
    }

    .svc-filter-btn {
        padding: 8px 16px;
        font-size: .78rem;
    }
}