/* ============================================
   PÁGINA DE SERVICIOS - ESTILO CONSISTENTE CON INDEX
   ============================================ */

/* Hero de servicio - Fondo claro como el index */
.service-hero {
    min-height: 70vh;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.service-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 10% 90%, rgba(192, 0, 0, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(0, 0, 0, 0.02) 0%, transparent 40%);
    pointer-events: none;
}

.service-hero .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.service-hero .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 968px) {
    .service-hero .row {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
}

.service-title-main {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.service-title-main span {
    color: var(--primary-red);
}

.service-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 540px;
}

@media (max-width: 968px) {
    .service-intro {
        margin: 0 auto;
    }
}

/* Imágenes del hero */
.service-hero .image-wrapper {
    position: relative;
}

.service-hero .main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--white);
}

/* ============================================
   BLOQUES DE CONTENIDO ALTERNADOS
   ============================================ */
.content-block {
    padding: 5rem 0;
    background: var(--white);
}

.content-block:nth-child(even) {
    background: var(--gray-50);
}

.content-block .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-block .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 968px) {
    .content-block .row {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Layout específicos */
.layout-img-text .row {
    direction: ltr;
}

.layout-text-img .row {
    direction: rtl;
}

.layout-text-img .text-wrapper {
    direction: ltr;
}

.layout-text-img .image-wrapper {
    direction: ltr;
}

/* Imágenes en bloques */
.image-wrapper {
    position: relative;
}

.main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 4px solid var(--white);
    transition: transform 0.5s ease;
}

.image-wrapper video {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 4px solid var(--white);
    transition: transform 0.5s ease;
}

.image-wrapper:hover .main-image {
    transform: scale(1.02);
}

/* Número de bloque */
.block-number {
    font-family: var(--font-mono);
    font-size: 5rem;
    font-weight: 800;
    color: var(--gray-200);
    line-height: 1;
    margin-bottom: 1rem;
}

/* Tag del bloque */
.block-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(192, 0, 0, 0.08);
    color: var(--primary-red);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-red);
}

.block-tag i {
    font-size: 1rem;
}

/* Título del bloque */
.block-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Texto del bloque */
.block-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Lista de features */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

.feature-list li i {
    color: var(--primary-red);
    font-size: 1.25rem;
}

/* Grid de imágenes (para bloque tecnología) */
.image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.image-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 3px solid var(--white);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.image-grid img:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Layout dos columnas */
.layout-two-col {
    background: var(--gray-100);
}

.layout-two-col .row {
    align-items: stretch;
}

.col-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.col-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.col-content .main-image {
    height: 250px;
    margin-top: auto;
}

/* Layout imagen full con overlay */
.layout-full-img {
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
}

.layout-full-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.layout-full-img .container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.layout-full-img .content-wrapper {
    max-width: 700px;
}

.layout-full-img .block-number {
    color: rgba(255, 255, 255, 0.15) !important;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.3);
    margin-bottom: 0.5rem;
}

.layout-full-img .block-tag {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.layout-full-img .block-title {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.layout-full-img .block-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.125rem;
}

/* ============================================
   SUB-ELEMENTOS / ESPECIALIZACIONES
   ============================================ */
.sub-elements-section {
    padding: 5rem 0;
    background: var(--white);
}

.sub-elements-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.sub-elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.sub-element-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.sub-element-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-red);
}

.sub-element-icon {
    width: 60px;
    height: 60px;
    background: rgba(192, 0, 0, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sub-element-icon i {
    font-size: 1.5rem;
    color: var(--primary-red);
}

.sub-element-card:hover .sub-element-icon {
    background: var(--primary-red);
}

.sub-element-card:hover .sub-element-icon i {
    color: var(--white);
}

.sub-element-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .service-hero {
        padding: 4rem 0;
    }

    .service-hero .main-image {
        height: 300px;
    }

    .block-number {
        font-size: 3.5rem;
    }

    .block-title {
        font-size: 1.75rem;
    }

    .layout-full-img .block-title {
        font-size: 2rem;
    }

    .image-grid img {
        height: 150px;
    }

    .sub-elements-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .service-title-main {
        font-size: 2rem;
    }

    .main-image {
        height: 300px;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .sub-element-card {
        flex-direction: column;
        text-align: center;
    }
}