/* ============================================================
   TAPEM – Responsive Redesign 2026
   Industrial / Precision Engineering aesthetic
   Palette: Deep Navy #0f1d2d | Steel Teal #7fa7ae | Forge Orange #f76f04
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@300;400;600;700;900&family=Barlow:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --navy:    #0f1d2d;
  --teal:    #7fa7ae;
  --teal-dk: #4d7d85;
  --orange:  #f76f04;
  --white:   #ffffff;
  --light:   transparent;
  --muted:   #c5d7da;
  --text:    #1e3044;
  --border:  #d0dde0;

  --header-h: 120px;
  --sidebar-w: 240px;
  --content-max: 1080px;

  --radius: 2px;
  --shadow: 0 4px 24px rgba(15,29,45,0.12);
  --transition: 0.22s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 62.5%; scroll-behavior: smooth; }

body {
  font-family: 'Barlow', Verdana, sans-serif;
  font-size: 1.5rem;
  color: var(--text);
  background: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { border: 0; max-width: 100%; height: auto; display: block; }

a { text-decoration: none; color: inherit; transition: color var(--transition); }

ul, li { list-style: none; margin: 0; padding: 0; }

p {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.7;
}

h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--orange);
  float: left;
  width: 100%;
}

h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 8px;
}

.h2_home {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   HEADER
   ============================================================ */
#cabecera {
  position: relative;
  width: 100%;
  background: var(--navy);
  padding: 0;
  z-index: 100;
  border-bottom: 3px solid var(--orange);
}

.cabecera-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  min-height: var(--header-h);
}

#cabecera .logo-link {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

#cabecera .logo-link img {
  height: 64px;
  width: auto;
}

#cabecera .slogan-img {
  height: 40px;
  width: auto;
  opacity: 0.9;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 200;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   NAVIGATION
   ============================================================ */
#middlebar {
  position: static;
  float: none;
  margin: 0;
  width: auto;
}

#middlebar .menu {
  display: flex;
  align-items: stretch;
  gap: 0;
  list-style: none;
}

#middlebar .menu > li {
  position: relative;
  float: none;
}

#middlebar .menu > li > a,
#middlebar .menu > li > span > a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: var(--header-h);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

#middlebar .menu > li:hover > a,
#middlebar .menu > li:hover > span > a,
#middlebar .menu > li > a:hover {
  color: var(--white);
  background: rgba(247,111,4,0.15);
}

#middlebar .menu > li > span {
  display: block;
}

/* Dropdown submenus */
#submenu_empresa,
#submenu_medios,
#submenu_productos {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 999;
  background: var(--white);
  border-top: 3px solid var(--orange);
  box-shadow: var(--shadow);
  min-width: 220px;
  padding: 8px 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: all var(--transition);
  pointer-events: none;
}

#submenu_empresa.visible,
#submenu_medios.visible,
#submenu_productos.visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.margen_superior { display: none; }

#submenu_empresa ul,
#submenu_medios ul,
#submenu_productos ul {
  width: 100% !important;
  float: none;
  padding: 0;
  border-top: none;
}

#submenu_empresa ul li,
#submenu_medios ul li,
#submenu_productos ul li {
  width: 100% !important;
  float: none;
  border-bottom: 1px solid var(--border);
}

#submenu_empresa ul li:last-child,
#submenu_medios ul li:last-child,
#submenu_productos ul li:last-child { border-bottom: none; }

#middlebar .menu #submenu_empresa ul li a,
#middlebar .menu #submenu_medios ul li a,
#middlebar .menu #submenu_productos ul li a {
  display: block;
  float: none;
  padding: 10px 20px 10px 32px;
  font-family: 'Barlow', sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--navy);
  background-image: none;
  height: auto;
  text-transform: none;
  letter-spacing: 0;
  transition: all var(--transition);
  margin: 0;
}

#middlebar .menu #submenu_empresa ul li a:hover,
#middlebar .menu #submenu_medios ul li a:hover,
#middlebar .menu #submenu_productos ul li a:hover {
  color: var(--orange);
  background: var(--light);
  padding-left: 38px;
}

/* Sub-sub menu */
.submenu_sub {
  padding-left: 12px;
}
.submenu_sub li a {
  font-size: 1.25rem !important;
  color: var(--teal-dk) !important;
}

.no_link > a { cursor: default; color: var(--navy) !important; font-weight: 600 !important; }

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.contenedor {
  float: none;
  width: 100%;
  background: var(--white);
  min-height: calc(100vh - var(--header-h));
}

.contenido {
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: 500px;
  display: flex;
  padding: 0 24px 40px;
  gap: 0;
  position: relative;
}

/* ============================================================
   SIDEBAR (izquierda)
   ============================================================ */
.izquierda {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 24px 16px 24px 0;
  border-right: 1px solid var(--border);
  margin-right: 32px;
}

.izquierda ul {
  display: flex;
  gap: 8px;
  margin: 0 0 24px 0;
  width: auto;
  float: none;
  margin-top: 0;
  margin-left: 0;
}

.izquierda ul li {
  float: none;
  margin: 0;
}

.izquierda ul li a img { height: 20px; }

.izquierda > p {
  font-size: 1.3rem;
  color: var(--text);
  line-height: 1.8;
  float: none;
  display: block;
  margin: 0;
  padding: 16px 0 0;
}

.izquierda > p a {
  color: var(--orange);
  font-weight: 600;
  display: block;
  margin: 6px 0;
}

.izquierda > p a:hover { color: var(--teal-dk); }

/* Sidebar decorative accent */
.izquierda::before {
  content: 'TAPEM';
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  color: var(--border);
  margin-bottom: 16px;
  text-transform: uppercase;
  display: none;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.contenido_derecha {
  flex: 1;
  min-width: 0;
  padding: 24px 0;
  float: none;
  width: auto;
}

.salto { clear: both; height: 0; font-size: 0; }

/* ============================================================
   BULLET LISTS
   ============================================================ */
ul.puntos,
ul.puntos2 {
  margin: 0 0 18px;
  float: left;
  width: 100%;
  font-size: 1.5rem;
}

ul.puntos li,
ul.puntos2 li {
  position: relative;
  padding: 5px 0 5px 22px;
  margin-bottom: 4px;
  display: block;
  float: none;
  width: 100%;
  line-height: 1.6;
  color: var(--text);
  background: none;
}

ul.puntos li::before,
ul.puntos2 li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 28px;
  width: 5px;
  height: 5px;
  background: var(--orange);
  border-radius: 50%;
}

/* ============================================================
   SEPARATOR
   ============================================================ */
a.lightwindow.page-options > img {
    margin-bottom: 20px;
}   
   
.raya {
  display: block;
  float: left;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--teal) 60%, transparent);
  margin: 14px 0 18px;
  border: none;
}

/* Hide old separator image */
img[src*="puntitos"] { display: none; }

/* ============================================================
   IMAGES LAYOUT
   ============================================================ */
.imagenes {
  float: left;
  margin: 0 16px 12px 0;
}

.floatleft { float: left; }
.floatright { float: left; margin-left: 0px; margin-bottom: 12px; }

#img_oficina { float: left; margin-bottom: 12px; }

/* ============================================================
   HOME PAGE
   ============================================================ */
.texto_home {
  width: 100%;
  float: left;
  margin-top: 0;
}

.texto_home h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.2rem;
  color: var(--teal-dk);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Video/image portada */
#video_portada {
  float: right;
  width: 320px;
  margin: 0 0 20px 24px;
  text-align: center;
}

#video_portada img {
  width: 100%;
  border: 3px solid var(--teal);
  transition: border-color var(--transition);
}

#video_portada img:hover { border-color: var(--orange); }

a.botonpdf {
  display: inline-block;
  background: var(--orange);
  color: var(--white) !important;
  padding: 10px 16px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 10px;
  transition: background var(--transition);
  width: 100%;
  text-align: center;
}

a.botonpdf:hover { background: var(--teal-dk); }

/* Product galleries */
.piezas {
  clear: both;
  width: 100%;
  float: left;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.piezas > div,
.piezas #myGallery0,
.piezas #myGallery1,
.piezas #myGallery2,
.piezas #myGallery3 {
  float: none;
  width: auto;
  height: 150px;
  overflow: hidden;
  background: var(--light);
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.piezas > div:hover { border-color: var(--orange); }

.piezas img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   HISTORIA – 3-column timeline
   ============================================================ */
.contenido_derecha > ul:not(.puntos):not(.puntos2):not(.fotos):not(.fotos2):not(.fotos_ficha):not(.submenu_puntos):not(.submenu_puntos1):not(.submenu_imagenes) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  float: left;
  width: 100%;
  margin-top: 10px;
}

.contenido_derecha > ul > li {
  float: none;
  width: 100% !important;
  background: var(--light);
  padding: 16px;
  border-top: 3px solid var(--teal);
  margin: 0;
}

.contenido_derecha > ul > li img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  margin: 8px 0;
}

.contenido_derecha > ul > li p {
  font-size: 1.3rem;
  margin: 0;
}

/* ============================================================
   CLIENTES / REFERENCIAS — Custom 2-col layout
   ============================================================ */
.clientes-grid {
  display: grid;
  grid-template-columns: 66% 33%;
  gap: 24px;
  width: 100%;
  margin-top: 10px;
}

.clientes-col-main { /* 66% — 2 rows × 2 logos */
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  align-content: start;
}

.clientes-col-side { /* 33% — 1 logo */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20px;
}

.cliente-sector {
  margin-bottom: 24px;
  float: left;
  width: 100%;
}

.cliente-sector h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-dk);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 14px;
  grid-column: 1 / -1;
}

/* Legacy .clientes (DB-driven) */
.clientes {
  float: left;
  width: auto;
  margin: 0 20px 20px 0;
}

ul.fotos2 { margin: 0 0 10px; float: left; }
ul.fotos2 li {
  float: left;
  width: auto;
  margin: 12px 16px 0 0;
  list-style: none;
}

ul.fotos2 li a img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter var(--transition), transform var(--transition);
}

ul.fotos2 li a:hover img {
  filter: none;
  transform: scale(1.05);
}

/* Logo card style */
.logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 90px;
}

.logo-card:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 12px rgba(127,167,174,0.2);
}

.logo-card img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
  filter: grayscale(30%);
  transition: filter var(--transition);
}

.logo-card:hover img { filter: none; }

/* ============================================================
   PRODUCT SHEETS (fotos, ficha-troquel)
   ============================================================ */
ul.fotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  float: left;
  width: 100%;
}

ul.fotos li {
  width: auto;
  height: auto;
  margin: 0;
  float: none;
}

ul.fotos li a {
  display: block;
  background: var(--light);
  padding: 6px;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
  width: auto;
  height: auto;
}

ul.fotos li a:hover { border-color: var(--orange); }

ul.fotos_ficha {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  float: left;
  width: 100%;
  margin-bottom: 12px;
}

ul.fotos_ficha li {
  width: 140px;
  float: none;
  margin: 0;
}

ul.fotos_ficha li a {
  display: block;
  background: var(--light);
  padding: 5px;
  border: 1px solid var(--border);
  width: auto;
  height: auto;
  transition: border-color var(--transition);
}

ul.fotos_ficha li a:hover { border-color: var(--orange); }

.texto_ficha {
  float: right;
  width: 55%;
}

.texto_ficha a {
  color: var(--orange);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   PRENSAS – improved layout
   ============================================================ */
.prensas-section {
  float: left;
  width: 100%;
  margin-bottom: 16px;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contacto1 {
  width: 100%;
  float: left;
  margin: 16px 0 28px;
  overflow: hidden;
}

.contacto2 {
  width: 100%;
  float: right;
  margin: 16px 0 28px;
  overflow: hidden;
}

.formu {
  float: left;
  width: 100%;
  margin-bottom: 10px;
}

.label1 {
  width: 130px;
  float: left;
  padding-top: 3px;
  font-size: 1.3rem;
  font-weight: 500;
}

.input1 {
  width: calc(100% - 140px);
  height: 34px;
  float: left;
  border: 1px solid var(--border);
  padding: 0 8px;
  font-size: 1.3rem;
  font-family: 'Barlow', sans-serif;
  transition: border-color var(--transition);
  border-radius: var(--radius);
  background: var(--light);
}

.input1:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
}

.label2 {
  display: block;
  padding: 2px 0 8px;
  font-size: 1.3rem;
  font-weight: 500;
}

.textarea1 {
  width: 100%;
  height: 140px;
  border: 1px solid var(--border);
  padding: 10px;
  font-size: 1.3rem;
  font-family: 'Barlow', sans-serif;
  resize: vertical;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--light);
  transition: border-color var(--transition);
}

.textarea1:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
}

.btn {
  float: right;
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 10px 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition);
  border-radius: var(--radius);
}

.btn:hover { background: var(--teal-dk); }

#lbl_lopd { display: inline; padding-left: 10px; font-size: 1.2rem; }
#lbl_lopd a { color: var(--teal-dk); text-decoration: underline; }

span.error { color: var(--orange); font-weight: bold; }

/* ============================================================
   FOOTER
   ============================================================ */
#fondo_pie {
  width: 100%;
  float: left;
  background: var(--navy);
  border-top: 3px solid var(--orange);
}

.pie {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 0;
}

.pie p {
  color: var(--muted);
  float: none;
  margin: 0 20px 0 0;
  font-size: 1.3rem;
  display: inline;
}

.pie a {
  color: var(--muted);
  font-size: 1.3rem;
  margin: 0 20px 0 0;
  float: none;
  font-weight: 500;
  transition: color var(--transition);
}

.pie a:hover { color: var(--orange); }

.norsis {
  margin-left: auto !important;
  margin-right: 0 !important;
  float: none !important;
  background: none !important;
  padding: 0 !important;
  color: var(--teal) !important;
  font-size: 1.2rem !important;
}

/* ============================================================
   SUBMENU PUNTOS
   ============================================================ */
ul.submenu_puntos,
ul.submenu_puntos1 {
  margin-left: 0;
    float: none;
    width: 100% !important;
    display: inline-block;
}

ul.submenu_puntos li,
ul.submenu_puntos1 li {
  float: left;
  width: 100% !important;
  padding-bottom: 4px;
  margin-bottom: 6px;
  display: block;
}

ul.submenu_puntos li a,
ul.submenu_puntos1 li a {
  color: var(--teal-dk);
  font-weight: 600;
  text-decoration: underline;
  padding-left: 40px;
  background: none;
  float: none;
  display: inline;
  height: auto;
  background-repeat: no-repeat;
}

ul.submenu_puntos li a:hover,
ul.submenu_puntos1 li a:hover { color: var(--orange); }

ul.submenu_puntos li::before{
    content: '';
    position: absolute;
    left: 0;
    top: 15px;
    width: 5px;
    height: 5px;
    background: var(--orange);
    border-radius: 50%;
}

ul.submenu_imagenes li {
  height: auto;
  margin-top: 12px;
  padding: 0;
  background: none;
}

ul.submenu_imagenes li a {
  float: left;
  padding: 5px;
  background: var(--light);
  border: 1px solid var(--border);
}

/* ============================================================
   MISC
   ============================================================ */
.naranja { color: var(--orange); }
.azul    { color: var(--teal); }
.invisible { display: none; }

.link {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
}
.link:hover { color: var(--orange); }

.margen {
  font-weight: normal;
  padding: 8px;
  font-size: 1.2rem;
  color: var(--navy);
}

.texto_submenu { margin-left: 12px; float: left; }
.texto_submenu p { line-height: 1.7; font-weight: 600; font-size: 1.35rem; }
.texto_submenu a { color: var(--navy); font-weight: 600; text-decoration: underline; float: none; display: block; }
.texto_submenu a:hover { color: var(--orange); }

/* Video embed */
.video { float: right; margin-top: 16px; width: 320px; }
.video2 { float: right; width: 320px; margin: 0 0 20px 24px; }

/* ============================================================
   DESCARGAS
   ============================================================ */
h3 + ul, h2 + p { margin-top: 8px; }

/* ============================================================
   RESPONSIVE — Tablet (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; --content-max: 100%; }

  .cabecera-inner { padding: 0 16px; }

  #middlebar .menu > li > a,
  #middlebar .menu > li > span > a {
    padding: 0 11px;
    font-size: 1.35rem;
  }

  .clientes-grid {
    grid-template-columns: 60% 38%;
  }

  .piezas { grid-template-columns: repeat(2, 1fr); }

  .contenido_derecha > ul:not(.puntos):not(.puntos2):not(.fotos):not(.fotos2):not(.fotos_ficha):not(.submenu_puntos):not(.submenu_puntos1):not(.submenu_imagenes) {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --header-h: 70px; }

  /* Header */
  .cabecera-inner {
    flex-wrap: nowrap;
    padding: 0 16px;
    min-height: var(--header-h);
  }

  #cabecera .logo-link img { height: 44px; }
  #cabecera .slogan-img { display: none; }

  /* Hamburger */
  .nav-toggle { display: flex; }

  /* Nav mobile overlay */
  #middlebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--navy);
    z-index: 999;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  #middlebar.open { transform: translateX(0); }

  #middlebar .menu {
    flex-direction: column;
    padding: 12px 0 40px;
  }

  #middlebar .menu > li { width: 100%; }

  #middlebar .menu > li > a,
  #middlebar .menu > li > span > a {
    height: auto;
    padding: 14px 24px;
    font-size: 1.7rem;
    color: var(--white);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  #submenu_empresa,
  #submenu_medios,
  #submenu_productos {
    position: static;
    transform: none;
    visibility: visible;
    opacity: 1;
    pointer-events: all;
    box-shadow: none;
    border-top: none;
    border-left: 4px solid var(--orange);
    background: rgba(255,255,255,0.05);
    padding: 0;
    display: none;
  }

  #submenu_empresa.mobile-open,
  #submenu_medios.mobile-open,
  #submenu_produtos.mobile-open { display: block; }

  #middlebar .menu #submenu_empresa ul li a,
  #middlebar .menu #submenu_medios ul li a,
  #middlebar .menu #submenu_produtos ul li a {
    color: var(--muted);
    padding: 10px 24px 10px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 1.4rem;
  }

  /* Layout */
  .contenido {
    flex-direction: column;
    padding: 0 16px 32px;
  }

  .izquierda {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    margin-right: 0;
    padding: 16px 0 12px;
  }

  .izquierda::before { display: none; }

  .izquierda > p { font-size: 1.4rem; }

  .contenido_derecha { padding: 20px 0 0; }

  h1 { font-size: 2.6rem; }

  /* Home */
  #video_portada { float: none; width: 100%; margin: 0 0 20px; }

  .texto_home { width: 100%; }

  .piezas {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Historia */
  .contenido_derecha > ul:not(.puntos):not(.puntos2):not(.fotos):not(.fotos2):not(.fotos_ficha):not(.submenu_puntos):not(.submenu_puntos1):not(.submenu_imagenes) {
    grid-template-columns: 1fr;
  }

  /* Clients */
  .clientes-grid {
    grid-template-columns: 1fr;
  }

  .clientes-col-main { grid-template-columns: 1fr 1fr; }

  /* Contact */
  .contacto1, .contacto2 { max-width: 100%; float: none; }

  .texto_ficha { width: 100%; float: none; }

  /* Footer */
  .pie { flex-direction: column; align-items: flex-start; gap: 6px; }
  .norsis { margin-left: 0 !important; }

  /* Images */
  .floatright, .floatleft {
    float: none;
    margin: 0 0 16px;
    width: 100%;
  }

  .floatright img, .floatleft img { width: 100%; }
}

/* ============================================================
   RESPONSIVE — Small Mobile (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .piezas { grid-template-columns: 1fr 1fr; }
  .clientes-col-main { grid-template-columns: 1fr; }
  .video, .video2 { width: 100%; float: none; margin: 0 0 16px; }

  .contacto1, .contacto2 { margin: 10px 0; }
  .input1 { width: 100%; float: none; }
  .label1 { width: 100%; float: none; margin-bottom: 4px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  #cabecera #middlebar, .nav-toggle { display: none; }
  .contenido { padding: 0; }
  .izquierda { display: none; }
  .contenido_derecha { width: 100%; }
}
/* Clientes */

    .clientes-page {
      width: 100%;
      float: left;
    }


    /* ----------------------------------------------------------
       BLOQUE DE SECTOR
       Agrupa titulo + grid de logos de un mismo sector comercial.
       margin-bottom: separa visualmente cada sector.
       ---------------------------------------------------------- */
    .sector-block {
      width: 100%;
      float: left;
      margin-bottom: 36px;
    }


    /* ----------------------------------------------------------
       TITULO DE SECTOR
       Variables usadas del tema global (responsive.css):
         --teal-dk : #4d7d85  (acento teal oscuro)
         --border  : #d0dde0  (color del borde separador inferior)
       ---------------------------------------------------------- */
    h2.sector-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 1.3rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--teal-dk);
      border-bottom: 1px solid var(--border);
      padding-bottom: 7px;
      margin-bottom: 18px;
    }


    /* ----------------------------------------------------------
       GRID PRINCIPAL: 66% columna izquierda + 33% columna derecha
       gap: 0 2%  -> solo espacio horizontal entre columnas.
       align-items: start -> las columnas se alinean al top, no
       estiran hasta la altura de la mas alta.
       ---------------------------------------------------------- */
    .clientes-grid {
      display: grid;
      grid-template-columns: 66% 32%;
      gap: 0 2%;
      align-items: start;
      width: 100%;
    }


    /* ----------------------------------------------------------
       COLUMNA PRINCIPAL (66%)
       Sin estilos directos; el layout lo gestiona .logos-grid.
       Se declara como clase para facilitar overrides futuros.
       ---------------------------------------------------------- */
    .col-main {
      /* contenedor pasivo — el sub-grid .logos-grid gestiona el layout */
    }


    /* ----------------------------------------------------------
       SUB-GRID DE LOGOS: 2 columnas x filas automaticas
       grid-template-columns: 1fr 1fr  -> 2 columnas de igual ancho
       grid-auto-rows: 100px           -> cada fila mide 100px
       gap: 12px                       -> espacio uniforme entre celdas
       ---------------------------------------------------------- */
    .logos-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-auto-rows: 100px;
      gap: 12px;
    }


    /* ----------------------------------------------------------
       COLUMNA LATERAL (33%)
       display: flex con alineacion al top izquierda.
       El logo unico .logo-item--featured ocupa el 100% del ancho.
       ---------------------------------------------------------- */
    .col-side {
      display: flex;
      align-items: flex-start;
      justify-content: center;
    }


    /* ----------------------------------------------------------
       CELDA DE LOGO — elemento base
       Fondo blanco, borde gris sutil, transicion en hover.
       Variables usadas:
         --border : #d0dde0  (borde normal)
         --teal   : #7fa7ae  (borde y sombra al hover)
       ---------------------------------------------------------- */
    .logo-item {
      display: flex;
      align-items: center;
      justify-content: center;
      background: #ffffff;
      border: 1px solid var(--border);
      transition: border-color 0.22s ease, box-shadow 0.22s ease;
      overflow: hidden;
    }

    .logo-item:hover {
      border-color: var(--teal);
      box-shadow: 0 2px 10px rgba(127, 167, 174, 0.18);
    }


    /* ----------------------------------------------------------
       LOGO DESTACADO — columna lateral (modificador BEM)
       Extiende .logo-item con:
       · width: 100%     -> ocupa todo el ancho de .col-side
       · min-height: 120px -> celda mas alta que las del grid principal
       · border-color: var(--teal) -> siempre con borde teal, no gris
       Al hover el borde pasa a naranja (--orange: #f76f04).
       ---------------------------------------------------------- */
    .logo-item--featured {
      width: 100%;
      min-height: 100px;
      border-color: var(--teal);
    }

    .logo-item--featured:hover {
      border-color: var(--orange);
    }


    


    /* ----------------------------------------------------------
       IMAGEN DEL LOGO
       max-height: 56px     -> altura maxima (celdas normales)
       object-fit: contain  -> escala la imagen sin deformarla
       filter: grayscale    -> B&W por defecto para aspecto uniforme
       transition           -> suaviza el cambio a color al hover
       transform: scale     -> ligero zoom al pasar el raton
       ---------------------------------------------------------- */
    .logo-item img {
      max-width: 100%;
      max-height: 56px;
      width: auto;
      height: auto;
      object-fit: contain;
      filter: grayscale(40%) opacity(0.85);
      transition: filter 0.28s ease, transform 0.22s ease;
      display: block;
    }

    .logo-item:hover img {
      filter: grayscale(0%) opacity(1);   /* color pleno al hover */
      transform: scale(1.04);
    }

    /* El logo destacado tiene imagen mas grande */
    .logo-item--featured img {
      max-height: 80px;
    }


    /* ----------------------------------------------------------
       SEPARADOR ENTRE SECTORES
       Linea de degradado naranja -> teal -> transparente.
       Reutiliza el patron de .raya del responsive.css global.
       ---------------------------------------------------------- */
    .sector-divider {
      display: block;
      float: left;
      width: 100%;
      height: 2px;
      background: linear-gradient(90deg, var(--orange), var(--teal) 55%, transparent);
      margin: 0 0 32px;
      border: none;
    }


    /* ----------------------------------------------------------
       RESPONSIVE — Tablet (<=1024px)
       Reduce alturas y padding para pantallas medianas.
       ---------------------------------------------------------- */
    @media (max-width: 1024px) {
      .logos-grid     { grid-auto-rows: 88px; }
      a.logo-link     { padding: 12px 16px; }
    }


    /* ----------------------------------------------------------
       RESPONSIVE — Movil (<=768px)
       .clientes-grid pasa a 1 sola columna (stacked).
       La columna lateral aparece debajo de la principal.
       El logo destacado se reduce al 50% del ancho.
       ---------------------------------------------------------- */
    @media (max-width: 768px) {
      .clientes-grid {
        grid-template-columns: 1fr;
        gap: 16px 0;
      }
      .col-side         { justify-content: flex-start; }
      .logo-item--featured {
        width: 50%;
        min-height: 90px;
      }
    }


    /* ----------------------------------------------------------
       RESPONSIVE — Movil pequeno (<=480px)
       .logos-grid tambien pasa a 1 columna.
       El logo destacado vuelve al 100% del ancho.
       ---------------------------------------------------------- */
    @media (max-width: 480px) {
      .logos-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 80px;
      }
      .logo-item--featured { width: 100%; }
    }

