/* === Body === */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    color: #333;
}

/* === Header === */
header {
    background-color: #2c3e50;
    color: #f2f2f2;
    padding: 20px;
}

.header-contenedor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.header-contenedor img {
    height: 100px;
    width: auto;
}

/* === Nav === */
nav {
    background-color: #0cd502;
    padding: 10px;
    text-align: center;
}

nav a {
    color: rgb(0, 0, 0);
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

nav a:hover {
    transform: scale(1.05);
    color: #f2f2f2;
}

/* === Main === */
main {
    flex: 1;
    padding: 20px;
    max-width: 900px;
    margin: 20px auto;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* === imágenes página contacto === */
.imagen-contacto {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

/* === Footer === */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 20px;
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

footer .footer-section {
    width: 30%;
    padding: 10px;
}

footer .footer-section h3 {
    margin-top: 0;
    color: #fff;
    font-size: 18px;
    margin-bottom: 10px;
}

footer .footer-section p,
footer .footer-section ul {
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
}

footer .footer-section ul {
    padding: 0;
    list-style-type: none;
}

footer .footer-section ul li {
    margin-bottom: 8px;
}

footer .footer-section a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer .footer-section a:hover {
    color: #0cd502;
}

footer .footer-section .horario,
footer .footer-section .politicas {
    font-size: 14px;
    margin-top: 15px;
}

footer .footer-section .horario p,
footer .footer-section .politicas a {
    margin: 5px 0;
}

/* === Página de inicio === */
.galeria {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    width: 280px;
    text-align: center;
    padding: 15px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: scale(1.05);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.card h3 {
    color: #2c3e50;
    margin-top: 10px;
}

.card a {
    color: inherit;
    text-decoration: none;
}

.card a:hover {
    text-decoration: none;
}

/* === Página de servicio === */
.pagina-servicio img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-top: 20px;
    border-radius: 10px;
}

/* === Página de formulario === */
/* Solo formularios sin clase horizontal-form son verticales */
form:not(.horizontal-form) {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    width: 100%;
    margin-top: 20px;
}

label {
    font-weight: bold;
}

input[type="text"],
input[type="email"],
textarea,
select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    font-size: 16px;
    font-family: Arial, sans-serif;
    background-color: #fff;
    color: #333;
    transition: border-color 0.3s ease;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 7px;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

input[type="submit"] {
    background-color: #2c3e50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: fit-content;
}

input[type="submit"]:hover {
    background-color: #1a242f;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #0cd502;
    outline: none;
}

/* === Botón flotante de WhatsApp === */
#whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transition: transform 0.3s ease;
}

#whatsapp-button:hover {
    transform: scale(1.1);
}

#whatsapp-button img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* === Mapa interactivo === */
.mapa {
    margin-top: 20px;
    height: 300px;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* === Animaciones y transiciones === */
* {
    box-sizing: border-box;
}

a {
    transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
    transform: scale(1.05);
}

/* === Responsive === */
@media (max-width: 768px) {
    .header-contenedor {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    nav {
        padding: 15px 5px;
    }

    nav a {
        display: inline-block;
        margin: 10px 8px;
        font-size: 16px;
    }

    main {
        margin: 10px;
        padding: 15px;
    }

    form:not(.horizontal-form) {
        max-width: 90%;
    }

    .galeria {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
    }

    .pagina-servicio img {
        height: auto;
    }

    footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    footer .footer-section {
        width: 100%;
        margin-bottom: 20px;
    }

    footer .footer-section .horario,
    footer .footer-section .politicas {
        font-size: 12px;
    }
}

/* === Seguimiento de reparaciones === */
.seguimiento-container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.seguimiento-container h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
}

.estado-reparacion {
    background-color: #e7fbe7;
    border: 1px solid #0cd502;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.error-mensaje {
    background-color: #ffe0e0;
    border: 1px solid #ff4c4c;
    color: #a10000;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Formulario horizontal en RegistrarReparacion */
form.horizontal-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 100%;
  align-items: flex-start;
}

form.horizontal-form label {
  flex: 0 0 150px; /* ancho fijo para etiquetas */
  font-weight: bold;
  margin-top: 10px;
}

form.horizontal-form input[type="text"],
form.horizontal-form input[type="date"],
form.horizontal-form select {
  flex: 1 1 200px; /* que los inputs crezcan */
  padding: 8px 10px;
  font-size: 16px;
}

form.horizontal-form textarea {
  flex: 1 1 100%;
  min-height: 80px;
  padding: 8px 10px;
  font-size: 16px;
}

form.horizontal-form input[type="submit"] {
  flex: 0 0 100%;
  margin-top: 20px;
  width: 150px;
  align-self: center;
  cursor: pointer;
}

/* Ajustes responsive para pantallas pequeñas */
@media (max-width: 768px) {
  form.horizontal-form {
    flex-direction: column;
  }
  form.horizontal-form label,
  form.horizontal-form input[type="text"],
  form.horizontal-form input[type="date"],
  form.horizontal-form select,
  form.horizontal-form textarea,
  form.horizontal-form input[type="submit"] {
    flex: 1 1 100%;
  }
  form.horizontal-form input[type="submit"] {
    width: 100%;
  }
}
