/* ===============================
   RESET + FUENTE
=============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: 'Stropica';
  src: url('fonts/StropicaDEMO.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Marvin';
  src: url('fonts/397-font_1.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'MuseoAtSymbol';
  src: url('fonts/MuseoSansRounded900.otf') format('opentype');
}

.at-symbol {
  font-family: 'MuseoAtSymbol', sans-serif;
}

html, body {
  height: 100%;
  font-family: 'Stropica', sans-serif;
  color: #306bc7;
  scroll-behavior: smooth;
  background: #FFF6E0 url('img/Fondopagina.png') center center / auto repeat;
}

#loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #0057a0, #002855);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

/* Clase para ocultar el loader */
#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-icon {
  width: 200px;
  height: 200px;
  animation: girar 5s linear infinite;
}

.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Animación de rotación */
@keyframes girar {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===============================
   PARALLAX
=============================== */
.parallax {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.layer {
  position: absolute;
  width: 100%;
  height: 100vh;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  will-change: transform, opacity;
  transition: opacity 0.3s ease-out, transform 0.2s ease-out;
}

.linea-animada {
  animation: parpadeoLinea 2s infinite ease-in-out;
}

@keyframes parpadeoLinea {
  0%, 100% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0.3;
    transform: translateY(10px);
  }
}

/* Animaciones */
@keyframes scrollFondo {
  0% { background-position: 0 0; }
  100% { background-position: -1000px 0; }
}

@keyframes zoomSuave {
  0%, 100% {
    transform: scale(1) translateY(var(--scroll-y, 0px));
  }
  50% {
    transform: scale(1.02) translateY(var(--scroll-y, 0px));
  }
}

@keyframes estrellasDestello {
  0%, 100% {
    transform: scale(0.7);
    opacity: 0;
  }
  40% {
    transform: scale(1.05);
    opacity: 1;
  }
  60% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes giroSuave {
  0%, 100% {
    transform: rotate(-1deg) translateY(var(--scroll-y, 0px));
    transform-origin: bottom center;
  }
  50% {
    transform: rotate(1deg) translateY(var(--scroll-y, 0px));
    transform-origin: bottom center;
  }
}

/* Capas móviles */
#layer1 {
  background-image: url('img/mobile/Fondo 1.png');
  background-repeat: repeat-x;
  background-size: cover;
  background-position: 0 0;
  animation: scrollFondo 150s linear infinite;
}

@media screen and (min-width: 768px) {
  #layer1 {
    animation: none;
    background-position: center;
  }
}

#layer2 { background-image: url('img/mobile/Fondo 2.png'); z-index: 2; }
#layer3 { background-image: url('img/mobile/Fondo 3.png'); z-index: 3; }
#layer4 { background-image: url('img/mobile/Fondo 4.png'); z-index: 4; }
#layer5 {
  background-image: url('img/mobile/Fondo 5.png');
  z-index: 5;
  animation: giroSuave 8s ease-in-out infinite;
  transform-origin: bottom center;
  left: -10px;
  bottom: -5px;
}
#layer6 {
  background-image: url('img/mobile/Fondo 6.png');
  z-index: 6;
  animation: giroSuave 4s ease-in-out infinite;
  transform-origin: bottom center;
  right: -10px;
  bottom: -5px;
}
#layer7 { background-image: url('img/mobile/Fondo 7.png'); z-index: 9; }
#layer8 {
  background-image: url('img/mobile/Fondo 8.png');
  z-index: 10;
  animation: zoomSuave 3s ease-in-out infinite;
  transform-origin: bottom center;
}
#layer9 { background-image: url('img/mobile/Fondo 9.png'); z-index: 11; }

/* Capas escritorio */
@media (min-width: 768px) {
  #layer1 { background-image: url('img/desktop/Fondo 1.png'); }
  #layer2 { background-image: url('img/desktop/Fondo 2.png'); }
  #layer3 { background-image: url('img/desktop/Fondo 3.png'); }
}

/* ===============================
   SKILLS
=============================== */
.skills {
  position: relative;
  z-index: 10;
  padding: 2rem;
}

.skill-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.skill-link .col-6:last-child {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.icon-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(to right, #ffe600, #ff9800);
  position: relative;
  overflow: visible;
}

.skill-icon {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: auto;
  display: inline-block;
  transition: transform 0.3s ease;
}

.skill-title {
  font-size: 1.5rem;
  text-align: center;
  display: inline-block;
  transition: transform 0.3s ease;
  margin: 0;
  width: 100%;
}

.skill-link:hover .skill-icon {
  transform: translateX(-50%) scale(1.1);
}

.skill-link:hover .skill-title {
  transform: scale(1.1);
}

.skill-divider {
  width: 100%;
}

@media (min-width: 768px) {
  .skill-divider {
    display: none !important;
  }
}

/* ===============================
   FOOTER
=============================== */
.footer {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: transparent;
  font-family: 'Marvin', sans-serif;
}

.footer-layer {
  position: relative;
  width: 100%;
  height: auto;
}

.footer-bg {
  width: 100%;
  display: block;
}

.footer-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
  animation: estrellasDestello 2.5s ease-in-out infinite;
}

.footer-figure {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 100%;
  height: auto;
  z-index: 2;
}

.footer-contact {
  position: absolute;
  bottom: 20px;
  width: 100%;
  z-index: 3;
  text-align: center;
  font-size: 1.3rem;
  margin: 0.2rem 0;
  line-height: 1.3;
}

.contact-info {
  font-weight: bold;
}

.icon {
  width: 25px;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.footer-link {
  color: inherit;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.nube-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 300%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  display: flex;
}

.nube {
  width: 100%;
  height: 100%;
  animation: moverNubesFooter 40s linear infinite;
}

@keyframes moverNubesFooter {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@media (max-width: 768px) {
  .col-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}

.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000e;
  z-index: 9999;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.showcase-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #111;
  padding: 1rem 2rem;
  border-bottom: 1px solid #333;
  text-align: center;
  position: relative;
}

.showcase-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: white;
  font-family: 'Marvin', sans-serif;
}

.close-btn {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;
  color: white;
  cursor: pointer;
}

.showcase-scroll {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
}

.showcase-item {
  width: 100%;
  display: flex;
  justify-content: center;
}

.showcase-img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
}

.showcase-video {
  width: 90%;
  height: 60vh;
  border: none;
  border-radius: 12px;
}

.card-body {
  text-align: center;
}

.titulo-centrado {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 20px;
}

.titulo-centrado h1 {
  margin: 0;
  font-size: 42px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  gap: 0.5rem;
}

.mt-important {
  margin-top: 1rem !important;
}

.qr-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.5rem;
  background: none;
  padding: 0;
  border-radius: 0;
  font-family: 'Marvin', sans-serif;
  color: white;
  max-width: 35%;
}

.qr-banner img {
  width: 50%;
}

.qr-banner p {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2rem;
  color: white;
  font-family: 'Stropica', sans-serif;
}

.qr-banner .highlight {
  color: #FFD700;
  font-weight: bold;
  font-size: 1.5rem;
  font-size: 2.5rem;
}

.desktop-footer {
  display: none;
}

@media (max-width: 767.98px) {
  .footer.desktop-footer {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .footer.d-md-none {
    display: none !important;
  }
}

.footer.desktop-footer {
  background-image: url('img/desktop/web footer.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  height: 770px;
  z-index: 1;
}

.footer.desktop-footer .contact-title h2 {
  font-size: 2.5rem;
  letter-spacing: 2px;
}

.footer.desktop-footer .icon {
  width: 24px;
  height: 24px;
}
