/* ===== HERO VIDEO SECTION ===== */
.hero {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 800px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 6%;
  padding-top: 260px;
  background: #3c3b3b;
}

.hero-video {
  position: absolute;
  top: -14%;
  left: 0;
  width: 97%;
  height: 90%;
  object-fit: cover;
  opacity: 0.9;
}

.hero-darken {
  position: absolute;
  top: 0;
  left: 0;
  width: 97.1%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.1) 50%,
      rgba(0, 0, 0, 0.6) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
}

.hero-content h1 {
  font-weight: 300;
  font-size: clamp(3.5rem, 5vw + 1.5rem, 6.5rem);
  /* 56px → 96px */
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

/* Teal diagonal masks */
.hero-mask {
  position: absolute;
  bottom: -1px;
  left: 3%;
  /* Margin from left */
  width: 97%;
  /* Margin from right */
  height: 480px;
  background: #3c585f;
  clip-path: polygon(0 54%, 100% 33%, 100% 100%, 0 100%);
  z-index: 10;
  /* Lowered */
}

.hero-mask-overlay {
  position: absolute;
  bottom: -1px;
  left: 3%;
  /* Margin from left */
  width: 97%;
  /* Margin from right */
  height: 499px;
  background: rgb(0 0 0 / 52%);
  clip-path: polygon(0 50%, 100% 30%, 100% 100%, 0 100%);
  z-index: 9;
  /* Lowered */
}

/* ===== TEAL SECTION ===== */
.teal-section {
  position: relative;
  background: #3c3b3b;
  /* padding: 0 0 98px 6%; */
  color: #fff;
  z-index: 30;
  /* Much higher than the hero masks */
  /* margin-left: 5%; */
  padding: 0;
  margin: 0;
  /* height: 27vh; */
}

.teal-container {
  position: relative;
  z-index: 20;
  background: #3c585f;
  padding-left: 3%;
  margin-top: -220px;
  margin-left: 3%;
  width: 97%;
  min-height: 231px;
  padding-bottom: 40px;
}

.teal-section h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: #ffa700;
  margin-bottom: 19px;
  line-height: 1.1;
  max-width: 1100px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.teal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.teal-left p {
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 550px;
}

.teal-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.teal-right h3 {
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 10px;
}

/* ===== INDUSTRIES SECTION ===== */
.industries-section {
  background: #c9d1d3;
  padding: 73px 3%;
  color: #333;
  margin-left: 3%;
}

.industries-container {
  max-width: 1600px;
  margin: 0 auto;
}

.industries-section h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: #537780;
  margin-bottom: 60px;
  text-align: left;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.industry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
}

.industry-circle {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-bottom: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.industry-circle-link {
  display: block;
  width: 100%;
  text-decoration: none;
}

.industry-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.industry-item:hover .industry-circle img {
  transform: scale(1.1);
}

.industry-circle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.industry-item:hover .industry-circle-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.industry-circle-overlay h3 {
  color: #fff;
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

.industry-item p {
  font-size: 20px;
  line-height: 1.5;
  color: #444;
  max-width: 100%;
  padding: 0 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1600px) {}

@media (max-width: 1024px) {
  .site-wrapper {
    max-width: 100%;
    margin: 0;
  }

  .nav {
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
  }

  .nav-right {
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .hero {
    height: 40vh;
    min-height: unset;
    padding: 0 5% 60px 20px;
    display: flex;
    align-items: flex-end;
    z-index: 35;
  }

  .hero-video {
    width: 100%;
    left: 0;
    top: 0;
    height: 90%;
  }

  .hero-darken {
    height: 90%;
  }

  .hero-mask,
  .hero-mask-overlay {
    left: 3%;
    width: 97%;
    height: 160px;
  }

  .hero-mask {
    clip-path: polygon(0 65%, 100% 35%, 100% 100%, 0 100%);
  }

  .hero-mask-overlay {
    clip-path: polygon(0 60%, 100% 30%, 100% 100%, 0 100%);
  }

  .hero-content h1 {
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -1px;
  }

  .teal-section {
    height: auto;
  }

  .teal-container {
    margin-left: 3%;
    margin-top: -54px;
    padding: 50px 20px 40px;
    width: 97%;
    clip-path: none;
  }

  .teal-section h2 {
    font-size: 24px;
  }

  .teal-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .industries-section {
    margin-left: 3%;
    padding: 60px 20px;
  }

  .industry-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .industry-item {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .industry-circle-link {
    flex-shrink: 0;
    width: 153px;
  }

  .industry-circle {
    width: 153px;
    height: 153px;
    aspect-ratio: unset;
    margin-bottom: 0;
  }

  .industry-circle-overlay h3 {
    font-size: 19px;
    letter-spacing: 1px;
  }

  .industry-item p {
    text-align: left;
    font-size: 19px;
  }

  .partners-section {
    margin-left: 0;
    padding: 60px 20px;
  }

  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .partner-item {
    padding: 10px;
  }
}


@media (max-width: 480px) {

  .hero-content {
    position: relative;
    z-index: 30;
    max-width: 1200px;
    top: -30px;
  }

  .hero-content h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero-mask {
    height: 154px;
  }
}

/* ===== TECHNOLOGIES SECTION ===== */
.technologies-section {
  background: #c9d1d3;
  padding: 0px 3%;
  margin-right: 3%;
  color: #537780;
  overflow: hidden;
}

.technologies-container {
  max-width: 1530px;
  margin: 0 auto;
  position: relative;
  min-height: clamp(700px, 62vw, 880px);
}

.tech-central {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-37%, -75%);
  text-align: center;
  z-index: 10;
}

.tech-central h2 {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 600;
  color: #537780;
  line-height: 1.2;
  max-width: 250px;
}

.tech-item {
  position: absolute;
  top: 45%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: clamp(340px, 43vw, 540px);
  text-align: center;
  z-index: 5;
}

.tech-circle {
  width: clamp(150px, 18vw, 240px);
  height: clamp(150px, 18vw, 240px);
  flex-shrink: 0;
  background: #ffffff69;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 1.2vw, 20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.tech-circle:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.tech-circle img {
  width: clamp(55px, 8vw, 100px);
  height: clamp(55px, 8vw, 100px);
  object-fit: contain;
  margin-bottom: clamp(5px, 0.6vw, 10px);
}

.tech-circle span {
  font-size: clamp(10px, 1.85vw, 16px);
  font-weight: 700;
  color: #537780;
  text-transform: uppercase;
  line-height: 1.2;
  max-width: clamp(120px, 12vw, 165px);
}

.tech-description {
  font-size: clamp(12px, 1.40vw, 20px);
  line-height: 1.1;
  font-weight: 300;
  color: #000000;
  text-align: left;
}

/* Positioning Technology Items around the center */
/* Data & AI - Top Left */
.tech-item.ai {
  transform: translate(calc(-100% - clamp(25px, 3.5vw, 52px)), clamp(-305px, -35vw, -175px));
  flex-direction: row;
  text-align: right;
  margin-left: clamp(20px, 54vw, 69px);
  width: clamp(340px, 43vw, 580px);
}

.tech-item.ai .tech-description {
  max-width: clamp(190px, 52vw, 505px);
}

/* Geospatial - Top Right */
.tech-item.geospatial {
  transform: translate(clamp(35px, -6.5vw, 72px), clamp(-305px, -27vw, -165px));
  flex-direction: row;
  text-align: left;
}

/* Cybersecurity - Middle Left */
.tech-item.cybersecurity {
  transform: translate(calc(-99% - clamp(50px, 65vw, 20px)), clamp(-65px, 5.5vw, -65px));
  flex-direction: row;
  text-align: right;
  width: clamp(340px, 43vw, 560px);
}

.tech-item.cybersecurity .tech-description {
  padding-left: clamp(20px, 3vw, 45px);
  max-width: clamp(190px, 17vw, 404px);
}

/* Edge - Middle Right */
.tech-item.edge {
  transform: translate(clamp(80px, 10vw, 120px), clamp(-65px, 5.5vw, -65px));
  flex-direction: row;
  text-align: left;
}

/* IoT - Bottom Center */
.tech-item.iot {
  transform: translate(-44%, clamp(75px, 11.5vw, 80px));
  width: clamp(250px, 28vw, 400px);
  flex-direction: column;
}

.tech-item .tech-description {
  max-width: clamp(180px, 18vw, 255px);
}

.tech-item.iot .tech-description {
  max-width: clamp(200px, 22vw, 300px);
  margin-top: 10px;
  text-align: left;
}

/* ===== SERVICES SECTION ===== */
.services-section {
  position: relative;
  background-image: url('/assets/images/services-section.jpg');
  background-size: cover;
  background-position: center;
  margin-left: 3%;
  padding: 30px 3% 30px 3%;
  margin-top: 30px;
  margin-bottom: 30px;
}

@supports (background-image: url('/assets/images/services-section.webp')) {
  .services-section {
    background-image: url('/assets/images/services-section.webp');
  }
}

.services-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.services-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.services-content {
  max-width: 600px;
  margin-bottom: 90px;
}

.services-subtitle {
  color: #ffa700;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.services-title {
  color: #ffffff;
  font-size: clamp(2rem, 5vw + 1rem, 3.125rem);
  /* 32px - 50px */
  line-height: 1.2;
  font-weight: 300;
  margin-bottom: 30px;
  letter-spacing: -0.5px;
}

.services-text {
  color: rgba(255, 255, 255, 0.95);
  font-size: 19px;
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 300;
}

.btn-services {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 35px;
  border: 1px solid #ffa700;
  color: #ffa700;
  font-weight: 600;
  font-size: 19px;
  text-transform: uppercase;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.btn-services:hover {
  background: #ffa700;
  color: #fff;
}

.trapezoid-container {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  width: 100%;
}

.trapezoid-box {
  flex: 1;
  background: rgba(255, 255, 255, 0.65);
  clip-path: polygon(0 15px, 100% 0, 100% 100%, 0 calc(100% - 20px));
  padding: 20px 20px 20px 20px;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, background 0.3s ease;
  min-height: 110px;
}

/* .trapezoid-box:hover {
      background: rgba(255, 255, 255, 1);
      transform: translateY(-5px);
    } */

.trapezoid-box span {
  font-size: 20px;
  font-weight: 600;
  color: #537780;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .technologies-container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    gap: 60px;
  }

  .tech-central {
    position: static;
    transform: none;
    margin-bottom: 40px;
  }

  .tech-item {
    position: static;
    width: 100% !important;
    flex-direction: column !important;
    text-align: center !important;
    transform: none !important;
  }

}

/* ===== PARTNERS SECTION ===== */
.partners-carousel-viewport {
  overflow: visible;
}

.partners-nav {
  display: none;
}

.partners-section {
  background: #3c3b3b;
  padding: 80px 3%;
}

.partners-container {
  max-width: 1600px;
  margin: 0 auto;
}

.partners-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffa700;
  margin-bottom: 50px;
  letter-spacing: 0.5px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-content: center;
  row-gap: 50px;
}

.partner-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 30px;
  height: 80px;
}

.partner-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.partner-item:nth-child(6n+1)::before {
  display: none;
}

.partner-item img {
  max-width: 100%;
  height: auto;
  max-height: 45px;
  filter: brightness(0) invert(1);
  opacity: 0.65;
  transition: all 0.3s ease;
}

/* Logo con fondo/pastilla propia (POSEIDON): mostrar en color original,
   sin el filtro blanco que lo rompe */
.partner-item:nth-child(1) img {
  filter: none;
  opacity: 0.65;
}

/* Edgendria: logo fuente baja resolucion, se ve tenue/pequeño -> +20% tamaño */
.partner-item:nth-child(11) img {
  max-height: 54px;
}

/* IDboxRT: el texto "IDbox" es fino y bajo respecto al isotipo -> +20% */
.partner-item:nth-child(2) img {
  max-height: 54px;
}

.partner-item:hover img {
  /* filter: brightness(0) invert(1);
      opacity: 1; */
  transform: scale(1.05);
}

@media (max-width: 1600px) {
  .partners-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

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

  .partner-item:nth-child(6n+1)::before {
    display: block;
  }

  .partner-item:nth-child(3n+1)::before {
    display: none;
  }
}

@media (max-width: 768px) {
  /* .partners-grid {
      grid-template-columns: repeat(2, 1fr);
    } */

  /* .partner-item:nth-child(3n+1)::before {
      display: block;
    }

    .partner-item:nth-child(2n+1)::before {
      display: none;
    } */
  .partners-title {
    margin-left: 3%;
  }

  .partners-section {
    margin-left: 0;
    padding: 50px 0 50px 0px;
  }

  .partners-carousel-viewport {
    overflow: hidden;
  }

  .partners-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    grid-template-columns: unset;
    gap: 0;
    transition: transform 0.35s ease;
  }

  .partner-item {
    flex: 0 0 33.333%;
    height: 70px;
    padding: 8px 12px;
  }

  .partner-item+.partner-item {
    border-left: 1px solid rgba(255, 255, 255, 0.25);
  }

  .partner-item::before {
    display: none;
  }

  .partners-nav {
    display: flex;
    justify-content: space-between;
    padding: 16px 0px 0px 0px;
    margin-left: 0px;
  }

  .partners-arrow {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 22px;
    cursor: pointer;
    padding: 6px 14px;
    transition: color 0.2s;
  }

  .partners-arrow:hover {
    color: #fff;
  }

  .technologies-section {
    margin-left: 0;
    margin-right: 3%;
    padding: 30px 16px 40px;
    overflow: visible;
  }

  .technologies-container {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 0;
  }

  .tech-central {
    position: static;
    transform: none;
    margin-bottom: 24px;
    text-align: left;
  }

  .tech-central h2 {
    font-size: 20px;
    font-weight: 700;
    max-width: none;
    line-height: 1.2;
  }

  .tech-central h2 br {
    display: none;
  }

  .tech-item {
    position: static !important;
    transform: none !important;
    flex-direction: row !important;
    width: 100% !important;
    text-align: left !important;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
  }

  .tech-item .tech-description,
  .tech-item.iot .tech-description {
    flex: 1;
    max-width: none !important;
    font-size: 18px;
    margin-top: 0;
  }

  .tech-circle {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
  }

  .tech-circle img {
    width: 40px;
    height: 40px;
  }

  .tech-circle span {
    font-size: 9px;
  }

  .tech-item.cybersecurity .tech-description {
    padding-left: 0;
  }

  .tech-item.ai,
  .tech-item.cybersecurity {
    margin-left: 0;
  }

  .tech-item.iot {
    flex-direction: row-reverse !important;
  }

  .services-section {
    margin-left: 0;
    padding: 60px 20px;
  }

  .services-overlay {
    background: rgba(0, 0, 0, 0.65);
  }

  .trapezoid-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .trapezoid-box {
    flex: 0 0 calc((100% - 20px) / 3);
    clip-path: polygon(0 20px, 100% 0, 100% 100%, 0 calc(100% - 20px));
    padding: 15px 10px 18px 10px;
    min-height: 80px;
  }


  .trapezoid-box span {
    font-size: 11px;
    text-align: left;
    line-height: 1.2;
  }

  .services-title {
    font-size: 30px;
  }
}

/* ===== BLOG SECTION ===== */
.blog-section {
  background: #3c3b3b;
  padding: 30px 6% 40px 6%;
  margin-left: 0;
}

.blog-container {
  max-width: 1400px;
  margin: 0 auto;
}

.blog-section-title {
  color: #ffa700;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 50px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
}

.blog-circle {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  position: absolute;
  top: 0;
  z-index: 1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  left: 0;
}

.blog-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.blog-trapezoid {
  background: #ebeeefe0;
  width: 70%;
  margin-top: 130px;
  padding: 50px 20px 30px 20px;
  clip-path: polygon(0 20px, 100% 0, 100% 100%, 0 calc(100% - 10px));
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  transition: transform 0.3s ease;
  margin-left: 160px;
}

.blog-card:hover .blog-circle img {
  transform: scale(1.08);
}

.blog-category {
  font-size: 19px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}

.blog-title {
  font-size: 24px;
  font-weight: 700;
  color: #537780;
  line-height: 1.15;
  margin-bottom: 12px;
}

.blog-excerpt {
  font-size: 19px;
  color: #537780;
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.blog-readmore {
  font-size: 19px;
  font-weight: 700;
  color: #537780;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-readmore:hover {
  color: #ffa700;
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-circle {
    width: 280px;
    height: 280px;
  }

  .blog-trapezoid {
    margin-top: 160px;
  }
}

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

  .blog-section {
    padding: 60px 20px;
  }
}