/* ============================================
   ERA - Estructuras y Acabados Modernos
   Sitio estático - Paleta del logo
   ============================================ */
:root {
  --era-dark: #2C3333;
  --era-dark-soft: #363C3C;
  --era-orange: #E8761C;
  --era-orange-hover: #d46914;
  --era-orange-light: rgba(232, 118, 28, 0.12);
  --era-white: #FFFFFF;
  --era-gray-100: #F5F6F6;
  --era-gray-200: #E8EAEA;
  --era-gray-300: #9CA3A3;
  --era-text: #2C3333;
  --era-text-muted: #5C6565;
  --era-shadow: 0 4px 24px rgba(44, 51, 51, 0.08);
  --era-shadow-lg: 0 12px 48px rgba(44, 51, 51, 0.12);
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --section-padding: clamp(4rem, 8vw, 6rem);
  --container-max: 1200px;
  --radius: 8px;
  --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--era-text); background: var(--era-white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--container-max); margin-left: auto; margin-right: auto; padding-left: clamp(1rem, 4vw, 2rem); padding-right: clamp(1rem, 4vw, 2rem); }
.section { padding-top: var(--section-padding); padding-bottom: var(--section-padding); }
.section--gray { background: var(--era-gray-100); }
.section--dark {
  position: relative;
  background:
    linear-gradient(135deg, rgba(44, 51, 51, 0.5) 0%, rgba(54, 60, 60, 0.6) 45%, rgba(44, 51, 51, 0.75) 100%),
    url('../img/hero-construccion-era.png') center/cover no-repeat;
  color: var(--era-white);
}

.page-hero {
  position: relative;
  padding: calc(var(--section-padding) * 0.8) 0;
  background:
    linear-gradient(135deg, rgba(44, 51, 51, 0.5) 0%, rgba(54, 60, 60, 0.6) 45%, rgba(44, 51, 51, 0.75) 100%),
    url('../img/hero-construccion-era.png') center/cover no-repeat;
  color: var(--era-white);
  overflow: hidden;
}
.page-hero__title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; margin-bottom: 0.5rem; }
.page-hero__subtitle { font-size: 1.1rem; opacity: 0.9; }

.layout { min-height: 100vh; display: flex; flex-direction: column; }
.layout__main { flex: 1; padding-top: 72px; }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 1rem 0; transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease; }
.navbar--scrolled { background: rgba(255, 255, 255, 0.97); box-shadow: 0 2px 20px rgba(44, 51, 51, 0.08); padding: 0.5rem 0; }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.navbar__logo { display: flex; align-items: center; flex-shrink: 0; }
.navbar__logo img { height: 48px; width: auto; object-fit: contain; }
.navbar__nav { display: none; }
@media (min-width: 992px) {
  .navbar__nav { display: block; }
  .navbar__list { list-style: none; display: flex; align-items: center; gap: 0.25rem; }
  .navbar__link { display: block; padding: 0.6rem 1rem; font-weight: 500; color: var(--era-dark); border-radius: var(--radius); transition: color 0.2s ease, background 0.2s ease; }
  .navbar__link:hover { color: var(--era-orange); background: var(--era-orange-light); }
  .navbar__link--active { color: var(--era-orange); background: var(--era-orange-light); }
}
.navbar__toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; border: none; background: transparent; border-radius: var(--radius); transition: background 0.2s ease; }
.navbar__toggle:hover { background: var(--era-gray-100); }
.navbar__toggle-bar { display: block; width: 22px; height: 2px; background: var(--era-dark); border-radius: 1px; transition: transform 0.3s ease, opacity 0.3s ease; }
.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(2) { opacity: 0; }
.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 992px) { .navbar__toggle { display: none; } }
.navbar__mobile { position: fixed; top: 72px; left: 0; right: 0; background: var(--era-white); box-shadow: 0 12px 32px rgba(44, 51, 51, 0.12); max-height: 0; overflow: hidden; transition: max-height 0.35s ease; z-index: 999; }
.navbar__mobile--open { max-height: 320px; }
.navbar__mobile-list { list-style: none; padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.navbar__mobile-link { display: block; padding: 0.85rem 1rem; font-weight: 500; color: var(--era-dark); border-radius: var(--radius); transition: background 0.2s ease, color 0.2s ease; }
.navbar__mobile-link:hover { background: var(--era-orange-light); color: var(--era-orange); }

/* Footer */
.footer { background: var(--era-dark); color: var(--era-white); margin-top: auto; }
.footer__grid { display: grid; gap: 2.5rem; padding-top: var(--section-padding); padding-bottom: 2rem; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer__logo img { height: 48px; width: auto; margin-bottom: 1rem; display: block; }
.footer__tagline { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; max-width: 280px; line-height: 1.5; }
.footer__title { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; color: var(--era-orange); }
.footer__links ul, .footer__contact p { list-style: none; font-size: 0.95rem; color: rgba(255, 255, 255, 0.9); }
.footer__links li { margin-bottom: 0.5rem; }
.footer__links a { color: rgba(255, 255, 255, 0.9); transition: color 0.2s ease; }
.footer__links a:hover { color: var(--era-orange); }
.footer__contact p { margin-bottom: 0.5rem; }
.footer__contact a { color: rgba(255, 255, 255, 0.9); transition: color 0.2s ease; }
.footer__contact a:hover { color: var(--era-orange); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 1rem 0; }
.footer__bottom p { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); text-align: center; }

/* Floating buttons */
.floating-buttons { position: fixed; bottom: clamp(1rem, 4vw, 1.5rem); right: clamp(1rem, 4vw, 1.5rem); z-index: 999; display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-end; }
.floating-buttons__btn { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--era-white); box-shadow: 0 4px 20px rgba(44, 51, 51, 0.2); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.floating-buttons__btn svg { width: 26px; height: 26px; }
.floating-buttons__btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(44, 51, 51, 0.25); }
.floating-buttons__btn--wa { background: #25D366; }
.floating-buttons__btn--fb { background: var(--era-dark); }
.floating-buttons__btn--ig { background: var(--era-dark); }
.floating-buttons__btn--fb:hover, .floating-buttons__btn--ig:hover { background: var(--era-orange); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.85rem 1.75rem; font-weight: 600; font-size: 1rem; border-radius: var(--radius); border: 2px solid transparent; transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--era-orange); color: var(--era-white); border-color: var(--era-orange); }
.btn--primary:hover { background: var(--era-orange-hover); border-color: var(--era-orange-hover); }
.btn--outline { background: transparent; color: var(--era-white); border-color: rgba(255, 255, 255, 0.6); }
.btn--outline:hover { border-color: var(--era-white); background: rgba(255, 255, 255, 0.1); }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }

.section__title { font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; margin-bottom: 1rem; color: var(--era-dark); }
.section__title--center { text-align: center; }
.section__title--light { color: var(--era-white); }
.section__subtitle { text-align: center; color: var(--era-text-muted); margin-bottom: 2.5rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.section__cta { text-align: center; margin-top: 2rem; }

/* Home - Hero */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: var(--section-padding) 0;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.hero__bg::before {
  content: '';
  position: absolute;
  inset: -4%;
  background: url('../img/hero-construccion-era.png') center/cover no-repeat;
  transform-origin: center;
  animation: hero-bg-zoom 28s ease-in-out infinite alternate;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(44, 51, 51, 0.5) 0%, rgba(54, 60, 60, 0.6) 45%, rgba(44, 51, 51, 0.75) 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.85;
}
@keyframes hero-bg-zoom {
  0% { transform: scale(1) translate(0, 0); }
  33% { transform: scale(1.06) translate(-1%, -0.5%); }
  66% { transform: scale(1.1) translate(0.5%, -1%); }
  100% { transform: scale(1.15) translate(-0.5%, 0); }
}
.hero__content { position: relative; z-index: 1; color: var(--era-white); }
.hero__title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.15; margin-bottom: 1rem; max-width: 14ch; }
.hero__subtitle { font-size: clamp(1rem, 2vw, 1.2rem); opacity: 0.95; max-width: 520px; margin-bottom: 2rem; line-height: 1.6; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Home - Intro */
.intro { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 992px) { .intro { grid-template-columns: 1fr 1fr; } }
.intro__lead { font-size: 1.1rem; color: var(--era-text-muted); margin-bottom: 1rem; }
.intro__card { background: var(--era-white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--era-shadow); border-left: 4px solid var(--era-orange); }
.intro__card-label { display: inline-block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--era-orange); margin-bottom: 0.75rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--era-orange); margin-top: 1rem; transition: gap 0.2s ease, color 0.2s ease; }
.link-arrow:hover { gap: 0.75rem; color: var(--era-orange-hover); }
.link-arrow::after { content: '→'; }

/* Home - Services preview */
.services-preview { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.services-preview__item { background: var(--era-white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--era-shadow); transition: transform 0.25s ease, box-shadow 0.25s ease; border: 1px solid transparent; }
.services-preview__item:hover { transform: translateY(-4px); box-shadow: var(--era-shadow-lg); border-color: var(--era-orange-light); }
.services-preview__icon { font-size: 2rem; display: block; margin-bottom: 1rem; }
.services-preview__item h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--era-dark); }
.services-preview__item p { font-size: 0.95rem; color: var(--era-text-muted); }

/* Values */
.values-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 2.5rem; margin-top: 1.5rem; }
.values-list li { display: flex; align-items: center; gap: 0.6rem; font-size: 1.1rem; font-weight: 500; }
.values-list__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--era-orange); flex-shrink: 0; }

.cta-block { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-block__title { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 0.75rem; color: var(--era-dark); }
.cta-block__text { color: var(--era-text-muted); margin-bottom: 1.5rem; }

/* Nosotros */
.about-block { display: grid; gap: 2.5rem; }
@media (min-width: 992px) { .about-block { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.about-block__lead { font-size: 1.1rem; color: var(--era-text-muted); margin-bottom: 1rem; }
.about-block__aside { display: flex; flex-direction: column; gap: 1.5rem; }
.about-card { background: var(--era-gray-100); padding: 1.75rem; border-radius: var(--radius-lg); border-left: 4px solid var(--era-orange); }
.about-card__title { font-size: 1rem; font-weight: 700; color: var(--era-orange); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.about-card p { color: var(--era-text); font-size: 0.98rem; line-height: 1.6; }
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.value-card { background: var(--era-white); padding: 1.5rem; border-radius: var(--radius-lg); text-align: center; box-shadow: var(--era-shadow); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.value-card:hover { transform: translateY(-3px); box-shadow: var(--era-shadow-lg); }
.value-card__icon { display: block; width: 40px; height: 4px; background: var(--era-orange); border-radius: 2px; margin: 0 auto 1rem; }
.value-card__name { font-weight: 600; color: var(--era-dark); }
.cv-viewer { background: var(--era-gray-100); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--era-shadow); }
.cv-viewer__toolbar { padding: 1rem 1.5rem; background: var(--era-white); border-bottom: 1px solid var(--era-gray-200); }
.cv-viewer__frame-wrapper { position: relative; padding-bottom: 120%; height: 0; overflow: hidden; background: #fff; }
.cv-viewer__iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; min-height: 70vh; border: none; }
@media (min-width: 768px) { .cv-viewer__frame-wrapper { padding-bottom: 0; height: 75vh; } }
.company-info__grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 2rem; }
.company-info__item { text-align: center; padding: 1.5rem; background: rgba(255, 255, 255, 0.06); border-radius: var(--radius); }
.company-info__label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--era-orange); margin-bottom: 0.5rem; }
.company-info__item p { color: rgba(255, 255, 255, 0.95); margin: 0; }
.company-info__item a { color: rgba(255, 255, 255, 0.95); text-decoration: underline; text-underline-offset: 3px; }
.company-info__item a:hover { color: var(--era-orange); }

/* Misma imagen de fondo que Inicio en todas las páginas internas */
.layout--nosotros .page-hero,
.layout--servicios .page-hero,
.layout--proyectos .page-hero,
.layout--contacto .page-hero {
  background:
    linear-gradient(135deg, rgba(44, 51, 51, 0.5) 0%, rgba(54, 60, 60, 0.6) 45%, rgba(44, 51, 51, 0.75) 100%),
    url('../img/hero-construccion-era.png') center/cover no-repeat;
}

/* Servicios */
.service-detail__content { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 992px) {
  .service-detail__content { grid-template-columns: 1fr 1fr; }
  .service-detail__content--reverse .service-detail__text { order: 2; }
  .service-detail__content--reverse .service-detail__visual { order: 1; }
}
.service-detail__icon { font-size: 2.5rem; display: block; margin-bottom: 1rem; }
.service-detail__lead { font-size: 1.05rem; color: var(--era-text-muted); margin-bottom: 1.25rem; line-height: 1.6; }
.service-detail__list { list-style: none; }
.service-detail__list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.6rem; color: var(--era-text); }
.service-detail__list li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 6px; height: 6px; border-radius: 50%; background: var(--era-orange); }
.service-detail__card { background: var(--era-white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--era-shadow); border-top: 4px solid var(--era-orange); }
.service-detail__card-title { font-size: 1rem; font-weight: 700; color: var(--era-orange); margin-bottom: 1rem; line-height: 1.4; }
.service-detail__card p { color: var(--era-text-muted); font-size: 0.98rem; line-height: 1.6; }
.service-detail__content--reverse .service-detail__card { border-top: none; border-left: 4px solid var(--era-orange); }

/* Proyectos */
.proyectos-intro { max-width: 720px; margin-bottom: 2.5rem; color: var(--era-text-muted); font-size: 1.05rem; line-height: 1.6; }
.proyectos-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.proyecto-card { background: var(--era-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--era-shadow); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.proyecto-card:hover { transform: translateY(-4px); box-shadow: var(--era-shadow-lg); }
.proyecto-card__image { aspect-ratio: 16 / 10; background: var(--era-gray-100); overflow: hidden; }
.proyecto-card__placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: var(--era-gray-300); font-size: 0.9rem; }
.proyecto-card__placeholder-icon { font-size: 3rem; opacity: 0.7; }
.proyecto-card__body { padding: 1.5rem; }
.proyecto-card__category { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--era-orange); margin-bottom: 0.5rem; }
.proyecto-card__title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.35rem; color: var(--era-dark); line-height: 1.3; }
.proyecto-card__location { font-size: 0.9rem; color: var(--era-text-muted); margin-bottom: 0.75rem; }
.proyecto-card__description { font-size: 0.95rem; color: var(--era-text); line-height: 1.5; }
.proyectos-cta-text { margin-bottom: 1rem; color: var(--era-text-muted); }

/* Contacto */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 992px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.contact-form-wrap { background: var(--era-white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--era-shadow); }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; }
.contact-form__field { display: flex; flex-direction: column; gap: 0.35rem; }
.contact-form__field label { font-weight: 600; font-size: 0.9rem; color: var(--era-dark); }
.contact-form__field input, .contact-form__field textarea { width: 100%; padding: 0.85rem 1rem; font-family: inherit; font-size: 1rem; border: 1px solid var(--era-gray-200); border-radius: var(--radius); background: var(--era-white); color: var(--era-text); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.contact-form__field input:focus, .contact-form__field textarea:focus { outline: none; border-color: var(--era-orange); box-shadow: 0 0 0 3px var(--era-orange-light); }
.contact-form__field input.contact-form__input--error, .contact-form__field textarea.contact-form__input--error { border-color: #c53030; }
.contact-form__error { font-size: 0.85rem; color: #c53030; }
.contact-form__submit { margin-top: 0.5rem; width: 100%; }
@media (min-width: 480px) { .contact-form__submit { width: auto; align-self: flex-start; } }
.contact-info-wrap { display: flex; flex-direction: column; gap: 2rem; }
.contact-info p { margin-bottom: 1rem; color: var(--era-text); line-height: 1.6; }
.contact-info a { color: var(--era-orange); font-weight: 500; transition: color 0.2s ease; }
.contact-info a:hover { color: var(--era-orange-hover); }
.contact-map__wrapper { position: relative; width: 100%; padding-bottom: 75%; height: 0; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--era-shadow); margin-top: 1rem; }
.contact-map__iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.contact-map__link { display: inline-block; margin-top: 0.75rem; font-size: 0.95rem; font-weight: 600; color: var(--era-orange); transition: color 0.2s ease; }
.contact-map__link:hover { color: var(--era-orange-hover); }

/* Animaciones al scroll */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
