/* Enhanced Styles for Novedades and Asociados */

/* Novedades enhanced */
.novedad-card {
  background: var(--cge-white);
  border: 1px solid var(--cge-gray-200);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
}

.novedad-card:hover {
  border-color: rgba(211, 129, 78, 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.novedad-header {
  padding: 32px 40px 24px;
  border-bottom: 1px solid var(--cge-gray-100);
}

.novedad-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cge-primary-dark);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.novedad-title {
  font-size: 1.875rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.novedad-subtitle {
  font-size: 1.125rem;
  color: var(--cge-gray-600);
  margin: 0;
  font-weight: 500;
}

.novedad-body {
  padding: 32px 40px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.novedad-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--cge-gray-200);
}

.novedad-content {
  color: var(--cge-gray-600);
  line-height: 1.8;
  font-size: 0.9375rem;
}

.novedad-content p {
  margin-bottom: 16px;
}

.novedad-content p:last-child {
  margin-bottom: 0;
}

/* Asociados - tarjetas con logo destacado */
.partners-grid {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  max-width: var(--cge-container-width);
  margin: 0 auto;
  padding: 0 32px;
}

.partner-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cge-white);
  border: 1px solid var(--cge-gray-200);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.partner-card:hover {
  transform: translateY(-4px);
  border-color: rgba(211, 129, 78, 0.42);
  box-shadow: 0 20px 46px rgba(17, 24, 39, 0.09);
}

.partner-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  padding: 30px 34px;
  border: 0;
  border-bottom: 1px solid var(--cge-gray-200);
  background:
    radial-gradient(circle at 82% 8%, rgba(211, 129, 78, 0.1), transparent 42%),
    var(--cge-gray-100);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.partner-card-media:hover {
  background-color: #f3f4f6;
}

.partner-card-media:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: -3px;
}

.partner-logo-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  height: 130px;
  padding: 20px 28px;
  background: var(--cge-white);
  border: 1px solid var(--cge-gray-200);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-card:hover .partner-logo-plate {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.09);
}

.partner-logo-plate img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 28px 26px;
}

.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  color: var(--cge-primary-dark);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.partner-badge::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--cge-primary);
}

.partner-name {
  margin: 0;
  color: var(--cge-gray-900);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

.partner-subtitle {
  margin: 6px 0 0;
  color: var(--cge-gray-500);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.partner-preview {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 16px 0 0;
  color: var(--cge-gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.partner-preview:hover {
  color: var(--cge-primary-dark);
  text-decoration: none;
}

.partner-preview > i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--cge-primary-dark);
  font-size: 0.8125rem;
}

.partner-preview > i.partner-preview-arrow {
  margin-left: 2px;
  color: var(--cge-gray-400);
  font-size: 0.6875rem;
}

.partner-card-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--cge-gray-100);
}

.partner-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cge-primary-dark);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease;
}

.partner-detail-btn i {
  transition: transform 0.2s ease;
}

.partner-detail-btn:hover {
  color: var(--cge-primary-darker);
}

.partner-detail-btn:hover i {
  transform: translateX(3px);
}

.partner-detail-btn:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: 3px;
}

/* Modal de asociado */
.partner-modal .member-modal-dialog {
  width: min(600px, 100%);
}

.partner-modal-logo {
  flex: 0 0 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 84px;
  padding: 12px 16px;
  background: var(--cge-white);
  border: 1px solid var(--cge-gray-200);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.07);
}

.partner-modal-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner-modal-subtitle {
  margin: 5px 0 0;
  color: var(--cge-gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
}

.partner-detail-person + .partner-detail-person {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--cge-gray-200);
}

.partner-detail-person-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--cge-gray-800);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
}

.partner-detail-person-name i {
  color: var(--cge-primary-dark);
  font-size: 0.75rem;
}

.partner-modal-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  width: 100%;
  margin-top: 22px;
  padding: 13px 18px;
  border-radius: 10px;
  background: var(--cge-primary);
  color: var(--cge-white);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.partner-modal-action:hover {
  background: var(--cge-primary-dark);
  color: var(--cge-white);
  text-decoration: none;
}

.partner-modal-action:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .partners-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .partners-grid {
    gap: 20px;
    padding: 0 20px;
  }

  .partner-card {
    border-radius: 14px;
  }

  .partner-card-media {
    min-height: 170px;
    padding: 24px 22px;
  }

  .partner-logo-plate {
    height: 104px;
    padding: 16px 22px;
  }

  .partner-card-body {
    padding: 22px 22px 24px;
  }

  .partner-name {
    font-size: 1.125rem;
  }

  .partner-modal .member-modal-dialog {
    width: 100%;
  }

  .partner-modal-logo {
    flex-basis: 92px;
    width: 92px;
    height: 64px;
    padding: 9px 12px;
  }

  .partner-modal-subtitle {
    font-size: 0.8125rem;
  }
}

/* Servicios - tarjetas mejoradas */
.card-clean--service {
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-clean--service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1;
  background: linear-gradient(90deg, var(--cge-primary), var(--cge-primary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card-clean--service:hover,
.card-clean--service:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(211, 129, 78, 0.4);
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.1);
}

.card-clean--service:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: 3px;
}

.card-clean--service:active {
  transform: translateY(-2px) scale(0.995);
}

.card-clean--service:hover::before,
.card-clean--service:focus-visible::before {
  transform: scaleX(1);
}

.card-clean--service .card-clean-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.card-clean--service .card-clean-icon {
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.card-clean--service:hover .card-clean-icon,
.card-clean--service:focus-visible .card-clean-icon {
  background: var(--cge-primary);
  color: var(--cge-white);
  transform: scale(1.06);
}

/* Título y texto con altura uniforme entre tarjetas */
.card-clean--service .card-clean-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.card-clean--service .card-clean-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 5.1em;
  margin-bottom: 20px;
}

/* CTA tipo pill, siempre alineado al pie */
.card-clean--service .card-clean-link {
  margin-top: auto;
  align-self: flex-start;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(211, 129, 78, 0.1);
  color: var(--cge-primary-dark);
  transition: background-color 0.3s ease, color 0.3s ease, gap 0.3s ease;
}

.card-clean--service:hover .card-clean-link,
.card-clean--service:focus-visible .card-clean-link {
  background: var(--cge-primary);
  color: var(--cge-white);
  gap: 12px;
}

.card-clean--service .card-clean-link .card-clean-arrow {
  transition: transform 0.3s ease;
}

.card-clean--service:hover .card-clean-link .card-clean-arrow,
.card-clean--service:focus-visible .card-clean-link .card-clean-arrow {
  transform: translateX(2px);
}

/* Feedback de carga */
.card-clean--service .card-clean-spinner {
  display: none;
}

.card-clean--service.is-loading {
  pointer-events: none;
}

.card-clean--service.is-loading .card-clean-arrow {
  display: none;
}

.card-clean--service.is-loading .card-clean-spinner {
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  .card-clean--service,
  .card-clean--service::before,
  .card-clean--service .card-clean-icon,
  .card-clean--service .card-clean-link,
  .card-clean--service .card-clean-arrow {
    transition: none;
  }

  .card-clean--service:hover,
  .card-clean--service:focus-visible,
  .card-clean--service:active {
    transform: none;
  }

  .project-card.is-revealing {
    animation: none;
  }

  .project-card:hover,
  .project-card:focus-visible,
  .project-card:active {
    transform: none;
  }
}

/* Modal de servicio */
.service-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.service-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.service-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.service-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: var(--cge-white);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.28);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.service-modal.is-open .service-modal-dialog {
  transform: none;
}

.service-modal-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.service-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cge-gray-200);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--cge-gray-500);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.service-modal-close:hover {
  background: var(--cge-white);
  border-color: var(--cge-gray-300);
  color: var(--cge-primary-dark);
}

.service-modal-close:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: 2px;
}

.service-modal-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 32px 72px 26px 32px;
  background: linear-gradient(135deg, rgba(211, 129, 78, 0.14) 0%, rgba(211, 129, 78, 0.03) 100%);
  border-bottom: 1px solid var(--cge-gray-100);
}

.service-modal-icon {
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--cge-primary);
  color: var(--cge-white);
  font-size: 1.75rem;
  box-shadow: 0 8px 20px rgba(211, 129, 78, 0.3);
}

.service-modal-title {
  margin: 0 0 6px;
  font-size: 1.375rem;
  line-height: 1.25;
}

.service-modal-label {
  display: block;
  margin-bottom: 6px;
  color: var(--cge-gray-500);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-modal-body {
  padding: 26px 32px 32px;
}

.service-modal-detail {
  color: var(--cge-gray-600);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.service-modal-detail p {
  margin: 0 0 0.85rem;
}

.service-modal-detail p:last-child {
  margin-bottom: 0;
}

.service-modal-detail strong {
  color: var(--cge-gray-800);
}

.service-modal-detail ul,
.service-modal-detail ol {
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
}

.service-modal-detail li {
  margin-bottom: 0.35rem;
}

.service-modal-loading {
  color: var(--cge-gray-500);
  font-style: italic;
}

/* Proyectos - tarjetas */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--cge-white);
  border: 1px solid var(--cge-gray-200);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(211, 129, 78, 0.4);
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.1);
}

.project-card:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: 3px;
}

.project-card:active {
  transform: translateY(-2px) scale(0.995);
}

.project-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--cge-gray-100);
}

.project-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card:hover .project-card-media img,
.project-card:focus-visible .project-card-media img {
  transform: scale(1.06);
}

.project-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0) 45%, rgba(17, 24, 39, 0.55) 100%);
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-card-media::after,
.project-card:focus-visible .project-card-media::after {
  opacity: 1;
}

.project-card-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cge-primary-dark);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  max-width: calc(100% - 32px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-card-spinner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  color: var(--cge-primary-dark);
  font-size: 1.5rem;
}

.project-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 22px 24px 24px;
}

.project-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  margin-bottom: 8px;
  font-size: 1.125rem;
  line-height: 1.35;
}

.project-card-norma {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--cge-gray-500);
  font-size: 0.875rem;
}

.project-card-norma i {
  flex: 0 0 auto;
  color: var(--cge-primary-dark);
}

.project-card-norma span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  align-self: flex-start;
  color: var(--cge-primary-dark);
  font-size: 0.9rem;
  font-weight: 600;
  transition: gap 0.3s ease;
}

.project-card-link i {
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-link,
.project-card:focus-visible .project-card-link {
  gap: 12px;
}

.project-card:hover .project-card-link i,
.project-card:focus-visible .project-card-link i {
  transform: translateX(2px);
}

.project-card.is-hidden {
  display: none;
}

@keyframes projectCardReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card.is-revealing {
  animation: projectCardReveal 0.45s ease both;
}

.project-card.is-loading {
  pointer-events: none;
}

.project-card.is-loading .project-card-spinner {
  display: flex;
}

/* Buscador de proyectos */
.projects-toolbar {
  display: flex;
  justify-content: center;
  margin: 0 auto 24px;
  padding: 0 32px;
}

.projects-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 460px;
}

.projects-search > i {
  position: absolute;
  left: 18px;
  color: var(--cge-gray-500);
  font-size: 0.9375rem;
  pointer-events: none;
}

.projects-search input {
  width: 100%;
  padding: 13px 46px 13px 44px;
  border: 1px solid var(--cge-gray-300);
  border-radius: 999px;
  background: var(--cge-white);
  color: var(--cge-gray-800);
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.projects-search input::placeholder {
  color: var(--cge-gray-500);
}

.projects-search input:focus {
  outline: none;
  border-color: var(--cge-primary);
  box-shadow: 0 0 0 4px rgba(211, 129, 78, 0.16);
}

.projects-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.projects-search-clear {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cge-gray-500);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.projects-search-clear:hover {
  background: var(--cge-gray-100);
  color: var(--cge-primary-dark);
}

.projects-search-clear[hidden] {
  display: none;
}

.projects-empty {
  margin: 8px 0 0;
  padding: 0 32px;
  text-align: center;
  color: var(--cge-gray-500);
  font-size: 0.9375rem;
}

.projects-empty[hidden] {
  display: none;
}

/* Botón ver más proyectos */
.projects-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  padding: 0 32px;
}

.projects-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border: 1px solid var(--cge-gray-300);
  border-radius: 999px;
  background: var(--cge-white);
  color: var(--cge-primary-dark);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.projects-toggle[hidden] {
  display: none;
}

.projects-toggle:hover {
  background: var(--cge-primary);
  border-color: var(--cge-primary);
  color: var(--cge-white);
  box-shadow: 0 10px 26px rgba(211, 129, 78, 0.28);
}

.projects-toggle:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: 3px;
}

.projects-toggle i {
  transition: transform 0.3s ease;
}

.projects-toggle .projects-toggle-spinner {
  display: none;
}

.projects-toggle.is-loading .projects-toggle-icon {
  display: none;
}

.projects-toggle.is-loading .projects-toggle-spinner {
  display: inline-block;
}

.projects-toggle:disabled {
  cursor: default;
}

.projects-toggle:disabled:hover {
  background: var(--cge-white);
  border-color: var(--cge-gray-300);
  color: var(--cge-primary-dark);
  box-shadow: none;
}

/* Modal de proyecto */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.project-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.project-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.project-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: var(--cge-white);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.28);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.project-modal.is-open .project-modal-dialog {
  transform: none;
}

.project-modal-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cge-gray-200);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--cge-gray-500);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.project-modal-close:hover {
  background: var(--cge-white);
  border-color: var(--cge-gray-300);
  color: var(--cge-primary-dark);
}

.project-modal-close:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: 2px;
}

.project-modal-media {
  position: relative;
  aspect-ratio: 16 / 7;
  background: var(--cge-gray-100);
}

.project-modal-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-modal-body {
  padding: 30px 34px 34px;
}

.project-modal-tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(211, 129, 78, 0.12);
  color: var(--cge-primary-dark);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-modal-title {
  margin: 0 0 20px;
  font-size: 1.625rem;
  line-height: 1.3;
}

.project-modal-meta {
  display: grid;
  gap: 14px;
}

.project-modal-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--cge-gray-100);
  border: 1px solid var(--cge-gray-200);
  border-radius: 12px;
}

.project-modal-meta-icon {
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(211, 129, 78, 0.12);
  color: var(--cge-primary-dark);
  font-size: 15px;
}

.project-modal-meta-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.project-modal-meta-text small {
  color: var(--cge-gray-500);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-modal-meta-value {
  color: var(--cge-gray-700);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.project-modal-meta-value p {
  margin: 0 0 0.5rem;
}

.project-modal-meta-value p:last-child {
  margin-bottom: 0;
}

.project-modal-loading {
  color: var(--cge-gray-500);
  font-style: italic;
}

/* Responsive */
@media (max-width: 968px) {
  .novedad-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .novedad-image {
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .novedad-header,
  .novedad-body {
    padding: 24px;
  }
  
  .novedad-title {
    font-size: 1.5rem;
  }
  
  .novedad-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 560px) {
  .service-modal {
    padding: 16px;
  }

  .service-modal-dialog {
    max-height: calc(100vh - 32px);
    border-radius: 14px;
  }

  .service-modal-close {
    top: 12px;
    right: 12px;
  }

  .service-modal-head {
    gap: 14px;
    padding: 26px 60px 22px 22px;
  }

  .service-modal-icon {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .service-modal-title {
    font-size: 1.1875rem;
  }

  .service-modal-body {
    padding: 22px 22px 26px;
  }
}

@media (max-width: 560px) {
  .project-modal {
    padding: 16px;
  }

  .project-modal-dialog {
    max-height: calc(100vh - 32px);
    border-radius: 14px;
  }

  .project-modal-close {
    top: 12px;
    right: 12px;
  }

  .project-modal-media {
    aspect-ratio: 16 / 10;
  }

  .project-modal-body {
    padding: 22px 22px 26px;
  }

  .project-modal-title {
    font-size: 1.375rem;
  }

  .projects-toggle-wrap {
    margin-top: 32px;
    padding: 0 20px;
  }
}

/* ============================================================
   Novedades - formato noticias
   ============================================================ */
.news-wrap {
  box-sizing: border-box;
  max-width: var(--cge-container-width);
  margin: 0 auto;
  padding: 0 32px;
}

.news-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cge-primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-meta i {
  font-size: 0.875rem;
}

.news-featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--cge-white);
  border: 1px solid var(--cge-gray-200);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.news-featured:hover {
  transform: translateY(-3px);
  border-color: rgba(211, 129, 78, 0.35);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
}

.news-featured-media {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 260px;
  background: var(--cge-gray-100);
  overflow: hidden;
}

.news-featured-media img,
.news-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-featured:hover .news-featured-media img,
.news-card:hover .news-card-media img {
  transform: scale(1.04);
}

.news-featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--cge-primary);
  color: var(--cge-white);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(211, 129, 78, 0.35);
}

.news-featured-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 28px 30px;
}

.news-featured-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--cge-gray-900);
}

.news-featured-subtitle {
  margin: 0;
  color: var(--cge-gray-700);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
}

.news-featured-excerpt,
.news-card-excerpt {
  margin: 0;
  color: var(--cge-gray-600);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.news-featured-actions,
.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.news-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border: 1px solid var(--cge-primary);
  border-radius: 999px;
  background: var(--cge-primary);
  color: var(--cge-white);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.news-read-btn i {
  transition: transform 0.25s ease;
}

.news-read-btn:hover {
  background: var(--cge-primary-dark);
  border-color: var(--cge-primary-dark);
  box-shadow: 0 10px 24px rgba(211, 129, 78, 0.3);
}

.news-read-btn:hover i {
  transform: translateX(3px);
}

.news-read-btn:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: 3px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--cge-white);
  border: 1px solid var(--cge-gray-200);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(211, 129, 78, 0.35);
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.1);
}

.news-card-media {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  background: var(--cge-gray-100);
  overflow: hidden;
}

.news-card-body {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
}

.news-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 1.1875rem;
  line-height: 1.35;
  color: var(--cge-gray-900);
}

.news-card-subtitle {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: var(--cge-gray-700);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
}

.news-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  margin-top: auto;
  padding-top: 6px;
}

.news-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  color: rgba(211, 129, 78, 0.55);
  font-size: 2.5rem;
  background:
    linear-gradient(135deg, rgba(211, 129, 78, 0.12), rgba(211, 129, 78, 0.02)),
    var(--cge-gray-100);
}

.news-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.news-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--cge-gray-200);
  border-radius: 50%;
  background: var(--cge-white);
  color: var(--cge-gray-500);
  font-size: 0.9375rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.news-share-btn:hover {
  transform: translateY(-2px);
  color: var(--cge-white);
}

.news-share-btn:focus-visible {
  outline: 2px solid var(--cge-primary-dark);
  outline-offset: 2px;
}

.news-share-whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
}

.news-share-facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.news-share-linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
}

.news-share-instagram:hover {
  border-color: transparent;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.news-empty {
  margin: 0;
  padding: 40px 0;
  text-align: center;
  color: var(--cge-gray-500);
}

.news-modal .news-modal-dialog {
  width: min(820px, 100%);
}

.news-modal-media {
  position: relative;
  aspect-ratio: 16 / 7;
  background: var(--cge-gray-100);
  overflow: hidden;
}

.news-modal-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-modal-body {
  padding: 34px 42px 40px;
}

.news-modal-title {
  margin: 14px 0 10px;
  font-size: 1.875rem;
  line-height: 1.25;
  color: var(--cge-gray-900);
}

.news-modal-subtitle {
  margin: 0 0 22px;
  color: var(--cge-gray-700);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.55;
}

.news-modal-content {
  color: var(--cge-gray-600);
  font-size: 0.96875rem;
  line-height: 1.8;
}

.news-modal-content p {
  margin: 0 0 16px;
}

.news-modal-content p:last-child {
  margin-bottom: 0;
}

.news-modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.news-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--cge-gray-200);
}

.news-modal-share-label {
  color: var(--cge-gray-500);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1200;
  max-width: calc(100vw - 40px);
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.92);
  color: var(--cge-white);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.news-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@media (max-width: 968px) {
  .news-featured {
    grid-template-columns: 1fr;
  }

  .news-featured-media {
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }

  .news-featured-body {
    padding: 24px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .news-wrap {
    padding: 0 20px;
  }

  .news-featured-body {
    padding: 24px 22px 26px;
  }

  .news-featured-title {
    font-size: 1.375rem;
  }

  .news-card-body {
    padding: 22px;
  }

  .news-modal-body {
    padding: 26px 22px 30px;
  }

  .news-modal-title {
    font-size: 1.375rem;
  }

  .news-share-btn {
    width: 34px;
    height: 34px;
  }
}

/* Contacto */
.contact-wrap {
  box-sizing: border-box;
  max-width: var(--cge-container-width);
  margin: 0 auto;
  padding: 0 32px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: stretch;
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-aside .contact-info-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contact-aside .contact-info-card .card-clean-content {
  display: flex;
  flex-direction: column;
}

.contact-media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--cge-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 12px 34px rgba(17, 24, 39, 0.06);
}

.contact-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0) 45%, rgba(17, 24, 39, 0.55) 100%);
  pointer-events: none;
}

.contact-media img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.contact-media:hover img {
  transform: scale(1.03);
}

.contact-media-quote {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  margin: 0;
  padding: 14px 18px;
  border-left: 3px solid var(--cge-primary-light);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.45);
  color: var(--cge-white);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.2);
  backdrop-filter: blur(6px);
}

.contact-media-quote blockquote {
  margin: 0;
  color: var(--cge-white);
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

.contact-media-quote figcaption {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-info-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.contact-info-lead {
  margin-bottom: 20px;
  font-size: 0.9375rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.contact-info-item:hover {
  background: var(--cge-gray-100);
}

.contact-info-icon {
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(211, 129, 78, 0.12);
  color: var(--cge-primary-dark);
  font-size: 16px;
}

.contact-info-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-info-label {
  color: var(--cge-gray-500);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-info-text a {
  color: var(--cge-gray-700);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

.contact-info-text a:hover {
  color: var(--cge-primary-dark);
  text-decoration: underline;
}

.contact-form-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-form-card .card-clean-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.contact-form-header {
  margin-bottom: 24px;
}

.contact-form-header h3 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.contact-form-header p {
  margin: 0;
  font-size: 0.9375rem;
}

.contact-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.contact-alert i {
  margin-top: 2px;
}

.contact-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.contact-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-field label {
  color: var(--cge-gray-700);
  font-size: 0.8125rem;
  font-weight: 600;
}

.contact-field label span {
  color: var(--cge-primary-dark);
}

.contact-field input,
.contact-field textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cge-gray-300);
  border-radius: 8px;
  background: var(--cge-white);
  color: var(--cge-gray-800);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--cge-gray-400);
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--cge-primary);
  box-shadow: 0 0 0 3px rgba(211, 129, 78, 0.16);
}

.contact-field input[aria-invalid="true"],
.contact-field textarea[aria-invalid="true"] {
  border-color: #dc2626;
}

.contact-field input[aria-invalid="true"]:focus,
.contact-field textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.contact-field textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-field-error {
  color: #b91c1c;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-captcha {
  padding-top: 4px;
}

.contact-captcha-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.8125rem;
}

.contact-submit {
  width: 100%;
  justify-content: center;
  border: none;
  cursor: pointer;
  margin-top: 4px;
}

.contact-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.contact-form-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--cge-gray-500);
  font-size: 0.75rem;
  text-align: center;
}

.contact-form-note i {
  color: var(--cge-primary-dark);
}

@media (max-width: 968px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-media img {
    height: 260px;
  }
}

@media (max-width: 640px) {
  .contact-wrap {
    padding: 0 20px;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .contact-media img {
    height: 220px;
  }

  .contact-media-quote {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 12px 14px;
  }

  .contact-media-quote blockquote {
    font-size: 0.9375rem;
  }

  .contact-info-item {
    padding: 10px 8px;
  }

  .contact-captcha .g-recaptcha {
    transform: scale(0.9);
    transform-origin: left top;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-media img,
  .contact-info-item,
  .contact-info-text a {
    transition: none;
  }
}
