/* VARIABLES DE DISEÑO */
:root {
    --primary: #f97316;       /* Naranja construcción (Llamativo pero profesional) */
    --secondary: #1e293b;     /* Azul oscuro/grisáceo (Confianza y seriedad) */
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --text: #334155;
    --font-titles: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* TOP BAR */
.top-bar {
    background: var(--dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-info span {
    margin-right: 20px;
}

.top-info i {
    color: var(--primary);
    margin-right: 5px;
}

/* HEADER */
.main-header {
    background: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    font-family: var(--font-titles);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.logo span {
    color: var(--primary);
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary);
}

.btn-quote {
    background: var(--primary);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 5px;
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 80vh; /* Altura del 80% de la pantalla */
    min-height: 500px;
    background-image: url(../Imagenes/HomePageBackground.jpg); /* Imagen de construcción */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.4));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.upper-title {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 15px;
}

.hero h2 {
    font-family: var(--font-titles);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* BOTONES */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    margin-left: 15px;
}

.btn-primary:hover { background: #e66400; transform: translateY(-3px); }
.btn-outline:hover { background: var(--white); color: var(--dark); }

/* Responsive móvil básico */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
}

@media (max-width: 768px) {
    /* Escondemos el menú original */
    .nav-menu {
        display: none; 
        position: absolute;
        top: 80px; /* Debajo del header */
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 999;
    }

    /* Esta clase la pondremos con JavaScript al hacer click */
    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column; /* Menú en lista vertical */
        gap: 15px;
        text-align: center;
    }

    .mobile-toggle {
        display: block; /* Mostramos el botón de hamburguesa */
        cursor: pointer;
        font-size: 1.5rem;
        color: var(--secondary);
        background: none;
        border: none;
    }

    /* Estilo para los servicios dentro del menú móvil */
    .nav-menu .submenu {
        position: static; /* Que no flote, que se despliegue hacia abajo */
        box-shadow: none;
        padding-left: 0;
        background: #f1f5f9;
        border-radius: 8px;
        margin-top: 10px;
    }
}

/* SECCIÓN SOBRE NOSOTROS */
.about-home {
    padding: 100px 0;
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 500px;        /* Altura fija para que combine con el texto de al lado */
    object-fit: cover;    /* ESTO ES LO MÁS IMPORTANTE: recorta la foto para llenar el espacio sin deformarla */
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    display: block;
}

/* Placa flotante de años de experiencia */
.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--primary);
    color: var(--white);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.experience-badge .years {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.about-text h2 {
    font-family: var(--font-titles);
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.about-text p {
    margin-bottom: 30px;
    color: var(--text);
}

/* Lista de características */
.features-list {
    margin-bottom: 35px;
}

.feature-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.feature-item i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-top: 5px;
}

.feature-item h4 {
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 5px;
}

/* BARRA DE ESTADÍSTICAS */
.stats-bar {
    background: var(--secondary);
    color: var(--white);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-card h3 {
    font-family: var(--font-titles);
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-card p {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        order: 2;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .experience-badge {
        right: 10px;
    }

    .feature-item {
        text-align: left;
    }
}

/* --- ESTILOS ESPECÍFICOS DE PINTURA --- */

.page-header {
    background: var(--secondary);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.pintura-header {
    background: linear-gradient(rgba(30, 41, 59, 0.8), rgba(30, 41, 59, 0.8)), 
                url(../Imagenes/pintorBackground.jpg);
    background-size: cover;
    background-position: center;
}

/* Contenedor de las 3 imágenes */
.painting-gallery {
    padding: 80px 0;
    background: var(--light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
    gap: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden; /* Importante para que la imagen no se salga al agrandarse */
    border-radius: 12px;
    height: 400px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease; /* Duración de la animación */
}

/* EFECTO AL PASAR EL CURSOR (HOVER) */
.gallery-item:hover img {
    transform: scale(1.1); /* Agranda la imagen ligeramente */
    filter: brightness(0.7); /* Oscurece un poco para que resalte el texto */
}

/* Texto que sale encima de la imagen al hacer hover (opcional) */
.img-caption {
    position: absolute;
    bottom: -50px; /* Escondido abajo */
    left: 0;
    width: 100%;
    background: rgba(249, 115, 22, 0.9); /* Color naranja de tu marca */
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 700;
    transition: bottom 0.4s ease;
}

.gallery-item:hover .img-caption {
    bottom: 0; /* Sube cuando pasas el mouse */
}

.service-description {
    padding: 60px 0;
    text-align: center;
}

.description-content {
    max-width: 800px;
    margin: 0 auto;
}

/* RESPONSIVE PARA CELULAR */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* Una sola columna en celulares */
    }
    
    .gallery-item {
        height: 300px;
    }
}

/* --- ESTILOS ESPECÍFICOS DE CARPINTERÍA --- */

.carpinteria-header {
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), 
                url('https://images.unsplash.com/photo-1595844730298-b960ff98fee0?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
}

.detailed-info {
    padding: 80px 0;
    background: var(--white);
}

.info-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.info-intro h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

/* Grid de 3 cajas de información */
.info-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.info-box {
    background: var(--light);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.info-box:hover {
    background: var(--white);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.info-box i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.info-box h3 {
    margin-bottom: 15px;
    color: var(--secondary);
}

/* Sección inferior de check-list */
.why-wood-section {
    background: #f1f5f9;
    padding: 50px;
    border-radius: 20px;
}

.check-list {
    margin-top: 20px;
}

.check-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.check-list i {
    color: var(--primary);
}

.about-cta-box {
    background: var(--secondary);
    color: var(--white);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
}

.about-cta-box h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.about-cta-box p {
    margin-bottom: 25px;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 992px) {
    .info-features-grid {
        grid-template-columns: 1fr;
    }
}

/* --- ESTILOS ESPECÍFICOS DE FLOORING --- */

.flooring-header {
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), 
                url('https://images.unsplash.com/photo-1581858726788-75bc0f6a952d?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
}

/* Nota: Las clases .detailed-info, .info-box, .why-wood-section, etc. 
    ya están en tu CSS desde la sección de Carpintería, por lo que 
   se aplicarán automáticamente a esta página también. */

    /* --- ESTILOS ESPECÍFICOS DE SHEETROCK --- */

.sheetrock-header {
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), 
                url('https://images.unsplash.com/photo-1516216628859-9bccecab13ca?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
}

/* --- ESTILOS ESPECÍFICOS DE PRESSURE WASHING --- */

.pressure-header {
    background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.6)), 
                url('https://images.unsplash.com/photo-1619642751034-765dfdf7c58e?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
}

/* --- PÁGINA DE CONTACTO (ESTILO FINAL) --- */

.contact-bg {
    background-color: var(--secondary) !important;
    padding: 60px 0;
    text-align: center;
    color: white;
}

.contact-section {
    padding: 80px 0;
    background-color: #f8fafc;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap; /* Permite que bajen los elementos si no caben */
    gap: 50px;
    align-items: flex-start;
}

/* Lado del Formulario */
.contact-form {
    flex: 1; /* Ocupa el espacio disponible */
    min-width: 320px; /* Evita que se haga muy pequeño */
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.contact-form h3 {
    margin-bottom: 25px;
    color: var(--secondary);
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary);
    font-size: 0.9rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
}

/* Lado de la Información */
.contact-info {
    flex: 0 0 350px; /* Ancho fijo de 350px */
    background: var(--secondary);
    color: white;
    padding: 40px;
    border-radius: 15px;
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

.info-item h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 5px;
}

.info-item a, .info-item p {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Redes Sociales en Contacto */
.social-links-contact {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-5px);
    color: white;
}

.fb:hover { background: #1877f2; }
.ig:hover { background: #e1306c; }
.wa:hover { background: #25d366; }

.w-100 { width: 100%; }

/* MAPA */
.map-area {
    line-height: 0; /* Quita espacio extra debajo del iframe */
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .contact-wrapper {
        flex-direction: column; /* Apila uno arriba del otro en tablets/celulares */
    }
    .contact-info {
        flex: 1 1 100%; /* El sidebar ahora ocupa todo el ancho */
        width: 100%;
    }
}

/* --- FOOTER SIMPLIFICADO --- */
.main-footer {
    background: var(--dark);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 60px;
    text-align: center; /* Centra todo el contenido */
}

.footer-content {
    max-width: 700px; /* Para que el texto no se extienda demasiado a lo ancho */
    margin: 0 auto 30px;
}

.footer-brand h4 {
    font-family: var(--font-titles);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-brand h4 span { 
    color: var(--primary); 
}

.footer-brand p {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 10px;
    line-height: 1.5;
}

.license {
    color: var(--primary);
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-top: 15px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.8rem;
    opacity: 0.5;
}