:root {
  --mas-dark: #333333;
  --mas-red: #ED1C24;
  --mas-white: #FFFFFF;
  --mas-light: #F5F5F5;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--mas-dark);
  padding-top: 86px;
}

.navbar {
    height: 90px;
}

.logo {
  height: 60px;
  width: auto;
}

.nav-link {
  font-weight: 500;
  color: var(--mas-dark);
}

.nav-link:hover {
  color: var(--mas-red);
}

.btn-primary-mas {
  background: var(--mas-red);
  border-color: var(--mas-red);
  color: white;
  font-weight: 600;
}

.btn-primary-mas:hover {
  background: #c9141b;
  border-color: #c9141b;
  color: white;
}

.hero {
  background:
    linear-gradient(90deg, rgba(255,255,255,.82), rgba(255,255,255,.18)),
    url("../img/hero.jpg");
  background-size: cover;
  background-position: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
}

.hero .lead {
  max-width: 620px;
  font-size: 1.25rem;
}

.section {
  padding: 90px 0;
}

.section h2 {
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.section-subtitle {
  max-width: 650px;
  margin: 0 auto;
}

.image-placeholder,
.project-img {
  min-height: 280px;
  background: #ddd;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-weight: 600;
}

.service-card,
.project-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  transition: all .25s ease;
}

.service-card:hover,
.project-card:hover {
  transform: translateY(-6px);
}

.service-card h5,
.project-card h5 {
  font-weight: 800;
}

.btn-filter {
  background: #e5e5e5;
  color: var(--mas-dark);
  margin: 0 5px;
  font-weight: 600;
}

.btn-filter.active,
.btn-filter:hover {
  background: var(--mas-red);
  color: white;
}

.client-logos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 35px;
  color: #999;
  font-weight: 700;
  font-size: 1.2rem;
}

.cta-section {
  background: var(--mas-dark);
  color: white;
  padding: 80px 0;
}

.cta-section h2 {
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  body {
    padding-top: 72px;
  }

  .logo {
    height: 44px;
  }

  .hero {
    text-align: center;
  }

  .hero .d-flex {
    justify-content: center;
    flex-direction: column;
  }

  .section {
    padding: 60px 0;
  }
}

.project-hero {
  height: 520px;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-top: -86px;
}

.project-hero-overlay {
  height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,.68), rgba(0,0,0,.15));
  color: white;
  display: flex;
  align-items: flex-end;
  padding-bottom: 70px;
}

.breadcrumb-mas {
  font-size: .9rem;
  margin-bottom: 60px;
  opacity: .9;
}

.badge-mas {
  display: inline-block;
  background: var(--mas-red);
  color: white;
  padding: 8px 16px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: .75rem;
  margin-bottom: 20px;
}

.project-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 900;
  max-width: 760px;
}

.project-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-weight: 500;
}

.title-line {
  width: 45px;
  height: 4px;
  background: var(--mas-red);
  margin: 12px 0 24px;
}

.info-card,
.gallery-card,
.simple-card,
.stats-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(0,0,0,.08);
}

.info-card {
  padding: 32px;
}

.info-card h3,
.gallery-card h3,
.simple-card h3 {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.1rem;
}

.info-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-bottom: 1px solid #e6e6e6;
  padding: 13px 0;
  font-size: .95rem;
}

.info-row:last-child {
  border-bottom: none;
}

.stats-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(0,0,0,.08);
  padding: 30px 28px;
}

.stat-item {
  padding: 0 28px;
  border-right: 1px solid #ddd;
}

.stat-item:last-child {
  border-right: none;
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.stat-head i {
  font-size: 2.4rem;
  color: var(--mas-red);
  line-height: 1;
}

.stat-head strong {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.1;
}

.stat-item span {
  display: block;
  font-size: .95rem;
  color: #333;
  padding-left: calc(2.4rem + 16px);
}

.stats-card div {
  border-right: 1px solid #ddd;
  padding: 0 24px;
}

.stats-card div:last-child {
  border-right: none;
}

.stats-card strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 900;
}

.stats-card span {
  font-size: .9rem;
}

.gallery-card {
  padding: 28px;
}

.gallery-main {
  height: 440px;
  object-fit: cover;
  border-radius: 8px;
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.gallery-thumbs img {
  width: 135px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 3px solid transparent;
}

.gallery-thumbs img:first-child {
  border-color: var(--mas-red);
}

.simple-card {
  padding: 30px;
  height: 100%;
}

.simple-card ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.simple-card li {
  margin-bottom: 12px;
}

.link-red {
  color: var(--mas-red);
  font-weight: 700;
  text-decoration: none;
}

.project-link {
  color: inherit;
  text-decoration: none;
}

.project-card img {
  height: 180px;
  object-fit: cover;
}

.project-cta {
  background: var(--mas-dark);
  color: white;
  padding: 70px 0;
}

.project-cta h2 {
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .project-hero {
    height: 460px;
    margin-top: -72px;
  }

  .project-hero-overlay {
    padding-bottom: 45px;
  }

  .breadcrumb-mas {
    margin-bottom: 35px;
  }

  .project-meta {
    gap: 12px;
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .stats-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid #ddd;
    padding: 0 0 20px;
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  .stats-card div {
    border-right: none;
    border-bottom: 1px solid #ddd;
    padding: 0 0 16px;
  }

  .gallery-main {
    height: 260px;
  }
}

.client-logos {
    display:flex;
    flex-wrap:wrap;
    gap:40px;
    justify-content:center;
}

.client-logos img {
    height:60px;
    object-fit:contain;
    filter:grayscale(100%);
    opacity:.8;
    transition:.3s;
}

.client-logos img:hover {
    opacity:1;
    filter:none;
}

.project-link {
  color: inherit;
  text-decoration: none;
}

.home-project-img {
  height: 230px;
  object-fit: cover;
}

.project-type {
  display: inline-block;
  color: var(--mas-red);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-card h5 {
  font-weight: 800;
  margin-bottom: 8px;
}

.project-card p {
  margin-bottom: 6px;
  color: #555;
}

.site-footer {
  background: var(--mas-dark);
  color: white;
  padding: 70px 0 25px;
}

.footer-logo {
  height: 70px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  background: white;
  padding: 8px 12px;
  border-radius: 8px;
}

.site-footer h5 {
  font-weight: 800;
  margin-bottom: 18px;
  color: white;
}

.site-footer a,
.site-footer span {
  display: block;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  margin-bottom: 9px;
}

.site-footer a:hover {
  color: var(--mas-red);
}

.footer-cta {
  color: white !important;
  font-weight: 800;
  margin-top: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 45px;
  padding-top: 22px;
  font-size: .9rem;
  color: rgba(255,255,255,.65);
}

.service-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    transition: all .3s ease;
}

.service-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.service-card h5 {
    min-height: 60px; /* mismo espacio para todos los títulos */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card p {
    min-height: 90px; /* mismo espacio para todas las descripciones */
    margin-bottom: 0;
}

.footer-admin-link {
    margin-top: 12px;
    font-size: .9rem;
    opacity: .65;
}

/* Modal "El Equipo" */
.team-table td {
    width: 33.33%;
    border: 0;
    padding: 1rem .75rem;
    vertical-align: top;
}

.team-photo {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1; /* mismo tamaño para todas las fotos */
    margin: 0 auto;
    object-fit: cover;
    background: #ddd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #777;
}

.team-table .team-name td {
    font-weight: 700;
    font-size: 1.1rem;
}

.team-table .team-bio td {
    color: #555;
    font-size: .95rem;
}

@media (max-width: 575.98px) {
    .team-table .team-bio td {
        font-size: .85rem;
    }
}
