/* ========================================
   SECTORS SECTION - ¡Protege lo que más importa!
   ======================================== */

.sectors-section {
    position: relative;
    min-height: 825px;
    width: 100%;
    padding: 80px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* ========================================
   FONDO E IMAGEN
   ======================================== */
.sectors-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    z-index: 1;
}

.sectors-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% / 3);
    height: 100%;
    background-image: url('../../assets/images/primerafoto.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

.sectors-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: calc(100% / 3);
    width: calc(100% / 3);
    height: 100%;
    background-image: url('../../assets/images/segundafoto.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

.sectors-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(200% / 3);
    width: calc(100% / 3);
    height: 100%;
    background-image: url('../../assets/images/tercerafoto.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

.sectors-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(1, 15, 32, 0.85) 0%,
        rgba(1, 15, 32, 0.75) 50%,
        rgba(1, 15, 32, 0.85) 100%
    );
    z-index: 2;
}

.sectors-container {
    position: relative;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 5px;
    z-index: 3;
}

/* ========================================
   HEADER - Título y Descripción
   ======================================== */
.sectors-header {
    margin-bottom: 60px;
}

.sectors-title {
    font-family: 'Sora', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 100%;
    letter-spacing: 0;
    margin: 0 0 30px 0;
}

.sectors-description {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
}

.sectors-description p {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #FFFFFF;
    line-height: 26px;
    letter-spacing: 0;
    margin: 0;
}

/* ========================================
   GRID DE TARJETAS
   ======================================== */
.sectors-carousel-wrapper {
    position: relative;
    width: 100%;
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(5, 281px);
    gap: 0;
    justify-content: center;
}

/* Flechas ocultas en desktop */
.sectors-arrow {
    display: none;
}

/* ========================================
   TARJETAS DE SECTORES
   ======================================== */

.sector-card {
    position: relative;
    width: 281px;
    height: 297px;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-left: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1px);
}

.sector-card:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.sector-card:hover {
    background: rgba(0, 0, 0, 0.5);
}

.sector-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sector-number {
    font-family: 'Sora', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 100%;
    display: block;
    margin: 0;
}

.sector-name {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 120%;
    margin: 0;
}

/* ========================================
   RESPONSIVE - TABLET (1024px y menos)
   ======================================== */
@media screen and (max-width: 1024px) {
    .sectors-section {
        min-height: auto;
        padding: 60px 0;
    }

    .sectors-container {
        padding: 0 60px;
    }

    .sectors-title {
        font-size: 40px;
    }

    .sectors-description {
        max-width: 100%;
    }

    .sectors-description p {
        font-size: 15px;
        line-height: 24px;
    }

    .sectors-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }

    .sector-card {
        width: 100%;
        height: 280px;
    }

    .sector-number {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .sector-name {
        font-size: 16px;
    }
}

/* ========================================
   RESPONSIVE - MÓVIL (768px y menos)
   ======================================== */
@media screen and (max-width: 768px) {
    .sectors-section {
        padding: 50px 0;
    }

    .sectors-background::after,
    .sectors-section::before {
        display: none;
    }

    .sectors-background::before {
        width: 100%;
    }

    .sectors-container {
        padding: 0 30px;
    }

    .sectors-header {
        margin-bottom: 40px;
        text-align: left;
    }

    .sectors-title {
        font-size: 32px;
        line-height: 110%;
    }

    .sectors-description {
        text-align: left;
    }

    .sectors-description p {
        font-size: 14px;
        line-height: 22px;
    }

    /* Carrusel móvil */
    .sectors-carousel-wrapper {
        position: relative;
        width: 100%;
        overflow: hidden;
        padding: 0 30px;
    }

    .sectors-grid {
        display: flex;
        gap: 0;
        transition: transform 0.3s ease;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .sector-card {
        flex: 0 0 50%;
        width: 50%;
        height: 280px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 0;
    }

    /* Contenedor de navegación */
    .sectors-navigation {
        display: none;
        justify-content: center;
        gap: 20px;
        margin-top: 30px;
    }

    /* Flechas de navegación */
    .sectors-arrow {
        width: 48px;
        height: 48px;
        background: #4FD1C5;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        color: #010F20;
        -webkit-tap-highlight-color: transparent;
    }

    @media (hover: hover) and (pointer: fine) {
        .sectors-arrow:hover {
            background: #3FB8AC;
            transform: scale(1.1);
        }
    }

    .sectors-arrow:active {
        background: #3FB8AC;
        transform: none;
    }

    .sectors-arrow:disabled {
        background: #2F8F86;
        cursor: not-allowed;
        opacity: 1;
        transform: none;
        color: rgba(1, 15, 32, 0.55);
    }

    .sectors-navigation {
        display: flex;
    }

    .sector-content {
        padding: 25px 20px;
    }

    .sector-number {
        font-size: 36px;
        margin-bottom: 12px;
    }

    .sector-name {
        font-size: 16px;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

/* ========================================
   RESPONSIVE - MÓVIL PEQUEÑO (480px y menos)
   ======================================== */
@media screen and (max-width: 480px) {
    .sectors-section {
        padding: 40px 0;
    }

    .sectors-container {
        padding: 0 20px;
    }

    .sectors-title {
        font-size: 28px;
    }

    .sectors-description p {
        font-size: 13px;
        line-height: 20px;
    }

    .sector-card {
        height: 250px;
    }

    .sector-number {
        font-size: 32px;
    }

    .sector-name {
        font-size: 15px;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sectors-header {
    animation: fadeInUp 0.8s ease both;
}

.sector-card {
    opacity: 0;
    animation: fadeInUp 0.8s ease both;
}

.sector-card:nth-child(1) {
    animation-delay: 0.2s;
}

.sector-card:nth-child(2) {
    animation-delay: 0.3s;
}

.sector-card:nth-child(3) {
    animation-delay: 0.4s;
}

.sector-card:nth-child(4) {
    animation-delay: 0.5s;
}

.sector-card:nth-child(5) {
    animation-delay: 0.6s;
}
