/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Banner de capacitación */
.training-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.training-banner a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.training-banner a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.training-banner i {
    margin: 0 10px;
}

.training-banner .fa-arrow-right {
    animation: bounceRight 1s infinite alternate;
}

@keyframes bounceRight {
    from { transform: translateX(0); }
    to { transform: translateX(5px); }
}

@media (max-width: 768px) {
    .training-banner span {
        font-size: 14px;
    }
}

:root {
    --primary-color: #00a8ff;
    --secondary-color: #111111;
    --accent-color: #00a8ff;
    --text-color: #ffffff;
    --light-bg: #1a1a1a;
    --dark-bg: #000000;
    --gray-bg: #222222;
    --white: #ffffff;
    --black: #000000;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background-color: transparent;
    position: fixed;
    width: 100%;
    top: 40px; /* Ajustado para dejar espacio para el banner */
    z-index: 1000;
    transition: all 0.3s ease;
    background: transparent;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

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

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

header.scrolled .nav-links a {
    color: var(--black);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

header.scrolled .nav-links a::after {
    background-color: var(--black);
}

.nav-links a:hover {
    color: var(--primary-color);
}

header.scrolled .nav-links a:hover {
    color: var(--black);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

header.scrolled .menu-btn {
    color: var(--black);
}

.menu-btn:hover {
    color: var(--primary-color);
}

header.scrolled .menu-btn:hover {
    color: var(--black);
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.925);
        padding: 1rem;
        gap: 1rem;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 0.5rem 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a::after {
        display: none;
    }
}

/* Logo styles */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

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

@keyframes logoGradient {
    0% {
        filter: brightness(1) grayscale(0);
    }
    50% {
        filter: brightness(1.2) grayscale(0.5);
    }
    100% {
        filter: brightness(1) grayscale(0);
    }
}

.logo-main {
    height: 250px; /* Tamaño para escritorio */
    width: auto;
    transition: all 0.5s ease;
    cursor: pointer;
    color: #ffffff; /* Ya está en blanco, pero lo mantenemos para claridad */
    filter: brightness(0) invert(1); /* Esto cambiará cualquier imagen a blanco */
}

@media (max-width: 768px) {
    .logo-main {
        height: 165px; /* Tamaño más pequeño para móviles */
    }
}

.logo-main:hover {
    animation: logoGradient 2s infinite;
    transform: scale(1.05);
}

/* Hero Section */
.hero {
    position: relative;
    background: none;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: transparent;
    padding-top: 40px; /* Espacio adicional para el banner */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00000057;
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Button styles */
.cta-button, .submit-btn {
  --black-700: hsla(0 0% 12% / 1);
  --border_radius: 9999px;
  --transtion: 0.3s ease-in-out;
  --offset: 2px;

  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transform-origin: center;
  padding: 1rem 2rem;
  background-color: transparent;
  border: none;
  border-radius: var(--border_radius);
  transform: scale(calc(1 + (var(--active, 0) * 0.1)));
  transition: transform var(--transtion);
  text-decoration: none;
  margin: 0 auto;
  width: fit-content;
}

.hero .cta-button {
  margin: 2rem auto;
  display: block;
}

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

.contact .submit-btn {
  margin-top: 1rem;
}

.cta-button::before, .submit-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 100%;
  background-color: var(--black-700);
  border-radius: var(--border_radius);
  box-shadow: inset 0 0.5px hsl(0, 0%, 100%), inset 0 -1px 2px 0 hsl(0, 0%, 0%),
    0px 4px 10px -4px hsla(0 0% 0% / calc(1 - var(--active, 0))),
    0 0 0 calc(var(--active, 0) * 0.375rem) hsla(0, 0%, 33%, 0.75);
  transition: all var(--transtion);
  z-index: 0;
}

.cta-button::after, .submit-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 100%;
  background-color: hsla(0, 0%, 41%, 0.75);
  background-image: radial-gradient(
      at 51% 89%,
      rgb(56, 56, 56) 0px,
      transparent 50%
    ),
    radial-gradient(at 100% 100%, rgb(0, 0, 0) 0px, transparent 50%),
    radial-gradient(at 22% 91%, rgb(0, 0, 0) 0px, transparent 50%);
  background-position: top;
  opacity: var(--active, 0);
  border-radius: var(--border_radius);
  transition: opacity var(--transtion);
  z-index: 2;
}

.cta-button:is(:hover, :focus-visible),
.submit-btn:is(:hover, :focus-visible) {
  --active: 1;
}

.cta-button:active,
.submit-btn:active {
  transform: scale(1);
}

.dots_border {
  --size_border: calc(100% + 2px);
  overflow: hidden;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: var(--size_border);
  background-color: transparent;
  border-radius: var(--border_radius);
  z-index: -10;
}

.dots_border::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: left;
  transform: rotate(0deg);
  width: 90%;
  height: 2rem;
  background-color: white;
  mask: linear-gradient(transparent 0%, white 120%);
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.sparkle {
  position: relative;
  z-index: 10;
  width: 1.75rem;
}

.sparkle .path {
  fill: currentColor;
  stroke: currentColor;
  transform-origin: center;
  color: hsl(0, 0%, 100%);
}

.cta-button:is(:hover, :focus) .sparkle .path,
.submit-btn:is(:hover, :focus) .sparkle .path {
  animation: path 1.0s linear 0.5s infinite;
}

.sparkle .path:nth-child(1) {
  --scale_path_1: 1.2;
}
.sparkle .path:nth-child(2) {
  --scale_path_2: 1.2;
}
.sparkle .path:nth-child(3) {
  --scale_path_3: 1.2;
}

@keyframes path {
  0%,
  34%,
  71%,
  100% {
    transform: scale(1);
  }
  17% {
    transform: scale(var(--scale_path_1, 1));
  }
  49% {
    transform: scale(var(--scale_path_2, 1));
  }
  83% {
    transform: scale(var(--scale_path_3, 1));
  }
}

.text_button {
  position: relative;
  z-index: 10;
  background-image: linear-gradient(
    90deg,
    hsla(0 0% 100% / 1) 0%,
    hsla(0 0% 100% / var(--active, 0)) 200%
  );
  background-clip: text;
  font-size: 1.2rem;
  color: transparent;
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: var(--gray-bg);
}

.about h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--white);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background-color: var(--secondary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background-color: var(--dark-bg);
}

.services h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.service-icon {
    width: 40px;  /* Ajusta según el tamaño que desees */
    height: 40px; /* Ajusta según el tamaño que desees */
    margin-bottom: 15px;
    object-fit: contain; /* Esto asegura que la imagen se ajuste bien sin distorsionarse */
    filter: brightness(0) saturate(100%) invert(19%) sepia(90%) saturate(2270%) hue-rotate(190deg) brightness(160%) contrast(130%);
}

.service-card {
    color: white;
    text-align: center;
    text-decoration: none;
    padding: 2rem;
    background-color: var(--gray-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background-color: var(--gray-bg);
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--white);
}

#contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 1rem;
    color: var(--text-color);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Contact Info Section */
.contact-info {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    text-align: center;
}

.info-section {
    margin-bottom: 1.5rem;
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.info-section p {
    margin: 0.5rem 0;
}

.info-section i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Earth Canvas */
#earthCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-color: var(--dark-bg);
}

/* History section */
#history {
    background-color: var(--white);
}

#history h2 {
    color: var(--black);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--white);
    margin-right: 1rem;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding: 0 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .logo-img {
        height: 32px;
    }
}
