/* ===========================
   style.css (parche responsive)
   =========================== */

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    margin: 0;
}

header {
    background: #004466;
    color: #fff;
    padding: 1rem 0;
    width: 100%;
    box-sizing: border-box;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* logo: si quieres ajustar espacio usa .logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo img { height: 50px; max-height:50px; display:block; }
.logo span { color:#fff; font-weight:700; font-family: 'Montserrat', sans-serif; font-size:1.5rem; }

/* Menú principal (desktop) */
nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    align-items: center;
}
nav ul li { margin: 0; }
nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 10px;
    display: inline-block;
}

/* Hero */
.hero {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hero video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    object-fit: cover;
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
}

.hero p {
    margin-top: 1rem;
    font-size: 1.2rem;
}

/* Botón principal */
.btn-primary {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: #007acc;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background: #005b99; /* azul más oscuro al pasar el ratón */
    transform: translateY(-2px);
}

section {
    padding: 2rem 0;
}

.services {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.service {
    flex: 1;
    min-width: 250px;
    background: #fff;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.service h3 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.5rem;
}

footer {
    background: #004466;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

/* Servicios con imágenes de fondo */
.service:nth-child(1) {
    background-image: url('reformas.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    height: 100%;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service:nth-child(2) {
    background-image: url('parciales.jpeg');
    background-size: cover;
    background-position: center;
    color: #fff;
    height: 100%;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service:nth-child(3) {
    background-image: url('mantenimiento.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    height: 100%;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===========================
   Reglas responsive + menú móvil
   =========================== */

/* Estilos del botón hamburguesa (inicialmente oculto en desktop) */
.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    padding: 6px 10px;
    cursor: pointer;
}

/* Mobile: colapsamos el menú y mostramos toggle */
@media (max-width: 900px) {

    nav {
      align-items: center;
      gap: 12px;
      padding: 8px 0;
    }

    /* mostrar el botón */
    .menu-toggle {
      display: block;
    }

    /* ocultar el ul por defecto cuando JS está disponible (clase .js) */
    .js nav ul {
      display: none;
      flex-direction: column;
      width: 100%;
      margin-top: 8px;
      background: rgba(9, 45, 49, 0.98); /* fondo del menu desplegado */
      border-radius: 6px;
      padding: 6px 0;
    }

    /* cuando nav tiene la clase .open mostramos el menú */
    nav.open ul {
      display: flex;
    }

    /* enlaces en vertical */
    .js nav ul li {
      width: 100%;
    }
    .js nav ul li a {
      display: block;
      padding: 12px 16px;
      border-top: 1px solid rgba(255,255,255,0.05);
      font-size: 15px;
    }

    /* reducir tamaño del logo/text */
    .logo span { font-size: 1.05rem; }
    .logo img { height: 44px; }

    /* Hacer que el menú no empuje la hero demasiado */
    .hero { height: 360px; }

    /* Ajustes para que los servicios apilen mejor */
    .services { flex-direction: column; }
}

/* Si no hay JS activo, mostrar siempre el ul (mejora degradado) */
.no-js nav ul {
  display: flex !important;
  flex-direction: row;
}

/* Si el header lo quieres fijo, puedes descomentar y ajustar la altura */
 /*
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}
body {
  padding-top: 82px; /* ajusta esto a la altura real del header */
}
*/

/* Pequeños refinamientos visuales */
nav ul li a:focus, nav ul li a:hover {
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  outline: none;
}
