/* ============================================================
   SECTIONS.CSS
   One-page section styles: hero, nosotros, proyectos, noticias, contacto, news reader
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - 5rem);
  min-height: calc(100dvh - 5rem);
  display: flex;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  background-color: transparent;
  box-sizing: border-box;
}

/* Background layer sits at z-index 0; content sits at z-index 1 */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.68;
}

.hero__bg-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(4, 15, 34, 0.95) 0%,
      rgba(4, 15, 34, 0.88) 25%,
      rgba(4, 15, 34, 0.70) 50%,
      rgba(4, 15, 34, 0.48) 75%,
      rgba(4, 15, 34, 0.35) 100%
    ),
    linear-gradient(
      180deg,
      rgba(4, 15, 34, 0.85) 0%,
      rgba(4, 15, 34, 0.40) 30%,
      rgba(4, 15, 34, 0.28) 50%,
      rgba(4, 15, 34, 0.65) 75%,
      rgba(4, 15, 34, 0.98) 100%
    );
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  pointer-events: none;
}

/* Ensure hero text content sits above the absolute background */
.hero > .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero__content {
  max-width: 52rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.hero__badge,
.nosotros__tag,
.contacto__badge {
  display: inline-block;
  width: fit-content;
  padding: 0.35rem 0.85rem;
  background-color: var(--velez-blue-main);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: clamp(0.6875rem, 1.5vw, 0.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-style: italic;
  margin-bottom: 1.25rem;
  box-shadow: none;
}

.hero__title {
  display: block;
  margin-bottom: 1.4rem;
  font-family: 'Oswald', 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem, 7.5vw, 5.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 15%, rgba(185, 215, 255, 0.65) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  width: 100%;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 36rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ── Vector Heading SVG Layout ───────────────────────────── */
[data-vector-heading] {
  display: block;
  line-height: 1;
}

.hero__title-svg,
.section-heading-svg {
  display: block;
  width: auto;
  max-width: 100%;
  overflow: visible;
}

.proyectos__heading .section-heading-svg,
.contacto__heading .section-heading-svg {
  margin-inline: auto;
}

/* ── Nosotros ─────────────────────────────────────────────── */
.nosotros {
  position: relative;
  z-index: 2;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background-color: var(--velez-blue-dark);
}

.nosotros__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: stretch;
}

.nosotros__img-column {
  display: flex;
  flex-direction: column;
}

.nosotros__img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: clamp(260px, 45vw, 440px);
  border-radius: 0;
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nosotros__img {
  width: 100%;
  height: 100%;
  flex-grow: 1;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nosotros__img-wrap:hover .nosotros__img {
  transform: scale(1.03);
}

.nosotros__stat-bar {
  background-color: var(--velez-blue-main);
  color: #fff;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  border-radius: 0;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.nosotros__stat-icon {
  width: 2.25rem;
  height: 2.25rem;
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0;
}

.nosotros__stat-info {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nosotros__stat-number {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 800;
}

.nosotros__stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nosotros__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nosotros__heading,
.noticias__heading,
.proyectos__heading,
.contacto__heading {
  font-family: 'Oswald', 'Bebas Neue', sans-serif;
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  line-height: 1.15;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, #ffffff 15%, rgba(185, 215, 255, 0.65) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.nosotros__text {
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  line-height: 1.75;
}

.nosotros__cards {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.nosotros__card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: var(--velez-blue-main);
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 4px solid #ffffff;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.nosotros__card:hover {
  transform: translateX(4px);
  background-color: var(--velez-blue-secondary);
  border-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nosotros__card-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0;
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nosotros__card-text h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.125rem;
}

.nosotros__card-text p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

@media (min-width: 992px) {
  .nosotros__grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* ── Proyectos (Form Section) ─────────────────────────────── */
.proyectos {
  position: relative;
  z-index: 2;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background-color: var(--velez-blue-main);
  color: #fff;
  text-align: center;
}

.proyectos .container {
  max-width: 56rem;
}

.proyectos__subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ── Noticias ─────────────────────────────────────────────── */
.noticias {
  position: relative;
  z-index: 2;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background-color: var(--velez-blue-dark);
}

.noticias__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.noticias__subtext {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0;
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
  line-height: 1.65;
}

.noticias__ver-todo {
  color: #ffffff;
  font-weight: 700;
  border-bottom: 2px solid var(--velez-blue-main);
  padding-bottom: 0.25rem;
  font-size: 0.9375rem;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
  white-space: nowrap;
}

.noticias__ver-todo:hover {
  color: var(--velez-blue-main);
}

.noticias__grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .noticias__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .noticias__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.noticia {
  cursor: pointer;
  background-color: var(--velez-blue-main);
  border-radius: 0;
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.noticia:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.4);
}

.noticia__img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--velez-blue-dark);
  border-radius: 0;
}

.noticia__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.noticia:hover .noticia__img {
  transform: scale(1.05);
}

.noticia__body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.noticia__cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background-color: rgba(4, 15, 34, 0.5);
  padding: 0.2rem 0.6rem;
  display: inline-block;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.noticia__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  transition: color 0.2s;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

.noticia:hover .noticia__title {
  color: #ffffff;
  text-decoration: underline;
}

.noticia__excerpt {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  /* Smooth transition for desktop hover */
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-bottom 0.35s ease;
}

.noticia:hover .noticia__excerpt {
  max-height: 5rem;
  opacity: 1;
  margin-bottom: 1rem;
}

/* Touch & small-screen accessibility: reveal excerpt directly without requiring hover */
@media (hover: none), (max-width: 768px) {
  .noticia__excerpt {
    max-height: 5rem;
    opacity: 0.95;
    margin-bottom: 0.875rem;
  }
}

.noticia__date {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.noticia__date svg {
  flex-shrink: 0;
  stroke: rgba(255, 255, 255, 0.85);
}

/* ── Contacto / Sumate ───────────────────────────────────── */
.contacto {
  position: relative;
  z-index: 2;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background-color: var(--velez-blue-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  text-align: center;
}

.contacto__wrapper {
  max-width: 680px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.contacto__subtext {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 2rem;
}

.contacto__info-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: rgba(4, 15, 34, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.875rem 1.5rem;
  border-radius: 0;
  margin-bottom: 2rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
}

.contacto__info-box:hover {
  border-color: #ffffff;
  background-color: rgba(4, 15, 34, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.contacto__info-box svg {
  color: #ffffff;
  flex-shrink: 0;
}

.contacto__email-link {
  color: #ffffff;
  font-weight: 700;
  font-size: clamp(0.8125rem, 2.5vw, 0.9375rem);
  text-decoration: none;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contacto__email-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.contacto__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  max-width: min(320px, 100%);
  background-color: #ffffff;
  color: var(--velez-blue-main);
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1rem 2rem;
  border-radius: 0;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-body);
  cursor: pointer;
  box-sizing: border-box;
}

.contacto__btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.contacto__btn svg {
  stroke: var(--velez-blue-main);
}

/* ── Full-Page News Reader Modal ─────────────────────────── */
.news-reader-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: var(--velez-blue-dark);
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 3vw, 1.5rem) 8rem;
  color: #ffffff;
  box-sizing: border-box;
}

.news-reader-modal[hidden] {
  display: none;
}

.news-reader-container {
  container-type: inline-size;
  container-name: reader-card;
  max-width: 52rem;
  margin-inline: auto;
  background-color: var(--velez-blue-main);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 3.5vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid #ffffff;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.news-reader-cat {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background-color: rgba(4, 15, 34, 0.6);
  padding: 0.25rem 0.75rem;
  margin-bottom: 1.25rem;
}

.news-reader-title {
  margin-bottom: 1.375rem;
  line-height: 1;
}

.news-reader-title-svg {
  display: block;
  width: 100%;
  height: auto;
  shape-rendering: geometricPrecision;
}

.news-reader-subtitle {
  font-family: var(--font-editorial-body);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 400;
  font-style: italic;
  text-wrap: balance;
  max-width: 60ch;
}

.news-reader-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.news-reader-tags {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.news-tag-pill {
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgba(4, 15, 34, 0.6);
  color: #ffffff;
  padding: 0.15rem 0.5rem;
}

.news-reader-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.news-reader-body {
  font-family: var(--font-editorial-body);
  font-size: var(--editorial-body-size);
  line-height: var(--editorial-body-line-height);
  color: rgba(255, 255, 255, 0.95);
  overflow-wrap: break-word;
  word-break: break-word;
  font-weight: 400;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  hyphens: auto;
  text-wrap: pretty;
}

.news-reader-body p {
  margin-bottom: 1.75rem;
  orphans: 2;
  widows: 2;
  hanging-punctuation: first;
}

.news-reader-body p.lead {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 500;
  line-height: 1.7;
  color: #ffffff;
}

.news-reader-body h2,
.news-reader-body h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.8vw, 1.5rem);
  font-weight: 700;
  color: #ffffff;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.news-reader-body ul {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.news-reader-body li {
  margin-bottom: 0.75rem;
  list-style-type: disc;
}

.news-reader-body blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.35rem;
  background-color: rgba(4, 15, 34, 0.4);
  border-left: 3px solid #ffffff;
  font-style: italic;
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
}

.news-reader-body figure {
  margin: 2rem 0;
}

.news-reader-body figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-reader-body figcaption {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
  font-style: italic;
}

.news-reader-body .video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-reader-body .video-embed iframe,
.news-reader-body .video-embed video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Floating Circular Close Button */
.news-reader-close {
  position: fixed;
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1010;
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--velez-blue-main);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.news-reader-close:hover {
  transform: translateX(-50%) scale(1.1);
  background-color: var(--velez-blue-secondary);
}
