/* Activa el deslizamiento suave en toda la página */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Corrección: Aplicamos la fuente Montserrat que vinculaste en tu HTML */
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #fafafa;
    color: #333;
}

/* =========================================
   Barra de Navegación
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 1000; /* Asegura que la barra esté por encima del resto */
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #111;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #000;
}

.btn-contacto {
    border: 2px solid #111;
    padding: 8px 20px;
    border-radius: 50px;
    color: #111 !important;
}

.btn-contacto:hover {
    background-color: #111;
    color: #fff !important;
}

/* --- Botón Hamburguesa --- */
.hamburger {
    display: none;
    cursor: pointer;
    gap: 5px;
    flex-direction: column;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #111;
    transition: all 0.3s ease-in-out;
}

/* =========================================
   Sección Principal (Hero)
   ========================================= */
.hero {
    /* Cambiado a min-height para evitar que el texto se corte en móviles */
    min-height: 85vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #111 0%, #333 100%);
    color: white;
    padding: 40px 20px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background-color: #ffffff;
    color: #111;
    padding: 16px 35px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* =========================================
   Sección de Servicios
   ========================================= */
.servicios {
    padding: 100px 5%;
    background-color: #ffffff;
    text-align: center;
}

.servicios h2 {
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #111;
    font-weight: 800;
    letter-spacing: -1px;
}

.grid-servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.card-servicio {
    background-color: #fafafa;
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid #eaeaea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.card-servicio:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.card-servicio h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #111;
}

.card-servicio p {
    color: #666;
    line-height: 1.6;
    font-size: 1.05rem;
}

.btn-secundario {
    display: inline-block;
    margin-top: 20px;
    color: #111;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s;
}

.btn-secundario:hover {
    color: #555;
}

/* =========================================
   Sección Sobre Nosotros
   ========================================= */
.sobre-nosotros {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 5%;
    background-color: #f4f4f5;
    gap: 60px;
}

.nosotros-contenido {
    flex: 1;
}

.nosotros-contenido h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: #111;
    font-weight: 800;
    letter-spacing: -1px;
}

.nosotros-contenido p {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}

.lista-ventajas {
    list-style: none;
}

.lista-ventajas li {
    font-size: 1.1rem;
    color: #222;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nosotros-imagen {
    flex: 1;
}

.placeholder-img {
    width: 100%;
    height: 450px;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: bold;
    font-size: 1.2rem;
    border: 2px dashed #ccc;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* =========================================
   Contacto y Footer
   ========================================= */
.contacto-footer {
    background-color: #111;
    color: #fff;
    padding: 80px 5% 20px;
}

.contacto-contenedor {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.contacto-info {
    flex: 1;
}

.contacto-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -1px;
}

.contacto-info p {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.datos-contacto {
    list-style: none;
}

.datos-contacto li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #ddd;
}

.contacto-formulario {
    flex: 1;
    background-color: #222;
    padding: 40px;
    border-radius: 15px;
}

.contacto-formulario form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contacto-formulario input,
.contacto-formulario textarea {
    width: 100%;
    padding: 15px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
}

.contacto-formulario input::placeholder,
.contacto-formulario textarea::placeholder {
    color: #888;
}

.contacto-formulario input:focus,
.contacto-formulario textarea:focus {
    outline: none;
    border-color: #fff;
}

.btn-enviar {
    background-color: #fff;
    color: #111;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.btn-enviar:hover {
    background-color: #ddd;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    color: #777;
    font-size: 0.9rem;
}

/* =========================================
   MEDIA QUERIES (Diseño para Celulares)
   ========================================= */
@media (max-width: 900px) {
    .sobre-nosotros {
        flex-direction: column;
    }
    .nosotros-imagen {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Menú Hamburguesa */
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 65px;
        left: -100%;
        flex-direction: column;
        background-color: #ffffff;
        width: 100%;
        text-align: center;
        transition: 0.3s ease-in-out;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        z-index: 999;
    }

    .nav-links.active {
        left: 0; 
    }

    .nav-links li {
        margin: 20px 0;
    }

    /* Animación del menú hamburguesa a "X" */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Textos y espaciados generales */
    .hero-content h1 {
        font-size: 2.2rem; 
        line-height: 1.2;
    }
    
    .hero, .servicios, .sobre-nosotros, .contacto-footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Formulario de Contacto apilado */
    .contacto-contenedor {
        flex-direction: column;
    }
}