/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    --brand-red: #e40044;
    --brand-dark: #1e1e1e;
    --brand-blue-dark: #19184A;
    --brand-blue-light: #B5D8EB;
    --gray-bg: #f9f9fb;
    --gray-card: #f4f5f7;
    --text-muted: #6b7280;
    --max-width: 1140px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
}

body {
    background-color: #ffffff;
    color: var(--brand-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Contenedor principal 100% centrado */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.text-center {
    text-align: center;
}

/* =========================================
   2. HERO SECTION
   ========================================= */
.hero-section {
    background-color: var(--gray-bg);
    padding: 6rem 1rem 2.5rem 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

.hero-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
    color: var(--brand-dark);
    text-align: center;
}

.hero-content p {
    font-size: 16px;
    font-weight: 500;
    color: var(--brand-dark);
    text-align: center;
}

@media (min-width: 768px) {
    .hero-section {
        border-bottom-right-radius: 4rem;
        padding: 8rem 0 5rem 0;
        margin-bottom: 3rem;
    }
    .hero-layout {
        padding: 0 2rem;
        flex-direction: row;
        justify-content: space-between;
        gap: 4rem;
    }
    .hero-content h1 {
        font-size: 42px;
        text-align: left;
    }
    .hero-content p {
        font-size: 18px;
        text-align: left;
    }
    .hero-image-wrapper {
        display: flex;
        flex: 1;
        justify-content: flex-end;
    }
    .hero-image-wrapper img {
        width: 100%;
        max-width: 500px;
    }
}

/* =========================================
   3. INTEGRACIÓN TÉCNICA (Carousel)
   ========================================= */
.carousel-section {
    position: relative;
    margin-top: 3rem;
    padding-bottom: 3rem;
    width: 100%;
}

.section-header {
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 800;
}

.tech-cards-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 1rem;
    padding: 0 1rem 1.5rem 1rem;
    margin-bottom: 1rem;
}

.tech-cards-grid::-webkit-scrollbar {
    display: none;
}

.tech-card {
    flex: 0 0 calc(100% - 2rem);
    scroll-snap-align: start;
    border-radius: 1.5rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

/* Controles Mobile */
.carousel-controls-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}

.carousel-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 0 !important;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--brand-red);
    transform: scale(1.2);
}

/* Iconos y Textos de Cards */
.tech-card .icon-wrapper { margin-bottom: 1.5rem; }
.tech-card .icon-wrapper svg { width: 32px; height: 32px; }
.tech-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 1rem; }
.tech-card p { font-weight: 500; font-size: 14px; line-height: 1.6; }

.card-light-blue { background-color: var(--brand-blue-light); color: var(--brand-dark); }
.card-gray { border: 1px solid #e9eaee; background-color: #FFFFFF; color: var(--brand-dark); }
.card-dark-blue { background-color: var(--brand-blue-dark); color: #ffffff; }
.card-dark-blue p { color: #d1d5db; }

@media (min-width: 1024px) {
    .section-header {
        padding-left: 0;
    }

    .carousel-section { padding-bottom: 0; }

    .tech-cards-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        overflow: visible;
        padding: 0; /* Reseteado a 0 */
    }

    .tech-card { flex: none; }

    .carousel-controls-wrapper,
    .carousel-dots {
        display: none !important;
    }

    .tech-card:hover {
        transform: scale(1.1);
        box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
        z-index: 10;
    }
    .tech-card:hover ~ .tech-card { transform: translateX(16px); }
    .tech-cards-grid:has(.tech-card:hover) .tech-card:has(~ .tech-card:hover) { transform: translateX(-16px); }
}

/* =========================================
   4. DOCUMENTACIÓN TÉCNICA
   ========================================= */
.docs-wrapper {

    margin-top: 5rem;
    background-color: var(--gray-card);
    border-radius: 1.5rem;
    padding: 2.5rem 1rem;
    margin-bottom: 5rem;
    width: 100%;
}

.docs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}

.doc-item {
    background-color: #ffffff;
    border-radius: 1.25rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    color: var(--brand-dark) !important;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.doc-item:hover, .doc-item:active, .doc-item:focus, .doc-item:visited {
    color: var(--brand-dark) !important;
    text-decoration: none;
}

.doc-icon-box {
    width: 100px;
    height: 100px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background-color: transparent;
}

.doc-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
}

.doc-item-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--brand-dark);
    margin-left: 1rem;
    flex: none;
    margin-right: 0;
}

.doc-arrow {
    color: var(--brand-red);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    margin-left: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-item:hover .doc-arrow {
    opacity: 1;
    visibility: visible;
    transform: translateX(8px);
    margin-left: 4px;
}

@media (min-width: 768px) {
    .docs-wrapper {
        padding: 4rem;
    }
    .docs-grid {
        grid-template-columns: repeat(2, 1fr);
        padding-left: 0; /* Reseteado a 0 */
    }
    .doc-icon-box {
        width: 120px;
        height: 120px;
    }
}

/* =========================================
   5. AJUSTES FINALES MOBILE
   ========================================= */
@media (max-width: 768px) {

    .doc-arrow {
        display: none;
    }

    .doc-icon-box img {

        padding:0px;
    }

    .tech-card {
        align-items: flex-start !important;
        text-align:left !important;

    }

    .docs-wrapper {
        margin-top:0.5rem;
    }
    .hero-image-wrapper img { width: 100% !important; }

    .doc-item { gap: 15px; }
    .doc-item-title { margin-left: 0.75rem; }
}

/* =========================================
   6. FOOTER OVERRIDES
   ========================================= */
footer.footer-section .container-lg {
    max-width: var(--max-width) !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 768px) {
    footer.footer-section .container-lg {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}