/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN (Mantenemos Footer 80px y Header 70px)
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap");

:root {
  --dismarex-red: #e31b23;
  --dismarex-blue: #006bbd;
  --dismarex-dark: #121212;
  --glass-white: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);

  --header-height: 70px;
  --footer-height: 80px;
  --font-main: "Inter", sans-serif;
  --overlay: rgba(0, 0, 0, 0.5);
}

/* Reset Global */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  scroll-padding-bottom: var(--footer-height);
}

body {
  font-family: var(--font-main);
  background-color: var(--dismarex-dark);
  color: white;
  overflow-x: hidden;
}

/* ==========================================================================
   2. ESTRUCTURA FIJA (HEADER Y FOOTER)
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--dismarex-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  z-index: 2000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.header__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
}
.header__image {
  height: 45px;
  margin-right: 12px;
}
.header__logo {
  font-weight: 800;
  font-size: 1.5rem;
}

.nav__list {
  display: flex;
  list-style: none;
  gap: 8px;
}
.nav__link {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 4px;
  transition: 0.3s;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  -ms-border-radius: 4px;
  -o-border-radius: 4px;
  -webkit-transition: 0.3s;
  -moz-transition: 0.3s;
  -ms-transition: 0.3s;
  -o-transition: 0.3s;
}
.nav__link:hover,
.nav__item--active .nav__link {
  background-color: var(--dismarex-red);
}

/* MENU HAMBURGUESA */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2100;
  padding: 10px;
}

.nav__line {
  display: block;
  width: 50px;
  height: 3px;
  background: white;
  margin: 9px auto;
  transition: 0.3s;
  -webkit-transition: 0.3s;
  -moz-transition: 0.3s;
  -ms-transition: 0.3s;
  -o-transition: 0.3s;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  background-color: var(--dismarex-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  z-index: 2000;
  border-top: 1px solid var(--glass-border);
}

.footer__text {
  font-size: 1rem;
  opacity: 0.7;
}
.footer__nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer__nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 1rem;
  transition: 0.3s;
  -webkit-transition: 0.3s;
  -moz-transition: 0.3s;
  -ms-transition: 0.3s;
  -o-transition: 0.3s;
}
.footer__nav a:hover {
  color: var(--dismarex-red);
}

/* ==========================================================================
   3. SECCIONES Y FONDOS (MODIFICADO: Imagen "Bien Cuadrada")
   ========================================================================== */
.main-content {
  padding-top: var(--header-height);
  padding-bottom: var(--footer-height);
}

.section,
.hero {
  position: relative;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  min-height: 550px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  overflow: hidden;
}

.section--bg {
  /* MODIFICADO: background-attachment: scroll para que la imagen se centre en la sección */
  background-attachment: scroll;
  background-size: cover;
  background-position: center center;
}

.section--bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay);
  z-index: 1;
}

.bg-inicio {
  background-image: url("../assets/images/bg-single-0.webp");
}
.bg-empresa,
.bg-mision,
.bg-vision,
.bg-servicios {
  background-image: url("../assets/images/bg-single-1.webp");
}
.bg-cobertura {
  background-image: url("../assets/images/bg-single-2.webp");
}
.bg-productos {
  background-image: url("../assets/images/bg-single-0.webp");
}
.bg-contacto {
  background-image: url("../assets/images/bg-single-3.webp");
}

.contact-info {
  z-index: 5;
  font-size: 1.2rem;
}
.contact-list {
  list-style: none;
  color: white;
  margin-bottom: 20px;
}
.contact-label {
  color: #ffeb3b;
  font-weight: 700;
}

/* ==========================================================================
   4. REDISEÑO DE TARJETAS (NUEVA PERSPECTIVA)
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
  gap: 30px;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  z-index: 5;
}

.service-card {
  background: var(--glass-white);
  backdrop-filter: blur(12px);
  /* Efecto cristal */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px 30px;
  text-decoration: none;
  color: white;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  -webkit-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  -moz-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  -ms-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  -o-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  -ms-border-radius: 20px;
  -o-border-radius: 20px;
}

/* Efecto al pasar el mouse */
.service-card:hover {
  transform: translateY(-12px);
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--dismarex-blue);
  box-shadow: 0 15px 35px rgba(0, 107, 189, 0.3);
  -webkit-transform: translateY(-12px);
  -moz-transform: translateY(-12px);
  -ms-transform: translateY(-12px);
  -o-transform: translateY(-12px);
}

.service-card__icon {
  width: 70px;
  height: 70px;
  background: var(--dismarex-blue);
  color: white;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  transition: 0.3s;
  -webkit-transition: 0.3s;
  -moz-transition: 0.3s;
  -ms-transition: 0.3s;
  -o-transition: 0.3s;
  -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  -ms-border-radius: 15px;
  -o-border-radius: 15px;
}

.service-card__icon svg {
  width: 35px;
  height: 35px;
}

.service-card:hover .service-card__icon {
  background: var(--dismarex-red);
  transform: scale(1.1) rotate(5deg);
  -webkit-transform: scale(1.1) rotate(5deg);
  -moz-transform: scale(1.1) rotate(5deg);
  -ms-transform: scale(1.1) rotate(5deg);
  -o-transform: scale(1.1) rotate(5deg);
}

.service-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.service-card__description {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 25px;
  line-height: 1.4;
}

.service-card__button {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dismarex-blue);
  background: white;
  padding: 10px 25px;
  border-radius: 50px;
  transition: 0.3s;
  -webkit-border-radius: 50px;
  -moz-border-radius: 50px;
  -ms-border-radius: 50px;
  -o-border-radius: 50px;
  -webkit-transition: 0.3s;
  -moz-transition: 0.3s;
  -ms-transition: 0.3s;
  -o-transition: 0.3s;
}

.service-card:hover .service-card__button {
  background: var(--dismarex-red);
  color: white;
}

/* ==========================================================================
   5. OTROS ELEMENTOS
   ========================================================================== */
.hero__title {
  font-size: 3.5rem;
  z-index: 5;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: 1.5rem;
  z-index: 5;
  margin-bottom: 20px;
}

.hero__cta {
  display: inline-block;
  background: var(--dismarex-red);
  color: white;
  padding: 18px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 800;
  z-index: 5;
  transition: 0.3s;
  -webkit-border-radius: 50px;
  -moz-border-radius: 50px;
  -ms-border-radius: 50px;
  -o-border-radius: 50px;
  -webkit-transition: 0.3s;
  -moz-transition: 0.3s;
  -ms-transition: 0.3s;
  -o-transition: 0.3s;
}

.section__title {
  font-size: 2.5rem;
  z-index: 5;
  margin-bottom: 15px;
}
.section__text {
  font-size: 1.5rem;
  z-index: 5;
  max-width: 800px;
  margin-bottom: 30px;
}

.map-container {
  width: 100%;
  max-width: 850px;
  border-radius: 20px;
  overflow: hidden;
  z-index: 5;
}

/* ==========================================================================
   6. RESPONSIVO
   ========================================================================== */
@media (max-width: 991px) {
  :root {
    --footer-height: 100px;
  }
  .footer {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    text-align: center;
  }
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: var(--dismarex-blue);
    transform: translateX(100%);
    transition: 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-transition: 0.4s;
    -moz-transition: 0.4s;
    -ms-transition: 0.4s;
    -o-transition: 0.4s;
    -webkit-transform: translateX(100%);
    -moz-transform: translateX(100%);
    -ms-transform: translateX(100%);
    -o-transform: translateX(100%);
  }
  .nav--open {
    transform: translateX(0);
  }
  .nav__list {
    flex-direction: column;
    gap: 25px;
    align-items: center;
  }
  .hero__title {
    font-size: 2.2rem;
  }
}
