/* =========================================
   HERO.CSS - Carrusel Hero Fullscreen
   Projecte Share Theme
========================================= */

.carrusel-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--pshare-dark, #1E2022);
}

/* =========================================
   SLIDES
========================================= */
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.activo {
    opacity: 1;
    z-index: 10;
}

/* Slide image */
.slide img.slide-image,
.slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 8s linear;
}

.slide.activo img.slide-image,
.slide.activo > img {
    transform: scale(1);
}

/* Ken Burns effect */
.carrusel-hero[data-animation="kenburns"] .slide img.slide-image {
    animation: none;
}

.carrusel-hero[data-animation="kenburns"] .slide.activo img.slide-image {
    animation: kenburns 8s ease-out forwards;
}

@keyframes kenburns {
    0% { transform: scale(1.15) translate(0, 0); }
    100% { transform: scale(1) translate(-1%, -1%); }
}

/* Zoom animation */
.carrusel-hero[data-animation="zoom"] .slide {
    transition: opacity 0.8s ease;
}

.carrusel-hero[data-animation="zoom"] .slide img.slide-image {
    transition: transform 0.8s ease;
    transform: scale(1.3);
}

.carrusel-hero[data-animation="zoom"] .slide.activo img.slide-image {
    transform: scale(1);
}

/* Slide animation */
.carrusel-hero[data-animation="slide"] .slide {
    opacity: 1;
    transform: translateX(100%);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.carrusel-hero[data-animation="slide"] .slide.activo {
    transform: translateX(0);
}

.carrusel-hero[data-animation="slide"] .slide.slide-exit {
    transform: translateX(-100%);
}

/* Overlay */
.slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
}

/* Gradient bottom */
.slide-bg-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
    z-index: 6;
}

/* =========================================
   SLIDE CONTENT
========================================= */
.slide-contenido {
    text-align: center;
    color: #ffffff;
    z-index: 20;
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    padding: 0 20px;
    max-width: 900px;
}

.slide.activo .slide-contenido {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animations */
.slide-contenido > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.activo .slide-contenido > h2 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.slide.activo .slide-contenido > p {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.slide.activo .slide-contenido > a {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.8s;
}

/* Text animations */
.slide-contenido[data-animation="fade-up"] {
    transform: translateY(40px);
}

.slide-contenido[data-animation="fade-down"] {
    transform: translateY(-40px);
}

.slide-contenido[data-animation="fade-left"] {
    transform: translateX(-40px);
}

.slide-contenido[data-animation="fade-right"] {
    transform: translateX(40px);
}

.slide-contenido[data-animation="zoom-in"] {
    transform: scale(0.8);
}

.slide-contenido[data-animation="zoom-out"] {
    transform: scale(1.2);
}

.slide-contenido[data-animation="flip"] {
    transform: perspective(600px) rotateX(20deg);
}

.slide.activo .slide-contenido[data-animation="fade-up"],
.slide.activo .slide-contenido[data-animation="fade-down"],
.slide.activo .slide-contenido[data-animation="fade-left"],
.slide.activo .slide-contenido[data-animation="fade-right"],
.slide.activo .slide-contenido[data-animation="zoom-in"],
.slide.activo .slide-contenido[data-animation="zoom-out"],
.slide.activo .slide-contenido[data-animation="flip"] {
    transform: translateY(0) translateX(0) scale(1) rotateX(0);
}

/* Title */
.slide-contenido h2 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
    margin-bottom: 15px;
    letter-spacing: -1px;
}

/* Subtitle */
.slide-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Button */
.slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: var(--pshare-primary, #E32219);
    color: #ffffff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(227, 34, 25, 0.4);
}

.slide-btn:hover {
    background: #ffffff;
    color: var(--pshare-primary, #E32219);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

/* =========================================
   CAROUSEL CONTROLS
========================================= */
.carousel-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 20px;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--pshare-primary, #E32219);
    border-color: var(--pshare-primary, #E32219);
    transform: scale(1.1);
}

/* Dots */
.carousel-dots {
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: var(--pshare-primary, #E32219);
    border-color: var(--pshare-primary, #E32219);
    transform: scale(1.3);
}

.carousel-dot:hover {
    border-color: #ffffff;
}

/* Progress bar */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 30;
}

.carousel-progress-bar {
    height: 100%;
    background: var(--pshare-primary, #E32219);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* =========================================
   PARALLAX EFFECT
========================================= */
.carrusel-hero[data-parallax="true"] .slide img.slide-image {
    will-change: transform;
}
