/* ========================================
   SECCIÓN IMAGEN Y TEXTO - ESTILOS DEL FRONTEND
   ======================================== */

.image-text-section {
    padding: 60px 0;
    margin: 40px 0;
    overflow: hidden;
}

.image-text-section .section-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Por defecto 2 columnas */
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 400px;
}

/* Layout: Imagen izquierda/derecha */
.image-text-section.layout-image-left .section-container,
.image-text-section.layout-image-right .section-container {
    grid-template-columns: 1fr 1fr;
}

/* Layout: Imagen arriba/abajo */
.image-text-section.layout-image-top .section-container,
.image-text-section.layout-image-bottom .section-container {
    grid-template-columns: 1fr;
    text-align: center;
}

/* Layout: Imagen a la izquierda */
.image-text-section.layout-image-left .section-image {
    order: 1;
}

.image-text-section.layout-image-left .section-text {
    order: 2;
}

/* Layout: Imagen a la derecha */
.image-text-section.layout-image-right .section-image {
    order: 2;
}

.image-text-section.layout-image-right .section-text {
    order: 1;
}

/* Layout: Imagen arriba */
.image-text-section.layout-image-top .section-image {
    order: 1;
    margin-bottom: 20px;
}

.image-text-section.layout-image-top .section-text {
    order: 2;
}

/* Layout: Imagen abajo */
.image-text-section.layout-image-bottom .section-image {
    order: 2;
    margin-top: 20px;
}

.image-text-section.layout-image-bottom .section-text {
    order: 1;
}

/* Imagen */
.image-text-section .section-image {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-text-section .section-image:hover {
    transform: translateY(-5px);
}

.image-text-section .section-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-text-section .section-image:hover img {
    transform: scale(1.05);
}

/* Contenido de texto */
.image-text-section .section-text {
    padding: 20px 0;
}

.image-text-section .section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 0 20px 0;
    line-height: 1.2;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.image-text-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: #dc3545;
    border-radius: 2px;
}

.image-text-section .section-content-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 30px 0;
    color: #555;
}

/* Estilos para contenido con formato HTML */
.image-text-section .section-content-text h1,
.image-text-section .section-content-text h2,
.image-text-section .section-content-text h3,
.image-text-section .section-content-text h4,
.image-text-section .section-content-text h5,
.image-text-section .section-content-text h6 {
    color: #333;
    font-weight: 600;
    margin: 20px 0 15px 0;
    line-height: 1.3;
}

.image-text-section .section-content-text h1 { font-size: 2rem; }
.image-text-section .section-content-text h2 { font-size: 1.7rem; }
.image-text-section .section-content-text h3 { font-size: 1.4rem; }
.image-text-section .section-content-text h4 { font-size: 1.2rem; }
.image-text-section .section-content-text h5 { font-size: 1.1rem; }
.image-text-section .section-content-text h6 { font-size: 1rem; }

.image-text-section .section-content-text p {
    margin: 15px 0;
    line-height: 1.7;
}

.image-text-section .section-content-text strong {
    font-weight: 700;
    color: #333;
}

.image-text-section .section-content-text em {
    font-style: italic;
}

.image-text-section .section-content-text ul,
.image-text-section .section-content-text ol {
    margin: 15px 0;
    padding-left: 25px;
}

.image-text-section .section-content-text li {
    margin: 8px 0;
    line-height: 1.6;
}

.image-text-section .section-content-text blockquote {
    border-left: 4px solid #dc3545;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.image-text-section .section-content-text a {
    color: #dc3545;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.image-text-section .section-content-text a:hover {
    border-bottom-color: #dc3545;
}

.image-text-section .section-button {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220,53,69,0.3);
    border: none;
    cursor: pointer;
}

.image-text-section .section-button:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220,53,69,0.4);
    color: white;
    text-decoration: none;
}

.image-text-section .section-button:active {
    transform: translateY(0);
}

/* Placeholder cuando no hay imagen */
.image-text-section .section-image-placeholder {
    width: 100%;
    height: 400px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #6c757d;
    font-size: 18px;
    font-weight: 500;
}

.image-text-section .section-image-placeholder::before {
    content: '📷';
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive - Tablet */
@media (max-width: 968px) {
    /* Forzar layout de una columna en tablets */
    .image-text-section .section-container {
        grid-template-columns: 1fr !important;
        gap: 40px;
        text-align: center;
    }
    
    /* Forzar imagen arriba en todos los layouts */
    .image-text-section .section-image {
        order: 1 !important;
    }
    
    .image-text-section .section-text {
        order: 2 !important;
    }
    
    .image-text-section .section-title {
        font-size: 2rem;
    }
    
    .image-text-section .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Responsive - Móvil */
@media (max-width: 768px) {
    .image-text-section {
        padding: 40px 0;
        margin: 20px 0;
    }
    
    .image-text-section .section-container {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
        padding: 0 15px;
    }
    
    /* FORZAR imagen arriba en móviles - IMPORTANTE */
    .image-text-section .section-image {
        order: 1 !important;
        margin-bottom: 20px;
        margin-top: 0;
    }
    
    .image-text-section .section-text {
        order: 2 !important;
    }
    
    .image-text-section .section-title {
        font-size: 1.8rem;
    }
    
    .image-text-section .section-content-text {
        font-size: 1rem;
    }
    
    .image-text-section .section-image img,
    .image-text-section .section-image-placeholder {
        height: 250px;
    }
    
    .image-text-section .section-button {
        padding: 10px 25px;
        font-size: 13px;
    }
}

@media (max-width: 968px) {
    .image-text-section .section-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .image-text-section.layout-image-left .section-image,
    .image-text-section.layout-image-right .section-image {
        order: 1;
    }
    
    .image-text-section.layout-image-left .section-text,
    .image-text-section.layout-image-right .section-text {
        order: 2;
    }
    
    .image-text-section .section-title {
        font-size: 2rem;
    }
    
    .image-text-section .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .image-text-section {
        padding: 40px 0;
        margin: 20px 0;
    }
    
    .image-text-section .section-container {
        padding: 0 15px;
    }
    
    .image-text-section .section-content {
        gap: 30px;
    }
    
    .image-text-section .section-image img,
    .image-text-section .section-image-placeholder {
        height: 250px;
    }
    
    .image-text-section .section-title {
        font-size: 1.8rem;
    }
    
    .image-text-section .section-content-text {
        font-size: 1rem;
    }
    
    .image-text-section .section-button {
        padding: 10px 25px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .image-text-section .section-title {
        font-size: 1.5rem;
    }
    
    .image-text-section .section-content-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .image-text-section .section-image img,
    .image-text-section .section-image-placeholder {
        height: 200px;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-text-section .section-text {
    animation: fadeInUp 0.6s ease-out;
}

.image-text-section .section-image {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Estados de hover mejorados */
.image-text-section .section-text:hover .section-title::after {
    width: 80px;
    transition: width 0.3s ease;
}

/* Efectos de parallax ligero */
@media (min-width: 969px) {
    .image-text-section .section-image {
        transform: translateZ(0);
        will-change: transform;
    }
}
