.home-sections-wrapper {
    display: flex;
    flex-direction: column;
}


/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.home-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end; /* Ancla el contenido en la parte inferior */
    padding-bottom: 6rem;  /* Le da un respiro inferior */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25); /* Oscurece la imagen para legibilidad */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    padding-top: var(--header-height);
    width: 100%; /* Asegura que tome todo el ancho disponible */
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -1px;
    max-width: 800px;
}

/* ==========================================================================
   2. PROJECTS SECTION
   ========================================================================== */
.home-projects {
    padding: 8rem 0;
    background-color: var(--color-white);
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5rem;
    gap: 4rem;
}

.projects-header .section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -1.5px;
    margin: 0;
    flex-shrink: 0;
}

.projects-header .projects-desc {
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 400;
}

/* Grid de Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #f0f0f0;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
}

/* Efecto Hover Premium */
.project-card:hover .project-thumb img {
    transform: scale(1.04);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.project-terms {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ==========================================================================
   3. TESTIMONIAL / BRANDING SECTION (Slider Activo)
   ========================================================================== */
.home-testimonials {
    padding: 8rem 0;
    background-color: #f7f7f7; /* Fondo gris tenue */
}

.testimonials-slider {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 250px; /* Asegura espacio para evitar saltos al cambiar texto */
}

.testimonial-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    gap: 3rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.testimonial-item.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.quote-mark {
    font-size: 4rem;
    font-weight: bold;
    line-height: 0.8;
    color: var(--color-black);
    flex-shrink: 0;
}

.testimonial-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.testimonial-content p {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: -0.5px;
    margin: 0;
}

.testimonial-content cite {
    font-size: 0.85rem;
    font-weight: 600;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   4. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 992px) {
    .projects-header {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .testimonial-item {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .quote-mark {
        font-size: 3rem;
    }
}

/* ==========================================================================
   5. SERVICES SECTION (Grid de Tarjetas Visuales)
   ========================================================================== */
.home-services {
    padding: 8rem 0;
    background-color: var(--color-white);
}

.services-header {
    margin-bottom: 3rem;
}

.services-header .section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -1.5px;
    margin: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem 2rem;
}

.service-card {
    display: flex;
    flex-direction: column;
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.service-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-thumb-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
}

.service-card:hover .service-thumb img {
    transform: scale(1.03);
}

.service-arrow-icon {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    background-color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-black);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.service-card:hover .service-arrow-icon {
    opacity: 1;
    transform: translateY(0);
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-name {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin: 0;
}

.service-tags {
    font-size: 0.9rem;
    color: #888888;
    line-height: 1.5;
    font-weight: 400;
}

.services-actions {
    margin-top: 4rem;
    text-align: left;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .service-arrow-icon {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   6. WHO WE ARE SECTION (Overlap Layout)
   ========================================================================== */
.home-about {
    padding: 3rem 0 0 0; /* Padding inferior en 0 para eliminar el hueco blanco */
    background-color: var(--color-white);
}

.about-inner {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 600px; /* Reducido de 800px para comprimir la altura */
}

.about-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 65%;
    height: 100%;
    z-index: 1;
}

.about-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #d8cbbc;
    background-image: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
}

.about-card {
    position: relative;
    z-index: 2;
    background-color: var(--color-white);
    padding: 3rem; /* Reducido de 4rem */
    width: 50%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.about-card .section-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

.about-card p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem; /* Reducido de 2rem */
}

.btn-outline-small {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2.5rem; /* Reducido de 4rem */
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem; /* Reducido de 2rem */
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.stat-icon {
    max-width: 45px;
    height: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.stat-number {
    font-size: clamp(1.2rem, 2vw, 1.6rem); /* Se adapta para oraciones completas en PC */
    font-weight: 600; /* Grosor ajustado para lectura */
    letter-spacing: -0.5px;
    line-height: 1.3;
    word-wrap: break-word; /* Evita que el texto rompa la caja por la derecha */
    hyphens: auto; 
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   7. CTA SECTION
   ========================================================================== */
.home-cta {
    padding: 8rem 0; /* Equilibrio simétrico superior e inferior */
    text-align: center;
    background-color: #f7f7f7; 
}

.cta-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.cta-subtitle {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.btn-outline {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid var(--color-black);
    border-radius: 30px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-outline:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

/* ==========================================================================
   8. ANIMACIONES Y UTILIDADES (Scroll Reveal)
   ========================================================================== */
.dhema-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.dhema-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   9. MEDIA QUERIES (Ajustes Móviles Finales)
   ========================================================================== */
@media (max-width: 992px) {
    .home-about {
        padding: 0; 
    }

    .about-inner {
        flex-direction: column;
        justify-content: center;
        padding: 4rem 1rem; 
    }
    
    .about-image-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .about-card {
        width: 92%;
        margin: 0 auto;
        padding: 2.5rem 1.5rem;
        border-radius: 4px;
        overflow: hidden; 
    }
}

@media (max-width: 768px) {
    /* 1. Reducción drástica de espacios (respiros) entre secciones en móvil */
    .home-projects,
    .home-testimonials,
    .home-services,
    .home-cta {
        padding: 4rem 0; 
    }

    /* 2. Aceramos el título de proyectos a las fotos */
    .projects-header {
        margin-bottom: 2rem; 
    }

    /* 3. CORRECCIÓN QUIÉNES SOMOS: Forzamos 1 sola columna para que textos largos quepan sin dañar la caja */
    .about-stats {
        grid-template-columns: 1fr; 
        gap: 1rem;
    }

    .stat-item {
        border: 1px solid var(--color-border);
        border-radius: 6px;
        padding: 1.2rem 1rem;
        align-items: center;
        text-align: center;
    }

    .stat-number {
        font-size: 1.5rem; 
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
}