/*
 * BECFER Multi‑page Website Stylesheet
 *
 * This stylesheet defines a simple yet elegant visual language loosely based
 * on the provided mockups【968589050474866†L0-L1】【941565550580705†screenshot】. It uses a dark primary color for
 * the navigation bar and footer, a golden accent colour for highlights,
 * and light backgrounds for content sections. Cards feature subtle
 * shadows and rounded corners reminiscent of the PDF design【968589050474866†L0-L1】.
 */

/* Colour palette */
:root {
  --primary-color: #0c1e30; /* deep navy similar to header in PDF */
  --accent-color: #e0b043;  /* warm gold accent */
  --light-bg: #f8f8f8;      /* light background for sections */
  --dark-bg: #131c31;      /* dark background for contrast sections */
  --white: #ffffff;
  --text-dark: #1c1c1c;
  --text-light: #ffffff;
  --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Reset & base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-dark);
  background-color: var(--light-bg);
  line-height: 1.6;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout helper */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Header */
.header {
  background-color: var(--primary-color);
  color: var(--text-light);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.header .top-bar {
  height: 4px;
  background-color: var(--accent-color);
}
.header .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
/* Logo image in the header. Replace the text with an actual logo image for a more polished look. */
.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
nav ul li a {
  color: var(--text-light);
  font-weight: 500;
  padding: 0.25rem 0;
  position: relative;
}
nav ul li a:hover,
nav ul li a.active {
  color: var(--accent-color);
}

/* Mobile navigation */
@media (max-width: 768px) {
  nav ul {
    /* Ocultar el menú por defecto en móviles; se muestra cuando se añade la clase open vía JS */
    display: none;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary-color);
    width: 100%;
    padding: 1rem;
  }
  nav ul.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  nav ul li {
    width: 100%;
  }
}

/* Responsive nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-light);
  transition: 0.3s ease;
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-align: left;
  /* Imagen de fondo predeterminada. Esta versión usa JAIR.png como
     imagen principal según la indicación del usuario. Asegúrate de que
     el archivo JAIR.png exista en la carpeta images. */
  background-image: url("../images/JAIR.png");
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Atenuamos el oscurecimiento para que la imagen de fondo sea más visible */
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: 0 1rem;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  border: 2px solid var(--accent-color);
  background-color: transparent;
  color: var(--accent-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  margin-right: 1rem;
}
.btn-primary {
  background-color: var(--accent-color);
  color: var(--text-dark);
  border-color: var(--accent-color);
}
.btn-primary:hover {
  background-color: transparent;
  color: var(--accent-color);
}
.btn-secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-dark);
}

/*
 * About BECFER layout
 *
 * The mockup shows the Acerca de BECFER section with the mascot image
 * positioned to the right of the descriptive text. The following styles
 * create a responsive two‑column layout that places the text on the left
 * and the image on the right on wider screens, while stacking them on
 * smaller devices. See nosotros.html for the corresponding markup.
 */
.about-becfer {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.about-becfer .about-text {
  flex: 1 1 55%;
}
.about-becfer .about-image {
  flex: 1 1 35%;
  text-align: center;
}
.about-becfer .about-image img {
  max-width: 250px;
  height: auto;
}

/*
 * Services layout
 *
 * Each service section is a flex container with an image and descriptive
 * content. To mirror the alternating layout of the mockup, a helper
 * class `.reverse` can be added to a `.service` element to swap the
 * positions of the image and text using row‑reverse. Default spacing
 * and sizing is defined here.
 */
.service {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}
.service.reverse {
  flex-direction: row-reverse;
}
.service img {
  flex: 1 1 40%;
  max-width: 400px;
  width: 100%;
}
.service-content {
  flex: 1 1 55%;
}

/* Generic section style */
section {
  scroll-margin-top: 80px;
}
.section-dark {
  background-color: var(--dark-bg);
  color: var(--text-light);
}
.section-light {
  background-color: var(--light-bg);
  color: var(--text-dark);
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  /* Ancho mayor para la línea dorada bajo los títulos principales */
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 0.5rem auto 0;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.card {
  background-color: var(--white);
  border-radius: 6px;
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
}
.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

/* Bullet lists with custom icon */
.check-list {
  list-style: none;
  padding-left: 0;
}
.check-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.5rem;
}
/*
 * Sustituimos el ícono de marca de verificación por una flecha dorada,
 * tal y como se observa en la maqueta proporcionada. La flecha U+279C
 * (➜) ofrece una apariencia clara y moderna.
 */
.check-list li::before {
  content: '\279C'; /* flecha derecha */
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* The old grid layout for services has been removed in favour of a flexbox implementation defined above. */

/* Complementary services list */
.complement-list {
  list-style: none;
  padding-left: 0;
  color: var(--text-light);
}
.complement-list li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.8rem;
}
.complement-list li::before {
  content: '\279C'; /* arrow */
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  /* Increase min width to create bigger thumbnails and add a fixed height for consistent rows */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
}

/*
 * Placeholder boxes for resources.
 * When the real images are too heavy to include or are provided separately,
 * these boxes display the filename so the user knows what to replace.
 */
.gallery-grid .placeholder,
.placeholder {
  background-color: #f0f0f0;
  border: 2px dashed var(--accent-color);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  padding: 0.5rem;
}

/* Small label used to indicate the resource filename in various sections */
.resource-name {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--accent-color);
  margin-top: 0.5rem;
}

/* Metrics bar */
.metrics {
  display: flex;
  justify-content: space-around;
  /* Fondo negro sólido para imitar la barra de métricas de la maqueta */
  background-color: #000;
  color: var(--text-light);
  padding: 2rem 0;
  font-weight: bold;
  font-size: initial;
}

/*
 * Cliente logos image
 *
 * En la sección de aliados comerciales se incluye una imagen con los logotipos
 * de los clientes. Para acercarnos más a la maqueta se aumenta el ancho
 * máximo y se centra la imagen dentro del contenedor. Ajusta el valor de
 * max-width si necesitas un tamaño aún mayor.
 */
.clientes-img {
  max-width: 1000px;
  width: 100%;
  display: block;
  margin: 0 auto 1.5rem;
  border-radius: 4px;
}

/*
 * Testimonios
 *
 * Las tarjetas de testimonios tienen un formato diferente para acercarse al
 * diseño original: un fondo sutilmente más claro, un borde suave y una
 * banda superior en color dorado. Los nombres se destacan en el color
 * acento y se ajustan tamaños de fuente y márgenes para mejorar la legibilidad.
 */
.testimonials .card {
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-top: 4px solid var(--accent-color);
  border-radius: 4px;
  padding: 1.5rem 2rem 2rem;
}
.testimonials .card p:first-of-type {
  font-size: 1rem;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 1rem;
}
.testimonials .card strong {
  color: var(--accent-color);
}
.testimonials .card small {
  color: #555;
}
/* Números grandes y etiquetas pequeñas */
.metrics span {
  display: inline-block;
  text-align: center;
  font-size: 2.5rem;
}
.metrics span small {
  display: block;
  font-size: 0.8rem;
  font-weight: normal;
  margin-top: 0.25rem;
  color: #cccccc;
}

/* Adaptabilidad móvil: reorganizar rejillas y barras para pantallas pequeñas */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .service {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .metrics {
    flex-direction: column;
    align-items: center;
  }
  .metrics span {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* Contact form */
.contact-form {
  background-color: #f1f1f1;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: var(--box-shadow);
}
.contact-form .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.contact-form label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(224, 176, 67, 0.3);
}
.contact-form button {
  display: inline-block;
  /* Botón de contacto en color verde para destacar acción de envío */
  background-color: #58b957;
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.3s ease;
}
/* Color más oscuro al pasar el cursor */
.contact-form button:hover {
  background-color: #46963f;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 2rem 0;
  font-size: 0.9rem;
  border-top: 4px solid var(--accent-color);
}
.footer .footer-container {
  /* Use a row layout for larger screens so the logo and contact details sit side by side. */
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
/* Footer logo container. On large screens it occupies roughly one third of the footer width. */
.footer .footer-container .footer-logo {
  font-weight: bold;
  font-size: 1.2rem;
  flex: 1 1 30%;
}
/* Contact details container occupies the remaining space on large screens. */
.footer .footer-container .footer-contact {
  flex: 1 1 65%;
}
.footer .footer-container .footer-contact p {
  margin: 0.25rem 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  nav ul {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary-color);
    flex-direction: column;
    width: 200px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  nav ul.open {
    max-height: 500px;
  }
  .nav-toggle {
    display: flex;
  }
  .service {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

/* Responsive footer: stack logo and contact details on small screens */
@media (max-width: 768px) {
  .footer .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer .footer-container .footer-logo,
  .footer .footer-container .footer-contact {
    flex: unset;
    width: 100%;
  }
  .footer .footer-container .footer-contact p {
    margin: 0.15rem 0;
  }
}