/* General */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', sans-serif;
}

/* Botón de idioma */
.language-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.btn-language {
    background: #fdd835;
    color: #1c1c1c;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(253, 216, 53, 0.3);
}

.btn-language:hover {
    background: #ffe75e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 216, 53, 0.4);
}

.btn-language #current-lang {
    font-weight: 700;
    font-size: 0.95rem;
}

.btn-language i {
    font-size: 0.95rem;
}


/* Sección Inicio */
#inicio {
  position: relative;
  background-image: url('../assets/fondo-inicio.jpg');
  /* Ajusta al nombre real */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

/* Overlay oscuro para legibilidad */
#inicio::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Contenido centrado sobre el overlay */
#inicio>div {
  position: relative;
  z-index: 2;
  animation: fadeIn 2s ease-in-out;
}

/* Animación de entrada */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Títulos */
h2 {
  font-weight: bold;
  margin-bottom: 30px;
}

/* Navbar - Iconos amarillos */
.navbar .nav-link i {
  color: #fdd835;
  /* Esto afecta a TODOS los <i> del navbar */
  margin-right: 5px;
  transition: transform 0.3s ease;
}

/* Navbar - Menú hamburguesa amarillo */
.navbar-toggler {
  border-color: #fdd835 !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23fdd835' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Quitar el outline/focus persistente */
.navbar-toggler:focus,
.navbar-toggler:active {
  box-shadow: none !important;
  outline: none !important;
  border-color: #fdd835 !important;
}

.navbar-toggler:hover {
  border-color: #ffe75e !important;
}

/* Ajustar menú desplegable en móvil */
@media (max-width: 991.98px) {
  /* Posicionar el menú justo debajo del navbar */
  .navbar-collapse {
    position: absolute;
    top: 100%; /* Se posiciona justo debajo del navbar */
    left: 0;
    right: 0;
    background-color: #343a40;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin: 0 !important;
  }

  /* Estilo de los items del menú */
  .navbar-collapse .navbar-nav {
    padding: 15px 0;
  }

  .navbar-collapse .nav-item {
    text-align: left;
    padding: 0 20px;
  }

  .navbar-collapse .nav-link {
    padding: 12px 15px;
    border-radius: 5px;
    transition: background-color 0.2s;
  }

  .navbar-collapse .nav-link:hover,
  .navbar-collapse .nav-link:focus {
    background-color: rgba(253, 216, 53, 0.1);
  }

  /* Efecto hover en los iconos */
  .navbar-collapse .nav-link:hover i {
    transform: scale(1.1);
  }
}

/* Para pantallas muy pequeñas */
@media (max-width: 576px) {
  .navbar-collapse .nav-link {
    font-size: 0.95rem;
    padding: 10px 12px;
  }
}

/* Sobre mí - Avatar */
.avatar-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fdd835 0%, #ff9800 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #1c1c1c;
    box-shadow: 0 8px 20px rgba(253, 216, 53, 0.3);
    transition: transform 0.3s ease;
}

.avatar-circle:hover {
    transform: scale(1.05);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-box {
    background: white;
    border: 2px solid #fdd835;
    border-radius: 10px;
    padding: 20px 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(253, 216, 53, 0.3);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #fdd835;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-top: 8px;
}

/* Tech Icons */
.tech-icons-sobre-mi {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tech-icon-box {
    width: 50px;
    height: 50px;
    background: #fdd835;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #1c1c1c;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-icon-box:hover {
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 8px 20px rgba(253, 216, 53, 0.4);
}

/* Texto Sobre mí */
.sobre-mi-texto p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.sobre-mi-texto strong {
    color: #1c1c1c;
    font-weight: 600;
}

/* CTA Box */
.cta-sobre-mi {
    background: linear-gradient(135deg, #fdd835 0%, #ff9800 100%);
    color: #1c1c1c;
    padding: 20px;
    border-radius: 10px;
    margin-top: 25px;
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(253, 216, 53, 0.3);
}

.cta-sobre-mi i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .avatar-circle {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .tech-icon-box {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* Habilidades */
#habilidades h2 {
  color: #fdd835;
}

#habilidades i {
  color: #fdd835;
  margin-right: 8px;
  transition: transform 0.3s ease;
}

#habilidades i:hover {
  transform: scale(1.2);
}

.habilidad-box {
  background-color: #1c1c1c;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.habilidad-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

/* Flip Card para Herramientas */
.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  position: relative;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-face {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  backface-visibility: hidden;
  padding: 2rem;
  border-radius: 10px;
  background-color: #1c1c1c;
  color: white;
}

.front.fade-in {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.back {
  transform: rotateY(180deg);
  transition: transform 0.8s ease;
}

/* Botones Flip Card Herramientas */
.herramientas-btn {
  background-color: #fdd835;
  color: #1c1c1c;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  margin: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(253, 216, 53, 0.2);
}

.herramientas-btn:hover {
  background-color: #ffe75e;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(253, 216, 53, 0.3);
}


/* Experiencia */
.experience-card {
    background-color: #1c1c1c; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(253, 216, 53, 0.2);
    border-radius: 8px;
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(253, 216, 53, 0.3);
    border-color: #fdd835;
}

.experience-card .card-body {
    display: flex;
    flex-direction: column;
}


/* Badge "Actual" */
.experience-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    width: fit-content;
}

/* Badge año pasado */
.experience-badge-past {
    display: inline-block;
    background: linear-gradient(135deg, #fdd835 0%, #ff9800 100%);
    color: #1c1c1c;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    width: fit-content;
}

/* Iconos alineados */
#experiencia .card-body i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

#experiencia ul {
    padding-left: 20px;
}

#experiencia ul li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #e0e0e0; /* Color claro para las listas sobre fondo negro */
}

/* Educación y Certificaciones */
.education-card,
.certification-card {
  background-color: #1c1c1c; 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(253, 216, 53, 0.2);
  border-radius: 8px;
  min-height: 100%;
  /* Asegura que todas tengan la misma altura */
}

.education-card:hover,
.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(253, 216, 53, 0.3);
  border-color: #fdd835;
}

.education-card .card-body,
.certification-card .card-body {
  display: flex;
  flex-direction: column;
}

/* Badge de año */
.year-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fdd835 0%, #ff9800 100%);
  color: #1c1c1c;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  width: fit-content;
}

/* Badge de certificación */
.cert-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fdd835 0%, #ff9800 100%);
  color: #1c1c1c;
  padding: 8px 18px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Títulos de sección */
#educacion h4 {
  font-weight: bold;
  display: inline-block;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

#educacion h4 i {
  margin-right: 10px;
}

/* Alineación de iconos */
#educacion .card-body i {
  width: 20px;
  text-align: center;
  margin-right: 8px;
}

/* Espaciado uniforme */
#educacion .card-title {
  min-height: 60px;
  /* Altura mínima para títulos */
}

/* Contenido que va al final */
.mt-auto {
  margin-top: auto !important;
}


/* Idiomas */
#idiomas i {
  color: #333;
  margin-right: 8px;
}

/* Contacto */
#contacto h2 {
  color: #fdd835;
}

#contacto i {
  transition: transform 0.3s ease;
}

#contacto i:hover {
  transform: scale(1.2);
  color: #fdd835;
}

#contacto .fab {
  color: #fdd835;
  transition: color 0.3s ease;
}

#contacto .fab:hover {
  color: #ffe75e; /* Amarillo más claro al hover */
}

/* Botón Enviar  */
#form-contacto .btn-warning {
  background-color: #fdd835 !important;
  border-color: #fdd835 !important;
  color: #1c1c1c !important;
}

#form-contacto .btn-warning:hover {
  background-color: #ffe75e !important;
  border-color: #ffe75e !important;
}


/* Hero Content - Animaciones secuenciales */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 90%;
  margin: 0 auto;
}

.hero-greeting,
.hero-title,
.hero-subtitle,
.hero-description,
.hero-button {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

/* Tamaños FLUIDOS - AUMENTADOS para tablets/móviles grandes */
.hero-greeting {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 400;
  margin-bottom: 1rem;
  animation-delay: 0.2s;
}

.hero-title {
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 1;
  margin: 0;
  animation-delay: 0.4s;
}

.gradient-text {
  background: linear-gradient(90deg,
      #ffd700 0%,
      #fdd835 25%,
      #ff9800 50%,
      #fdd835 75%,
      #ffd700 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.hero-subtitle {
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  animation-delay: 0.6s;
}

.hero-description {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  margin-bottom: 1rem;
  animation-delay: 0.8s;
  line-height: 1.6;
}

.hero-button {
  animation-delay: 1s;
  border: 2px solid #fdd835;
  color: #fdd835;
  padding: clamp(0.7rem, 2.5vw, 0.9rem) clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 600;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  transition: all 0.3s ease;
  display: inline-block;
}

.hero-button:hover {
  background-color: #fdd835;
  color: #1c1c1c;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(253, 216, 53, 0.3);
}

/* Animación principal */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animación de saludo en la mano */
.wave {
  animation-name: wave-animation;
  animation-duration: 3s;
  animation-iteration-count: 1;
  /* Solo 3 veces */
  transform-origin: 70% 70%;
  display: inline-block;
  font-size: clamp(1.8rem, 5vw, 1.5rem);
  /* Más grande en móvil, normal en desktop */

}

@keyframes wave-animation {
  0% {
    transform: rotate(0deg);
  }

  10% {
    transform: rotate(14deg);
  }

  20% {
    transform: rotate(-8deg);
  }

  30% {
    transform: rotate(14deg);
  }

  40% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(10deg);
  }

  60% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(0deg);
  }
}