:root {
  /* Abnavi Colors */
  --bg-navy: #001A33;
  --bg-darker: #000c1a;
  --bg-lighter: #012b54;
  --accent-teal: #006680;
  --accent-teal-light: #008ba3;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;

  --font-main: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-darker);
  color: var(--text-primary);
  overflow-x: hidden;
  max-width: 100%;
  scroll-padding-top: 100px;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Glassmorphism Utility */
.glass {
  background: rgba(0, 26, 51, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 102, 128, 0.2);
}

.primary-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--accent-teal), #004d66);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 102, 128, 0.3);
  cursor: pointer;
  max-width: 100%;
  word-wrap: break-word;
  white-space: normal;
  text-align: center;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 128, 0.5);
  background: linear-gradient(135deg, var(--accent-teal-light), var(--accent-teal));
}

.secondary-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  color: var(--text-primary);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 1px solid var(--accent-teal);
  cursor: pointer;
  max-width: 100%;
  word-wrap: break-word;
  white-space: normal;
  text-align: center;
}

.secondary-btn:hover {
  background: rgba(0, 102, 128, 0.1);
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  transition: all 0.3s ease;
  padding: 1.5rem 0;
  background: rgba(248, 250, 252, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 26, 51, 0.05) !important;
}

header.scrolled {
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 4px 20px rgba(0, 26, 51, 0.08);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo img {
  height: 48px;
  object-fit: contain;
}

/* Fallback logo style if image fails */
.logo-fallback {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-fallback span {
  color: var(--accent-teal-light);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links li a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg-navy);
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: var(--accent-teal);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--bg-navy);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 2rem 0;
  overflow: hidden;
  background: var(--bg-navy);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-darker) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  margin-top: 5rem;
}

.hero-subtitle {
  color: var(--accent-teal-light);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.hero h1 .typewriter-text {
  color: var(--accent-teal-light);
  border-right: 3px solid var(--accent-teal-light);
  padding-right: 5px;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* Partners Section */
.partners {
  padding: 4rem 2rem;
  background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-navy) 100%);
  border-bottom: 1px solid rgba(0, 102, 128, 0.1);
  text-align: center;
}

.partners p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.on-empresas-logo {
  max-width: 250px;
  opacity: 0.8;
  transition: opacity 0.3s;
  filter: grayscale(100%) brightness(1.5);
}

.on-empresas-logo.colored {
  filter: none;
}

.partners:hover .on-empresas-logo {
  opacity: 1;
  filter: none;
}

.partner-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 3rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Services Grid */
.services {
  padding: 6rem 2rem;
  background: var(--bg-navy);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: var(--bg-lighter);
  border: 1px solid rgba(0, 102, 128, 0.15);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(0, 102, 128, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-teal);
  box-shadow: 0 10px 30px rgba(0, 26, 51, 0.5);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 102, 128, 0.1);
  color: var(--accent-teal-light);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.service-card.highlight {
  background: linear-gradient(145deg, #013566, var(--bg-lighter));
  border-color: var(--accent-teal);
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.highlight-content {
  flex: 1;
}

.highlight-visual {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px dashed rgba(0, 102, 128, 0.4);
}

.highlight-visual img {
  width: 150px;
  margin-top: 1rem;
}

.badge {
  background: var(--accent-teal);
  color: white;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  border-radius: 4px;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  display: inline-block;
}

/* About Section */
.about {
  position: relative;
  padding: 8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-darker);
  overflow: hidden;
}

.about-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 0;
}

.about-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
  padding: 4rem;
  border-radius: 16px;
}

.about h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.about p {
  font-size: 1.25rem;
  color: #e2e8f0;
}

/* Contact Section */
.contact {
  padding: 6rem 2rem;
  background: var(--bg-navy);
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info {
  min-width: 0;
  max-width: 100%;
}

.contact-info h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  word-break: break-word;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.contact-item i {
  color: var(--accent-teal-light);
}

.contact-form {
  min-width: 0;
  max-width: 100%;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--bg-lighter);
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 102, 128, 0.2);
  max-width: 100%;
  box-sizing: border-box;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-teal);
  background: rgba(0, 102, 128, 0.05);
}

.form-submit-container {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Footer */
footer {
  padding: 3rem 2rem;
  background: #f8fafc;
  border-top: 1px solid rgba(0, 26, 51, 0.1);
  text-align: center;
  color: var(--bg-navy);
}

/* Responsive */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 3rem;
  }

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

  .service-card.highlight {
    grid-column: span 1;
    flex-direction: column;
    text-align: center;
  }

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

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: #ffffff;
    flex-direction: column;
    justify-content: center;
    transition: left 0.3s;
  }

  .nav-links.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2.2rem;
    word-break: break-word;
  }

  .about h2 {
    font-size: 2rem;
  }

  .contact-info h2 {
    font-size: 2rem;
  }

  .about-content {
    padding: 2rem;
  }

  /* Centrado Global Mobile */
  .hero-content {
    text-align: center;
  }

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

  .service-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .service-icon {
    margin-left: auto;
    margin-right: auto;
  }

  .highlight-content ul {
    align-items: center;
  }

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

  .contact-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

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

  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .contact-item i {
    margin: 0 auto;
  }

  .form-group label {
    text-align: center;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    text-align: center;
    text-align-last: center;
  }

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

  .form-submit-container {
    flex-direction: column;
    align-items: center;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
    box-sizing: border-box;
  }

  .contact-form form {
    padding: 2rem 1.2rem;
    width: 100%;
    overflow: hidden;
  }

  .contact {
    padding: 4rem 1.5rem;
  }

  .services {
    padding: 4rem 1.5rem;
  }
}