/* ====================================================================================================================================================
    Header
   ==================================================================================================================================================== */

.hero.custom-hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 100px;
  background: radial-gradient(circle at center, --primary-header-color, --secondary-header-color);
} 

.hero .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.hero-content {
    text-align: center; 
    flex: 1;
    animation: fadeInUp 1s ease;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-buttons {
    justify-content: center;
    margin: 0 auto 30px; 
    display: flex;
    gap: 20px;
}

.hero-image {
    flex: 1;
    position: relative;
    animation: fadeInRight 1s ease;
}

/* Estilos para los botones */

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

 /* Hero fondo de la lluvia Header */
 
.hero.custom-hero .container {
  position: relative;
  z-index: 2; 
}

/* Capa animada de partículas de lluvia */

.hero.custom-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(ellipse 1.5px 2px at 1.5px 50%, var(--primary-color, #09f) 0%, transparent 90%),
    radial-gradient(ellipse 1.5px 2px at 50% 150%, var(--primary-color, #09f) 0%, transparent 90%);
  background-size: 25px 8px, 25px 8px;
  background-repeat: repeat;
  animation: rain 100s linear infinite;
  opacity: 0.3;
}

/* ====================================================================================================================================================
    Carta de perfil animada del Hero Section
   ==================================================================================================================================================== */

   /* Envoltorio y borde de la carta */

.card-wrapper {
  position: relative;
  display: inline-block;
}

.pulse-rect {
  position: absolute;
  inset: 0;
  border: 3px solid var(--primary-color);
  border-radius: 20px;
  animation: pulseRect 3s ease-in-out infinite;
  z-index: 1;
}

/* Tarjeta */

.profile-card {
  position: relative;
  width: 280px;
  background-color: var(--card-bg);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.4s ease;
}
.profile-card:hover {
  transform: translateY(-8px);
}

/* Foto grande de la carta */

.profile-card .img-large {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 2;
}
.card-wrapper:hover .img-large {
  opacity: 1;
}

/* banner de la carta */

.profile-card .banner {
  height: 120px;
  background-color: var(--secondary-color);
  background-image:
    linear-gradient(60deg,  rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(-60deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(0deg,   rgba(255,255,255,0.1) 50%, transparent 50%);
  background-size: 20px 34.64px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transition: opacity var(--transition);
}

/* avatar pequeño */

.profile-card .image-container {
  width: 100px;
  height: 100px;
  margin: -50px auto 10px;
  transition: opacity var(--transition);
}
.profile-card .img-small {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: opacity 0.6s ease;
}
.card-wrapper:hover .img-small {
  opacity: 0;
}

/* texto de la carta */

.profile-card .text-info {
  text-align: center;
  padding: 0 15px 15px;
  transition: opacity var(--transition);
}
.card-wrapper:hover .text-info {
  opacity: 0;
}

/* botones sociales para la carta */

.profile-card .social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 15px 0 20px;
  background-color: var(--bg-secondary);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  position: relative;
}

/* Estado de hover automático */

.card-wrapper.auto-hover .img-large {
  opacity: 1;
}
.card-wrapper.auto-hover .img-small {
  opacity: 0;
}
.card-wrapper.auto-hover .text-info {
  opacity: 0;
}
.card-wrapper.auto-hover .profile-card {
  transform: translateY(-8px);
}

/* ====================================================================================================================================================
     Titulos animados del Hero Section
   ==================================================================================================================================================== */

/* Linea del titulo */

.title-line {
    display: block;
    text-align: center;
}

/* Texto de presentacion Modo maquina de escribir */

.typing {
    font-style: italic;
    color: var(--secondary-color);
    border-right: 3px solid;
     margin: 0 auto; 
    width: 20ch;
    white-space: nowrap;
    overflow: hidden;
    animation: typing 2s steps(22), blink 0.5s step-end infinite alternate;
    position: relative;
    z-index: 2;
}

/* Estilos para el título animado (Header) */

.animated-title {
    position: relative;
    margin-bottom: 30px;
}

.animated-title h2 {
    margin: 0;
    padding: 0;
    font-size: 3.5em;
    color: transparent;
    text-transform: uppercase;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.animated-title h2 span:nth-child(1) {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--text-color);
    transition: 0.5s;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    overflow: hidden;
}

.animated-title h2:hover span:nth-child(1) {
    transform: translateY(-10px);
}

.animated-title h2 span:nth-child(2) {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--text-color);
    transition: 0.5s;
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
    overflow: hidden;
}

.animated-title h2:hover span:nth-child(2) {
    transform: translateY(10px);
}

.animated-title h2 span:nth-child(3) {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%) scaleY(0);
    width: 100%;
    color: var(--secondary-color);
    background: var(--bg-color);
    font-size: 0.3em;
    font-weight: 500;
    letter-spacing: 0.5em;
    text-align: center;
    padding-left: 15px;
    transition: 0.5s;
    text-transform: uppercase;
}

.animated-title h2:hover span:nth-child(3) {
    transform: translateY(-50%) scaleY(1);
}

/* ====================================================================================================================================================
    Subtitulo del Hero Section
   ==================================================================================================================================================== */

.animated-title .subtitle-role {
  font-size: 1.5rem;
  font-weight: 500;
  color: #C3BBFF;
}

.animated-title .subtitle-tagline {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-light);
}

/* ====================================================================================================================================================
    Animaciones
   ==================================================================================================================================================== */


/* Animacion para hero (UP) */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animacion para hero (RIGHT) */

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animación de movimiento del fondo (header)*/

@keyframes rain {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 5000px, 0 5000px; }
}

/* Animacion de pulso (header) */

@keyframes pulseRect {
  0%,100% { transform: scale(1.2);   opacity: 1; }
  50%     { transform: scale(1.05); opacity: 0.7; }
}

/* Animacion de maquina de escribir */

@keyframes typing {
    from {
        width: 0;
    }
}

/* Animacion de borde para maquina de escribir */

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