
/*
Theme Name: CCOMSA Astra Child
Template: astra
Version: 1.0.4
Description: Implementación limpia del sitio histórico de CCOMSA sobre Astra.
*/

:root {
  --ccomsa-dark: #222;
  --ccomsa-gray: #333;
  --ccomsa-light: #f5f5f5;
  --ccomsa-accent: #e9e9e9;
  --ccomsa-max: 1200px;
  --ccomsa-blue: #123b65;
  --ccomsa-red: #c62828;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
}

.ccomsa-site {
  min-height: 100vh;
}

/* CABECERA */
.ccomsa-header {
  position: relative;
  z-index: 10;
  background: #2b2b2b;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.ccomsa-header-inner {
  max-width: var(--ccomsa-max);
  margin: auto;
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 18px 24px;
}

.ccomsa-logo {
  display: block;
  flex: 0 0 150px;
}

.ccomsa-logo img {
  display: block;
  width: 150px;
  height: 78px;
  object-fit: contain;
}

.ccomsa-nav {
  flex: 1;
}

.ccomsa-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.ccomsa-nav li {
  margin: 0;
}

.ccomsa-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 12px 14px;
  font-size: 14px;
  letter-spacing: .2px;
}

.ccomsa-nav a:hover {
  background: #444;
}

/* MENÚ WORDPRESS */
.ccomsa-nav .menu,
.ccomsa-nav .menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ccomsa-nav .menu {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.ccomsa-nav .menu-item {
  position: relative;
  margin: 0;
}

.ccomsa-nav .menu-item a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 12px 14px;
  font-size: 14px;
  letter-spacing: .2px;
}

.ccomsa-nav .menu-item a:hover,
.ccomsa-nav .menu-item:focus-within > a {
  background: #444;
}

.ccomsa-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #2b2b2b;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .25);
  z-index: 1000;
}

.ccomsa-nav .menu-item-has-children:hover > .sub-menu,
.ccomsa-nav .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}

.ccomsa-nav .sub-menu .menu-item {
  width: 100%;
}

.ccomsa-nav .sub-menu a {
  white-space: normal;
  padding: 11px 15px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* PORTADA */
.ccomsa-hero {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 570px;
  background-color: #333;
  background-image:
    linear-gradient(90deg, rgba(5, 25, 45, .88), rgba(5, 25, 45, .35)),
    url("https://ccomsa.com.mx/wp-content/uploads/2026/10/Banner-Ccomsa-nuevo.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.ccomsa-hero-overlay {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: inherit;
  padding: 50px 24px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .15), transparent);
}

.ccomsa-hero-content {
  max-width: var(--ccomsa-max);
  width: 100%;
  margin: auto;
  color: #fff;
}

.ccomsa-kicker {
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ccomsa-hero h1 {
  max-width: 760px;
  margin: 12px 0 18px;
  color: #fff;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
}

.ccomsa-hero p {
  max-width: 700px;
  margin: 0 0 28px;
  color: #fff;
  font-size: 20px;
  line-height: 1.55;
}

/* BOTONES */
.ccomsa-btn {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid var(--ccomsa-red);
  border-radius: 3px;
  background: var(--ccomsa-red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.ccomsa-btn:hover {
  background: #a91f1f;
  color: #fff;
}

/* SECCIONES */
.ccomsa-section {
  padding: 72px 24px;
  background: #fff;
}

.ccomsa-section.alt {
  background: #f5f5f5;
}

.ccomsa-container {
  max-width: var(--ccomsa-max);
  margin: auto;
}

.ccomsa-section h2 {
  margin: 0 0 18px;
  color: var(--ccomsa-blue);
  font-size: 36px;
  text-align: center;
}

.ccomsa-lead {
  max-width: 850px;
  margin: 0 auto 44px;
  color: #555;
  font-size: 18px;
  line-height: 1.7;
  text-align: center;
}

/* BIENVENIDA */
.ccomsa-about {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 50px;
  align-items: center;
}

.ccomsa-about img,
.ccomsa-about-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.ccomsa-about p {
  color: #444;
  font-size: 17px;
  line-height: 1.75;
}

/* PRODUCTOS */
.ccomsa-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.ccomsa-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e4e4e4;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.ccomsa-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
}

.ccomsa-card > img,
.ccomsa-card-image img {
  display: block;
  width: 100%;
  height: 230px;
  padding: 12px;
  object-fit: contain;
}

.ccomsa-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.ccomsa-card-body {
  flex: 1;
  padding: 22px;
}

.ccomsa-card h3 {
  margin: 0 0 10px;
  color: var(--ccomsa-blue);
  font-size: 22px;
}

.ccomsa-card p {
  margin: 0 0 18px;
  color: #555;
  line-height: 1.6;
}

.ccomsa-card a {
  color: var(--ccomsa-blue);
  font-weight: 700;
  text-decoration: none;
}

.ccomsa-card a:hover {
  color: var(--ccomsa-red);
}

/* BANNER HORIZONTAL */
.ccomsa-banner {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.ccomsa-banner img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  object-fit: contain;
}

/* MAPA */
.ccomsa-map,
.iframe-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 6px;
}

.ccomsa-map iframe,
.iframe-container iframe {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}

/* CONTACTO */
.ccomsa-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.ccomsa-contact-box {
  min-width: 0;
  padding: 32px;
  background: #f5f5f5;
  border: 1px solid #e4e4e4;
  border-radius: 6px;
}

.ccomsa-contact-box h3 {
  margin-top: 0;
  color: var(--ccomsa-blue);
}

.ccomsa-contact-box p {
  margin: 8px 0;
  color: #444;
  line-height: 1.8;
}

.ccomsa-contact-box a {
  color: var(--ccomsa-blue);
  overflow-wrap: anywhere;
}

/* FOOTER */
.ccomsa-footer {
  background: #123b65;
  color: #fff;
  padding: 42px 24px 20px;
}

.ccomsa-footer-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr .8fr 1.2fr 1.2fr;
  gap: 32px;
  align-items: start;
}

.ccomsa-footer-column {
  min-width: 0;
}

.ccomsa-footer h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.ccomsa-footer p {
  margin: 8px 0;
  color: #e0e8f0;
  font-size: 14px;
  line-height: 1.8;
}

.ccomsa-footer a {
  color: #e0e8f0;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s ease;
}

.ccomsa-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.ccomsa-footer .ccomsa-footer-email-group {
  margin-bottom: 15px;
}

.ccomsa-footer .ccomsa-footer-email-group p {
  margin-bottom: 3px;
  color: #fff;
  font-weight: 700;
}

.ccomsa-footer .ccomsa-email {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

.ccomsa-footer .ccomsa-footer-location {
  display: inline-block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
}

.ccomsa-copy {
  max-width: 1200px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  color: #d3deea;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

/* CONTENIDO EDITABLE DE WORDPRESS */
.ccomsa-page-content > .wp-block-group,
.ccomsa-page-content > .wp-block-columns {
  max-width: var(--ccomsa-max);
  margin-left: auto;
  margin-right: auto;
}

.ccomsa-page-content > .wp-block-html {
  margin: 0;
  padding: 0;
}

/* TABLETAS */
@media (max-width: 900px) {
  .ccomsa-header-inner {
    align-items: flex-start;
  }

  .ccomsa-nav .menu {
    justify-content: flex-start;
  }

  .ccomsa-nav .sub-menu {
    position: static;
    box-shadow: none;
  }

  .ccomsa-nav .menu-item-has-children:hover > .sub-menu {
    display: block;
  }

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

  .ccomsa-about,
  .ccomsa-contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .ccomsa-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }
}

/* CELULARES */
@media (max-width: 600px) {
  .ccomsa-header-inner {
    display: block;
    padding: 16px 18px;
  }

  .ccomsa-logo {
    margin-bottom: 14px;
  }

  .ccomsa-nav .menu {
    justify-content: flex-start;
    gap: 2px;
  }

  .ccomsa-nav .menu-item a {
    padding: 9px 7px;
    font-size: 12px;
  }

  .ccomsa-hero {
    min-height: 440px;
  }

  .ccomsa-hero-overlay {
    min-height: 440px;
    padding: 45px 20px;
  }

  .ccomsa-hero h1 {
    font-size: clamp(34px, 9vw, 46px);
  }

  .ccomsa-hero p {
    font-size: 16px;
  }

  .ccomsa-section {
    padding: 30px 18px;
  }

  .ccomsa-section h2 {
    font-size: 28px;
  }

  .ccomsa-lead {
    margin-bottom: 28px;
    font-size: 16px;
    text-align: justify;
  }

  .ccomsa-about {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .ccomsa-about p {
    font-size: 15px;
  }

  .ccomsa-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .ccomsa-card > img,
  .ccomsa-card-image img {
    height: 230px;
  }

  .ccomsa-card-body {
    padding: 20px;
  }

  .ccomsa-contact {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .ccomsa-contact-box {
    padding: 24px;
  }

  .ccomsa-map iframe,
  .iframe-container iframe {
    height: 330px;
  }

  .ccomsa-footer {
    padding: 32px 20px 18px;
  }

  .ccomsa-footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .ccomsa-footer h3 {
    margin-bottom: 10px;
    font-size: 17px;
  }

  .ccomsa-footer p {
    font-size: 14px;
  }

  .ccomsa-footer .ccomsa-footer-email-group {
    margin-bottom: 14px;
  }

  .ccomsa-copy {
    margin-top: 22px;
    padding-top: 16px;
    font-size: 11px;
  }
}
