/**
 * Estilos CSS personalizados para WPBakery
 * 
 * Este archivo contiene estilos que facilitan el uso de elementos nativos de WPBakery
 * Se carga desde functions.php
 */

/* ============================================
   HERO / HEADER - Row con imagen de fondo 100vw
   ============================================ */

/* Aplica esta clase a una Row en WPBakery para que ocupe 100vw */
.vc_row.hero-full-width,
.wpb_row.hero-full-width,
.vc_row.hero-full-width .vc_row {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative;
    overflow: hidden;
    left: 0;
    right: 0;
}

/* Para rows de tipo full_width con clase hero-full-width */
.vc_row[data-vc-full-width="true"].hero-full-width,
.vc_row.type-full_width.hero-full-width {
    width: 100vw !important;
    max-width: 100vw !important;
}

/* Contenedor para evitar scroll horizontal */
body,
.vc_row-container {
    overflow-x: hidden;
}

/* Overlay oscuro sobre la imagen de fondo (añade clase "hero-overlay" al column) */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

/* Contenido del hero (añade clase "hero-content" al column) */
.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
}

/* Títulos en el hero */
.hero-content h1,
.hero-content h2,
.hero-content h3,
.hero-content .vc_custom_heading,
.hero-content .heading,
.hero-content [class*="heading"] {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

/* Textos en el hero */
.hero-content p,
.hero-content .wpb_text_column,
.hero-content .vc_column_text,
.hero-content .text-block {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Asegurar que el overlay de WPBakery también funcione */
.hero-full-width .vc_row-overlay {
    z-index: 1;
}

/* Altura mínima para el hero */
.hero-full-width.vc_row {
    min-height: 500px;
    display: flex;
    align-items: center;
}

/* Responsive - Hero */
@media (max-width: 768px) {
    .hero-full-width.vc_row {
        min-height: 400px;
    }
    
    .hero-content h1,
    .hero-content .vc_custom_heading {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .hero-content h1,
    .hero-content .vc_custom_heading {
        font-size: 1.5rem !important;
    }
}

/* ============================================
   SECCIÓN INTRO - Segundo bloque de texto
   ============================================ */

/* Aplica esta clase a una Row para el bloque de texto intro */
.intro-section {
    padding: 80px 20px;
    background: #ffffff;
}

.intro-section .vc_column_container {
    text-align: center;
}

.intro-section h2,
.intro-section .vc_custom_heading {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
    letter-spacing: 1px;
}

.intro-section p,
.intro-section .wpb_text_column {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 900px;
    margin: 0 auto 20px;
}

/* Responsive - Intro */
@media (max-width: 768px) {
    .intro-section {
        padding: 60px 20px;
    }
    
    .intro-section h2,
    .intro-section .vc_custom_heading {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .intro-section p,
    .intro-section .wpb_text_column {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .intro-section h2,
    .intro-section .vc_custom_heading {
        font-size: 1.5rem;
    }
    
    .intro-section p,
    .intro-section .wpb_text_column {
        font-size: 0.95rem;
    }
}

/* ============================================
   SECCIÓN APARTAMENTOS - Grid de apartamentos
   ============================================ */

.apartamentos-grid-section {
    padding: 80px 20px;
    background: #f9f9f9;
}

.apartamento-item {
    margin-bottom: 40px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.apartamento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.apartamento-image {
    margin-bottom: 20px;
}

.apartamento-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.apartamento-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.apartamento-item .vc_column_text {
    color: #666;
    line-height: 1.7;
    text-align: center;
}

/* Responsive - Apartamentos */
@media (max-width: 768px) {
    .apartamentos-grid-section {
        padding: 60px 20px;
    }
    
    .apartamento-item {
        margin-bottom: 30px;
        padding: 15px;
    }
    
    .apartamento-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .apartamento-title {
        font-size: 1.3rem;
    }
}

/* ============================================
   SECCIÓN OTROS APARTAMENTOS
   ============================================ */

.otros-apartamentos-section {
    padding: 80px 20px 40px;
    background: #ffffff;
    text-align: center;
}

.otros-apartamentos-section h2,
.otros-apartamentos-section .vc_custom_heading {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
}

.otros-apartamentos-section .vc_column_text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 900px;
    margin: 0 auto 40px;
}

.otros-apartamentos-grid {
    padding: 0 20px 60px;
    background: #ffffff;
}

/* Responsive - Otros Apartamentos */
@media (max-width: 768px) {
    .otros-apartamentos-section {
        padding: 60px 20px 30px;
    }
    
    .otros-apartamentos-section h2,
    .otros-apartamentos-section .vc_custom_heading {
        font-size: 1.8rem;
    }
    
    .otros-apartamentos-section .vc_column_text {
        font-size: 1rem;
    }
}

/* ============================================
   SECCIÓN UBICACIONES
   ============================================ */

.ubicaciones-section {
    padding: 80px 20px;
    background: #f9f9f9;
}

.ubicaciones-section h2,
.ubicaciones-section .vc_custom_heading {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
}

.ubicaciones-section .vc_column_text {
    font-size: 1.1rem;
    line-height: 2;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

.ubicaciones-section .vc_column_text strong {
    color: #333;
    font-weight: 600;
}

/* Responsive - Ubicaciones */
@media (max-width: 768px) {
    .ubicaciones-section {
        padding: 60px 20px;
    }
    
    .ubicaciones-section h2,
    .ubicaciones-section .vc_custom_heading {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .ubicaciones-section .vc_column_text {
        font-size: 1rem;
        line-height: 1.8;
    }
}

/* ============================================
   SECCIÓN NEWSLETTER
   ============================================ */

.newsletter-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.newsletter-section h2,
.newsletter-section .vc_custom_heading {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
}

.newsletter-section .vc_column_text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto 30px;
}

.newsletter-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Estilos para formulario de newsletter - Añade un formulario usando Contact Form 7 o Mailchimp */
.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    padding: 20px 0;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
}

.newsletter-form button[type="submit"],
.newsletter-form input[type="submit"] {
    padding: 15px 30px;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.newsletter-form button[type="submit"]:hover,
.newsletter-form input[type="submit"]:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.newsletter-section .vc_column_text:last-child {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
}

/* Responsive - Newsletter */
@media (max-width: 768px) {
    .newsletter-section {
        padding: 60px 20px;
    }
    
    .newsletter-section h2,
    .newsletter-section .vc_custom_heading {
        font-size: 1.8rem;
    }
    
    .newsletter-section .vc_column_text {
        font-size: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input[type="email"],
    .newsletter-form button[type="submit"] {
        width: 100%;
    }
}

/* ============================================
   SECCIÓN BLOG
   ============================================ */

.blog-section {
    padding: 80px 20px;
    background: #ffffff;
}

.blog-section .section-title,
.blog-section h2,
.blog-section .vc_custom_heading {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
}

.blog-section .vc_column_text {
    text-align: center;
    margin-bottom: 40px;
}

.blog-grid {
    margin-top: 40px;
}

/* Responsive - Blog */
@media (max-width: 768px) {
    .blog-section {
        padding: 60px 20px;
    }
    
    .blog-section .section-title,
    .blog-section h2,
    .blog-section .vc_custom_heading {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
}

/* ============================================
   SECCIÓN TESTIMONIOS
   ============================================ */

.testimonios-section {
    padding: 80px 20px;
    background: #f9f9f9;
}

.testimonios-section .section-title,
.testimonios-section h2,
.testimonios-section .vc_custom_heading {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.testimonios-section .vc_column_text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.testimonios-grid {
    margin-top: 40px;
}

/* Responsive - Testimonios */
@media (max-width: 768px) {
    .testimonios-section {
        padding: 60px 20px;
    }
    
    .testimonios-section .section-title,
    .testimonios-section h2,
    .testimonios-section .vc_custom_heading {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .testimonios-section .vc_column_text {
        font-size: 1rem;
        margin-bottom: 30px;
    }
}

/* ============================================
   ESTILOS GENERALES - Títulos de sección
   ============================================ */

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
}

/* Espaciado entre secciones */
.vc_row + .vc_row {
    margin-top: 0;
}
