/**
 * Hero Slider Styles
 * Swiper.js + Transparent Header
 * 
 * @package Azulejos
 */

/* ============================================================================
   TRANSPARENT HEADER (Solo en Home)
   ============================================================================ */

/* Header por defecto (transparente en home) */
.has-transparent-header .site-header,
.has-transparent-header .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    height: 80px;
}

/* Logo blanco en header transparente */
.has-transparent-header .site-header .navbar-brand,
.has-transparent-header .navbar .navbar-brand {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

/* Links del menú blancos en header transparente */
.has-transparent-header .navbar-nav .nav-link {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Hover en links blancos */
.has-transparent-header .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Header al hacer scroll (con fondo) */
.has-transparent-header .site-header.scrolled,
.has-transparent-header .navbar.scrolled {
    background: var(--gradient-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Logo vuelve a color original al hacer scroll */
.has-transparent-header .site-header.scrolled .navbar-brand,
.has-transparent-header .navbar.scrolled .navbar-brand {
    filter: none;
}

/* Links del menú vuelven a color original */
.has-transparent-header .navbar.scrolled .navbar-nav .nav-link {
    color: #ffffff !important;
    text-shadow: none;
}

/* Mobile menu button blanco en header transparente */
.has-transparent-header .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.has-transparent-header .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.has-transparent-header .navbar.scrolled .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.has-transparent-header .navbar.scrolled .navbar-toggler-icon {
    filter: none;
}

/* Ajuste de padding-top para compensar header fixed */
.has-transparent-header #main {
    padding-top: 0;
}

/* Header en páginas internas (no transparente) */
.site-header,
.navbar {
    background: var(--gradient-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 90vh;
    overflow: hidden;
}

/* En mobile, full height */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
    }
}

/* ============================================================================
   SWIPER CONTAINER
   ============================================================================ */

.hero-swiper {
    width: 100%;
    height: 90vh;
    min-height: 600px;
}

@media (max-width: 768px) {
    .hero-swiper {
        height: 100vh;
        min-height: 100vh;
    }
}

.hero-swiper .swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

/* ============================================================================
   BACKGROUND IMAGES
   ============================================================================ */

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0 0 0 20%;
}

/* Mostrar imagen desktop por defecto */
.hero-slide-bg.mobile {
    display: none;
}

/* En mobile, mostrar imagen mobile */
@media (max-width: 768px) {
    .hero-slide-bg.desktop {
        display: none;
    }
    
    .hero-slide-bg.mobile {
        display: block;
    }
}

/* ============================================================================
   OVERLAY
   ============================================================================ */

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0, 69, 92, 0.45) 0%,
        rgba(1, 121, 161, 0.25) 50%,
        rgba(0, 69, 92, 0.35) 100%
    );
    z-index: 1;
    border-radius: 0 0 0 20%;
}

@media (max-width: 768px) {
    .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 69, 92, 0.3) 0%,
            rgba(1, 121, 161, 0.4) 100%
        );
    }
}

/* ============================================================================
   CONTENT
   ============================================================================ */

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    padding: 0 var(--spacing-md);
    text-align: left;
    color: #ffffff;
}

@media (max-width: 768px) {
    .hero-content {
        padding: 0 var(--spacing-sm);
    }
}

/* ============================================================================
   TITLE
   ============================================================================ */

.hero-title {
    font-family: var(--font-secondary);
    font-size: 4rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    
    /* Animación */
    opacity: 0;
    transform: translateY(30px);
}

.swiper-slide-active .hero-title {
    animation: slideUpFadeIn 0.8s ease forwards;
    animation-delay: 0.2s;
}

@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* ============================================================================
   DESCRIPTION
   ============================================================================ */

.hero-description {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    color: #ffffff;
    max-width: 600px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
    
    /* Animación */
    opacity: 0;
    transform: translateY(30px);
}

.swiper-slide-active .hero-description {
    animation: slideUpFadeIn 0.8s ease forwards;
    animation-delay: 0.4s;
}

@media (max-width: 768px) {
    .hero-description {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .hero-description {
        font-size: 1rem;
    }
}

/* ============================================================================
   CTA BUTTON
   ============================================================================ */

.hero-cta {
    display: inline-block;
    padding: 16px 40px;
    background: var(--gradient-primary);
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 69, 92, 0.4);
    
    /* Animación */
    opacity: 0;
    transform: translateY(30px);
}

.swiper-slide-active .hero-cta {
    animation: slideUpFadeIn 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-cta:hover {
    background: var(--gradient-primary-hover);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 69, 92, 0.6);
}

@media (max-width: 768px) {
    .hero-cta {
        padding: 14px 32px;
        font-size: 1rem;
    }
}

/* ============================================================================
   SWIPER NAVIGATION
   ============================================================================ */

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: #ffffff;
    background: rgba(0, 69, 92, 0.6);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after {
    font-size: 20px;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(0, 69, 92, 0.9);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .hero-swiper .swiper-button-next::after,
    .hero-swiper .swiper-button-prev::after {
        font-size: 16px;
    }
}

/* ============================================================================
   SWIPER PAGINATION
   ============================================================================ */

.hero-swiper .swiper-pagination {
    bottom: 30px;
}

.hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    opacity: 0.5;
    transition: all var(--transition-normal);
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--gradient-primary);
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .hero-swiper .swiper-pagination {
        bottom: 20px;
    }
    
    .hero-swiper .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   SINGLE SLIDE (Sin navegación ni bullets)
   ============================================================================ */

.hero-swiper.single-slide .swiper-button-next,
.hero-swiper.single-slide .swiper-button-prev,
.hero-swiper.single-slide .swiper-pagination {
    display: none;
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.hero-section.loading {
    background: var(--gradient-primary);
}

.hero-section.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}