/* Hero compact for inner page */
.hero-inner {
    min-height: 70vh;
    padding: 10rem 4rem 6rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    margin-top: -10px;
}

.hero-inner .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(22, 22, 24, 0.65);
    z-index: 1;
    border-radius: inherit;
}

.hero-inner .hero-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 2s ease-in-out, transform 0s 2s;
    z-index: 0;
}

.hero-inner .hero-bg-slide.active {
    opacity: 1;
    transform: scale(1.08);
    transition: opacity 2s ease-in-out, transform 10s linear;
}

.hero-inner-content {
    position: relative;
    z-index: 2;
}

.hero-breadcrumb {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
}

.hero-breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.hero-breadcrumb a:hover {
    color: var(--text-primary);
}

.hero-breadcrumb span {
    margin: 0 0.5rem;
}

.hero-inner-title {
    font-family: var(--font-heading);
    font-size: 8vw;
    font-weight: 700;
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.hero-inner-subtitle {
    margin-top: 2.5rem;
    max-width: 600px;
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.03em;
}

/* ===== PROCESO / METHODOLOGY SECTION ===== */
.proceso {
    padding: 8rem 4rem;
}

.proceso-intro {
    max-width: 800px;
    margin-bottom: 6rem;
}

.proceso-intro p {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-black);
    line-height: 1.7;
    letter-spacing: -0.03em;
}

.proceso-intro p strong {
    color: var(--text-primary);
}

.tipos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    overflow: hidden;
}

.tipo-card {
    padding: 3.5rem 3rem;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease;
    cursor: default;
}

.tipo-card:nth-child(3n) {
    border-right: none;
}

.tipo-card:nth-last-child(-n+3) {
    border-bottom: none;
}

.tipo-card:hover {
    background: rgba(255, 255, 255, 0.035);
}

.tipo-num {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1;
    margin-bottom: 1.5rem;
    transition: color 0.5s ease;
}

.tipo-card:hover .tipo-num {
    color: rgba(255, 255, 255, 0.12);
}

.tipo-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tipo-tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.25rem 0.85rem;
    margin-bottom: 1.2rem;
}

.tipo-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
    font-weight: 300;
}

/* ===== GALLERY SECTION ===== */
.galeria {
    padding: 8rem 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
    gap: 1.5rem;
    margin-top: 4rem;
}

.gallery-item {
    height: 550px;
    position: relative;
    overflow: hidden;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    border-bottom: 2px solid var(--border-color);
    cursor: pointer;
}

/* Wrapper to allow elements (e.g. a link) to sit outside the clipped .gallery-item */
.gallery-item-wrapper {
    display: flex;
    flex-direction: column;
}

.cta-visit-web {
    display: inline-block;
    margin-top: 0.75rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    align-self: flex-end;
    padding: 0.25rem 0;
}

.cta-visit-web:hover {
    color: black;
}

.gallery-item.tall {
    /* aspect-ratio: 3/5; */
    transform: translateY(-2rem);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: contrast(0.75) grayscale(10%);

    transition: transform 2s cubic-bezier(0.19, 1, 0.22, 1), filter 1s ease;
}


.gallery-item:hover img {
    transform: scale(1.08);
    filter: contrast(1) grayscale(0%);

}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.829) 0%, rgba(0, 0, 0, 0) 55%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    transition: opacity 0.5s ease;
}

.gallery-overlay h4 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.gallery-overlay .gallery-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease 0.1s, transform 0.5s cubic-bezier(0.19, 1, 0.22, 1) 0.1s;
}

.gallery-overlay h4.text-small {
    font-size: 1.6rem;
}

.gallery-overlay p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-top: 0.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease 0.15s, transform 0.5s cubic-bezier(0.19, 1, 0.22, 1) 0.15s;
}

.gallery-item:hover .gallery-overlay h4,
.gallery-item:hover .gallery-overlay .gallery-tag,
.gallery-item:hover .gallery-overlay p {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:nth-child(n+4) {
    margin-top: 2rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 8rem 4rem;
    text-align: center;
}

.cta-section h2 {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 2.5rem;
}

.cta-section p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    letter-spacing: -0.03em;
}

.btn-cta {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--text-black);
    color: var(--text-black);
    padding: 1.2rem 3.5rem;
    border-radius: 50px;
    transition: background 0.4s ease, color 0.4s ease;
}

.btn-cta:hover {
    color: white;
    background-color: black;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .tipos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tipo-card:nth-child(3n) {
        border-right: 1px solid var(--border-color);
    }

    .tipo-card:nth-child(2n) {
        border-right: none;
    }

    .tipo-card:nth-last-child(-n+3) {
        border-bottom: 1px solid var(--border-color);
    }

    .tipo-card:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .galeria {
        padding: 5rem 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item.tall {
        /* aspect-ratio: 4/5; */
        transform: none;
    }

    .gallery-item:nth-child(n+4) {
        margin-top: 0;
    }

    .hero-inner-title {
        font-size: 12vw;
    }
}

@media (max-width: 768px) {
    .hero-inner {
        padding: 9rem 2rem 4rem;
        min-height: 60vh;
    }

    .hero-inner-title {
        font-size: 14vw;
    }

    .hero-inner-subtitle {
        font-size: 1.1rem;
    }

    .proceso,
    .galeria,
    .cta-section {
        padding: 5rem 1.5rem;
    }

    .tipos-grid {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .tipo-card {
        border-right: none !important;
    }

    .tipo-card:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--border-color) !important;
    }

    .tipo-card:last-child {
        border-bottom: none !important;
    }

    .galeria {
        padding: 5rem 0.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: contrast(0.75) grayscale(10%);
        transition: transform 2s cubic-bezier(0.19, 1, 0.22, 1), filter 1s ease;
    }

    .gallery-item.tall {
        transform: none;
    }

    .gallery-item:nth-child(n+4) {
        margin-top: 0;
    }

    .gallery-overlay .gallery-tag,
    .gallery-overlay p {
        opacity: 1;
        transform: translateY(0);
    }

    .cta-section h2 {
        font-size: 3rem;
    }
}