@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');
@import "variables.css";

/* 1. Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* 2. Utilities */
.container {
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  width: 90%;
}

.section {
  padding: var(--spacing-xl) 0;
}

.bg-light {
  background-color: var(--bg-light);
}

.bg-dark {
  background-color: var(--bg-dark);
  color: var(--text-white);
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-blue);
}

.text-white {
  color: var(--text-white);
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

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

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Spacing Utils */
.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mb-xl {
  margin-bottom: var(--spacing-xl);
}

/* 3. Components */

/* Buttons */
.btn {
  display: inline-block;
  padding: 1.2rem 3rem;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
  text-align: center;
  border: 2px solid transparent;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: var(--text-white);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn--outline {
  background: transparent;
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.btn--outline:hover {
  background: var(--primary-blue);
  color: var(--text-white);
}

.btn--white {
  background: var(--text-white);
  color: var(--primary-dark);
}

.btn--white:hover {
  background: var(--bg-light);
  transform: translateY(-2px);
}


/* Headings */
.heading-xl {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: var(--spacing-md);
}

.heading-lg {
  font-size: 3.6rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}

.heading-lg::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 6rem;
  height: 4px;
  background: var(--primary-blue);
  border-radius: 2px;
}

/* Specific left-aligned underline for Contacto */
.heading-lg.title-underline::after {
  left: 0;
  transform: none;
  width: 4rem;
  /* Under the "Con" */
  width: 2.5rem;
  /* Closer to just "C" */
  background-color: var(--primary-blue);
}

.heading-md {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

/* Header */
.header {
  height: 8rem;
  background-color: #ffffff;
  /* Total white */
  /* removed backdrop-filter as it's solid white now */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  /* Added absolute context for logo */
  /* already fixed, serves as containing block */
}

/* Netelip Button Styled */
/* Netelip Button Styled */
.Pbx-Netelip {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  /* Moved to right */
  z-index: 9999;
}

/* Hide the text to make it just an icon */
.textpbx {
  display: none;
}

.btn-netelip {
  width: 6rem;
  height: 6rem;
  background: linear-gradient(135deg, var(--primary-blue), #2a8bf2);
  /* Vibrant Blue Gradient */
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 98, 185, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Pulse animation effect */
.btn-netelip::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  animation: pulse-ring 2s infinite;
}

/* Phone Icon */
.btn-netelip::after {
  content: '\f095';
  /* FontAwesome Phone */
  font-family: "FontAwesome";
  font-size: 2.8rem;
  color: #ffffff;
}

.btn-netelip:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 98, 185, 0.6);
  background: linear-gradient(135deg, #033957, var(--primary-blue));
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.header.scrolled {
  height: 7rem;
  box-shadow: var(--shadow-md);
}

.header__content {
  display: flex;
  align-items: center;
  height: 100%;
  /* allow logo to escape container width constraints */
  position: static;
  justify-content: center;
}

.header__logo-container {
  position: absolute;
  left: 2rem;
  /* Small padding from screen edge */
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.header__logo-img {
  max-width: 100%;
  max-height: 5rem;
  left: 3%;
  /* Smaller but not too small (was 6rem, before 7.5, orig 3.5) */
  width: auto;
  display: block;
}

.header__main {
  display: flex;
  justify-content: center;
  width: 100%;
  /* Ensure it takes full width to center properly */
}

/* Header Socials (Right Side) */
.header__socials-top {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 1.5rem;
  z-index: 10;
}

.btn--secondary {
  background-color: var(--secondary-blue);
  color: var(--text-white);
  box-shadow: var(--shadow-md);
}

.btn--secondary:hover {
  background-color: #0f2d4a;
  /* Darker shade of secondary */
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.header__social-icon {
  color: #033957;
  font-size: 2.4rem;
  transition: transform 0.3s, color 0.3s;
}

.header__social-icon:hover {
  transform: scale(1.1);
  color: var(--primary-blue);
}



.header__links {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.header__link {
  font-weight: 700;
  color: #333;
  transition: color 0.3s;
  font-size: 1.6rem;
  position: relative;
  /* Keep for ::after */
  padding: 0.5rem 0;
  /* Keep for ::after */
}

.header__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: var(--transition-fast);
}

.header__link:hover {
  color: var(--primary-blue);
}

.header__link.active {
  color: #033957;
}

.header__link:hover::after,
.header__link.active::after {
  width: 100%;
}

/* Mobile Menu Trigger */
.header__ham-menu {
  display: none;
  cursor: pointer;
  width: 3rem;
}

/* Mobile Menu */
.header__sm-menu {
  position: fixed;
  top: 8rem;
  left: 0;
  width: 100%;
  background: var(--bg-white);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  transform: translateY(-150%);
  transition: var(--transition-normal);
  z-index: 999;
}

.header__sm-menu.active {
  transform: translateY(0);
}

.header__sm-menu-link a {
  display: block;
  padding: 1.5rem;
  border-bottom: 1px solid var(--bg-light);
  font-weight: 600;
  text-align: center;
}


/* Hero Section */
.hero {
  text-align: center;
  color: var(--text-white);
  padding-top: 8rem;
}

.hero__carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero__carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  /* Adjusted to 1s to fit 2s interval */
  z-index: 1;
  box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.7);
  /* Deep inner shadow/vignette */
  /* Flex to center text */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

.hero__carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

/* Persistent Content Overlay */
.hero__content-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  /* Extremely high to force layer on top */
  text-align: center;
  width: 100%;
  padding: 0 2rem;
  color: #ffffff;
  pointer-events: none;
  /* Container passes clicks */
}

.hero__text-wrapper {
  transition: opacity 0.5s ease, transform 0.5s ease;
  min-height: 25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}

.hero__divider {
  width: 5rem;
  height: 2px;
  background-color: var(--primary-blue);
  margin: 1rem auto;
  opacity: 0.8;
}

/* Ensure Button is visible and positioned lower */
.home__btns {
  position: relative;
  z-index: 3000;
  /* Higher than container */
  margin-top: 4rem;
  pointer-events: auto;
  /* Buttons catch clicks */
}

/* Force button/link to be clickable */
.home__btns .hero-link {
  position: relative;
  z-index: 200;
  pointer-events: auto;
  cursor: pointer;
  display: inline-block;
  font-size: 2rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: 600;
}

.home__btns .hero-link:hover {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
  transform: translateY(-2px);
}

.hero__carousel {
  position: relative;
  /* Ensure stacking context */
  height: 100vh;
  /* Ensure it matches hero height if needed */
}

/* Floating animation for the button */
.home__btns .btn {
  animation: floating 3s ease-in-out infinite;
}

.home__btns .btn:hover {
  animation-play-state: paused;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Dark overlay but lighter than before to see images, just enough for text contrast */
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* Ensure content is above carousel */
.hero__content {
  position: relative;
  z-index: 3;
}

.hero__content {
  max-width: 90rem;
  animation: fadeInUp 1s ease;
}

/* Clean Card Styles (for Services, Projects, etc) */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card__icon {
  width: 6rem;
  height: 6rem;
  margin-bottom: var(--spacing-md);
  /* Placeholder for icon styling */
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  font-size: 2.5rem;
}

/* Project/Service Row (Alternating) */
.row-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.row-item:nth-child(even) {
  flex-direction: row-reverse;
}

.row-item__img {
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.row-item__img:hover img {
  transform: scale(1.05);
}

.row-item__content {
  flex: 1;
}

.row-item__content h3,
.row-item__content .heading-md {
  color: #033957;
}

/* Forms */
input,
textarea,
select {
  font-family: inherit;
  /* Inherit Outfit/Manrope from body */
  font-size: 1.6rem;
  /* Readable text size */
  color: var(--text-dark);
}

textarea {
  resize: vertical;
  /* Allow user resizing vertically */
  min-height: 18rem;
  /* Increased default height */
}

/* Footer */
.footer {
  background: #111;
  color: #fff;
  padding: 6rem 0 3rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer__socials {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.footer__social-link {
  background: rgba(255, 255, 255, 0.1);
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.footer__social-link:hover {
  background: var(--primary-blue);
}

.footer__bottom {
  border-top: 1px solid #333;
  padding-top: var(--spacing-md);
  text-align: center;
  font-size: 1.4rem;
  color: var(--text-light);
}

/* Media Queries */
@media (max-width: 900px) {
  html {
    font-size: 56.25%;
  }

  /* 1rem = 9px */

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__socials {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .header__links {
    display: none;
  }

  .header__socials-top {
    display: flex;
    right: 6rem;
    /* Position to the left of the menu */
  }


  .header__ham-menu {
    display: block;
    position: absolute;
    right: 2rem;
    left: auto;
    /* Reset left */
    top: 50%;
    transform: translateY(-50%);
  }

  /* Ensure close icon is hidden if user wants only 3 lines always */
  .header__ham-menu-close {
    display: none !important;
  }

  .header__logo-container {
    left: 2rem;
    transform: translateY(-50%);
  }

  .hero {
    min-height: 60vh;
  }

  .heading-xl {
    font-size: 4rem;
  }

  .row-item,
  .row-item:nth-child(even) {
    flex-direction: column;
    text-align: center;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floating {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Slider */
.slider {
  margin: var(--spacing-xl) auto;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.slider::before,
.slider::after {
  background: linear-gradient(to right, var(--bg-white) 0%, rgba(255, 255, 255, 0) 100%);
  content: "";
  height: 100%;
  position: absolute;
  width: 200px;
  z-index: 2;
}

.slider::after {
  background: linear-gradient(to left, var(--bg-white) 0%, rgba(255, 255, 255, 0) 100%);
  right: 0;
  top: 0;
}

.slider::before {
  left: 0;
  top: 0;
}

.slide-track {
  animation: scroll 40s linear infinite;
  display: flex;
  width: calc(250px * 14);
}

.slide {
  height: 100px;
  width: 250px;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide img {
  max-height: 80px;
  width: auto;
  filter: grayscale(100%);
  transition: var(--transition-fast);
}

.slide:hover img {
  filter: grayscale(0%);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-250px * 7));
  }

  /* Adjust based on slide count/width */
}

/* Fixed Netelip removed (duplicate) */
/* Ensure no X overflow */
html,
body {
  overflow-x: hidden;
}