/*
 * FRC - Correcciones de diseño compartidas (cargar después de style.css)
 */

/* 1. Íconos MDI
 * fonts.css redefine "Material Design Icons" con la fuente antigua de la plantilla,
 * que style.css necesita para sus flechas/checks. Pero las clases .mdi-* del HTML
 * usan los códigos de MDI 4.9.95 (CDN), y por eso teléfono, mapa y redes
 * se veían con íconos equivocados. Las clases .mdi usan ahora la fuente 4.9.95
 * con un nombre propio, sin romper los íconos de style.css. */
@font-face {
  font-family: "MDI 4";
  src: url("https://cdn.jsdelivr.net/npm/@mdi/font@4.9.95/fonts/materialdesignicons-webfont.woff2?v=4.9.95") format("woff2"),
       url("https://cdn.jsdelivr.net/npm/@mdi/font@4.9.95/fonts/materialdesignicons-webfont.woff?v=4.9.95") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
.mdi::before, .mdi-set { font-family: "MDI 4" !important; }
.mdi-facebook::before { content: "\F20C" !important; }

/* 2. Header móvil: el logo es blanco y el panel era blanco (logo invisible) */
.rd-navbar-modern.rd-navbar-fixed .rd-navbar-panel { background: #02da02; }

/* 3. Footer: el destello verde de las redes sociales se salía del ícono */
.footer-social-list .icon { position: relative; }

/* 4. Títulos de portada demasiado grandes en móvil (se cortaban) */
@media (max-width: 575px) {
  .breadcrumbs-custom-title { font-size: 34px; word-break: break-word; }
}
@media (min-width: 576px) and (max-width: 767px) {
  .breadcrumbs-custom-title { font-size: 44px; }
}

/* 5. Maquinaria: la marca quedaba cortada a la mitad en escritorio
 * (animación pensada para íconos sociales). Se muestra siempre. */
.desktop .team-modern-social-list li { transform: none !important; }
.team-modern-status { color: #777777; font-size: 13px; }

/* 6. Texto justificado solo en pantallas anchas (en móvil deja espacios raros) */
@media (max-width: 767px) {
  .tab-content p[style*="justify"] { text-align: left !important; }
}

/* 7. Footer inferior: alineación consistente */
.footer-modern-line-3 .rights { margin: 0; }
.footer-modern-line-3, .footer-modern-line-3 a, .footer-modern-line-3 .rights { color: rgba(255, 255, 255, 0.6); }
.footer-modern-line-3 a:hover { color: #46b664; }

.footer-modern.context-dark p.rights { color: rgba(255, 255, 255, 0.6); }

/* ================= RESPONSIVE (celulares) ================= */

/* Inicio: "Nuestros trabajos" */
.trabajos-wrap { padding: 0 40px; margin-top: 40px; }
.trabajos-sub { color: #777777; font-size: 1.5rem; text-align: left; margin-bottom: 15px; }

/* Maquinaria: fotos de igual proporción en la grilla */
.team-modern-figure img { aspect-ratio: 270 / 236; object-fit: cover; height: auto; }

@media (max-width: 767px) {
  /* Inicio */
  .trabajos-wrap { padding: 0 15px; margin-top: 25px; }
  .trabajos-sub { font-size: 1.1rem; text-align: center; }
  .carousel { height: 230px; padding: 5px; }
  .carousel > .wrap::before, .carousel > .wrap::after { line-height: 230px; }
  .gallery-overlay-text { font-size: 18px; }
  .cta-modern-title { font-size: 30px; }
  .cta-modern .lead { font-size: 17px; line-height: 1.5; }
  .cta-modern .button { white-space: normal; max-width: 100%; padding-left: 20px; padding-right: 20px; }
  .parallax-content.section-xl { padding-top: 60px; padding-bottom: 60px; }

  /* Secciones más compactas */
  .section-lg, .section-md { padding-top: 45px; padding-bottom: 45px; }
  h3, .heading-3 { font-size: 26px; }
  h2, .heading-2 { font-size: 30px; }

  /* Servicio técnico */
  .box-service-content { padding: 22px; }
  .box-service-image img { height: 170px; }
  .benefit-section { padding: 20px 0; }
  .benefit-title { font-size: 16px; }
  .benefit-text { font-size: 15px; font-weight: 500; line-height: 1.6; }
  .icon-benefit { font-size: 20px; margin-right: 4px; }
  .benefit-section .img-custom { margin-top: 25px; }
  .sector-card-new { margin-bottom: 0; }
  .sector-img-top { height: 180px; }
  .sector-body { padding: 18px; }

  /* Maquinaria: 2 columnas en celular */
  .team-modern-caption { padding-top: 12px; }
  .team-modern-name { font-size: 14px; }
  .team-modern-status { font-size: 11px; }
  .row-40 { margin-bottom: -25px; }
  .row-40 > * { margin-bottom: 25px; }

  /* Nosotros */
  .tab-content-1 img { margin-top: 10px; }

  /* Contacto */
  .aside-contacts-item { text-align: center; }

  /* Botón "subir" más pequeño para no tapar texto */
  .ui-to-top { width: 44px; height: 44px; line-height: 44px; font-size: 22px; right: 10px; bottom: 10px; }
}

@media (max-width: 400px) {
  .breadcrumbs-custom-title { font-size: 28px; letter-spacing: 0.02em; }
  .breadcrumbs-custom { padding: 45px 0; }
  .rd-navbar-modern.rd-navbar-fixed .rd-navbar-brand img { max-width: 130px; }
}

/* Celular horizontal / tablets chicas */
@media (min-width: 576px) and (max-width: 991px) {
  .carousel { height: 280px; }
}
