/**
 * Estilos Públicos del Sitio
 * Foro de las Estrellas de Aguascalientes
 */

/* Variables CSS */
:root {
    --primary-color: #1a1a2e;
    --secondary-color: #e94560;
    --accent-color: #16213e;
    --light-color: #f8f9fa;
    --dark-color: #0f0f0f;
    --text-color: #333333;
    --text-muted: #6c757d;
    --glow-color: rgba(233, 69, 96, 0.5);
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   ANIMACIONES KEYFRAMES
   ========================================== */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color);
    }
    50% {
        box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar-dark.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%) !important;
    transition: all 0.4s ease;
}

.navbar-dark.bg-primary.scrolled {
    background: rgba(26, 26, 46, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    animation: fadeInLeft 0.6s ease;
}

.navbar-brand i {
    color: var(--secondary-color);
    animation: pulse 2s ease-in-out infinite;
}

.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-item {
    animation: fadeInDown 0.5s ease forwards;
    opacity: 0;
}

.navbar-nav .nav-item:nth-child(1) { animation-delay: 0.1s; }
.navbar-nav .nav-item:nth-child(2) { animation-delay: 0.2s; }
.navbar-nav .nav-item:nth-child(3) { animation-delay: 0.3s; }

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    background: linear-gradient(-45deg, var(--primary-color), var(--accent-color), #0f3460, var(--primary-color));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='1' fill='%23fff' fill-opacity='0.1'/%3E%3C/svg%3E") repeat;
    background-size: 50px 50px;
    opacity: 0.5;
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    animation: fadeInUp 0.8s ease;
}

.hero-section p {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-section .btn {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-section .btn:hover {
    animation: pulse 0.5s ease;
    box-shadow: 0 5px 25px rgba(255, 255, 255, 0.3);
}

.hero-section i.bi-stars {
    animation: twinkle 1.5s ease-in-out infinite;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%) !important;
}

/* ==========================================
   CARDS DE ARTISTAS
   ========================================== */
.artist-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    position: relative;
}

.artist-card:nth-child(1) { animation-delay: 0.1s; }
.artist-card:nth-child(2) { animation-delay: 0.2s; }
.artist-card:nth-child(3) { animation-delay: 0.3s; }
.artist-card:nth-child(4) { animation-delay: 0.4s; }
.artist-card:nth-child(5) { animation-delay: 0.5s; }
.artist-card:nth-child(6) { animation-delay: 0.6s; }

.artist-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: 1;
}

.artist-card:hover::before {
    left: 100%;
}

.artist-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
}

.artist-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.artist-card:hover .card-img-top {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.artist-card .card-body {
    transition: all 0.3s ease;
}

.artist-card:hover .card-body {
    background: linear-gradient(to top, rgba(233, 69, 96, 0.05), transparent);
}

.artist-card .card-title a {
    transition: all 0.3s ease;
    position: relative;
}

.artist-card .card-title a:hover {
    color: var(--secondary-color) !important;
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.3);
}

.artist-card .badge {
    transition: all 0.3s ease;
}

.artist-card:hover .badge {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   CARDS DE NOTICIAS
   ========================================== */
.news-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.15s; }
.news-card:nth-child(3) { animation-delay: 0.2s; }
.news-card:nth-child(4) { animation-delay: 0.25s; }

.news-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.news-card .card-title a {
    transition: all 0.3s ease;
    background: linear-gradient(to right, var(--secondary-color), var(--secondary-color)) no-repeat left bottom;
    background-size: 0% 2px;
}

.news-card .card-title a:hover {
    color: var(--secondary-color) !important;
    background-size: 100% 2px;
}

/* ==========================================
   BADGES Y TAGS
   ========================================== */
.event-date .badge {
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.badge.bg-warning {
    animation: pulse 2s ease-in-out infinite;
}

.price-tag {
    font-size: 1rem;
    transition: all 0.3s ease;
}

.price-tag:hover {
    transform: scale(1.05);
    color: var(--secondary-color);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), #ff6b6b, var(--secondary-color));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.footer-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color) !important;
    transform: translateX(10px);
}

.footer-links a:hover::before {
    opacity: 1;
    left: -15px;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
}

.footer-location {
    color: rgba(255, 255, 255, 0.7);
}

.footer-location i {
    color: var(--secondary-color);
}

.social-links .btn {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-links .btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white !important;
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 10px 20px rgba(233, 69, 96, 0.4);
}

/* ==========================================
   PAGINACIÓN
   ========================================== */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    animation: scaleIn 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--light-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   BREADCRUMB
   ========================================== */
.breadcrumb {
    animation: fadeInLeft 0.5s ease;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.breadcrumb-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.breadcrumb-item a:hover::after {
    width: 100%;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(26, 26, 46, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(26, 26, 46, 0.2);
}

.btn-danger {
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.4);
    animation: shake 0.5s ease;
}

.btn-success {
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(25, 135, 84, 0.4);
}

.btn-lg {
    transition: all 0.4s ease;
}

.btn-lg:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Espacios AdSense */
.adsense-container {
    padding: 10px 0;
    text-align: center;
    min-height: 50px;
}

.adsense-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.adsense-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.adsense-sidebar {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.adsense-article {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

/* ==========================================
   CONTENIDO DE ARTÍCULOS
   ========================================== */
.content-text,
.news-content {
    font-size: 1.1rem;
    line-height: 1.8;
    animation: fadeInUp 0.6s ease;
}

.content-text p,
.news-content p {
    margin-bottom: 1.2rem;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.content-text p:nth-child(1) { animation-delay: 0.1s; }
.content-text p:nth-child(2) { animation-delay: 0.2s; }
.content-text p:nth-child(3) { animation-delay: 0.3s; }
.content-text p:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================
   SHARE BUTTONS
   ========================================== */
.share-section {
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

.share-section .btn {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.share-section .btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.share-section .btn:nth-child(1):hover { background-color: #1877f2 !important; border-color: #1877f2 !important; }
.share-section .btn:nth-child(2):hover { background-color: #1da1f2 !important; border-color: #1da1f2 !important; }
.share-section .btn:nth-child(3):hover { background-color: #25d366 !important; border-color: #25d366 !important; }

/* ==========================================
   SECTION HEADERS
   ========================================== */
.section-header {
    border-left: 4px solid var(--secondary-color);
    padding-left: 15px;
    animation: fadeInLeft 0.6s ease;
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 4px;
    height: 0;
    background: var(--secondary-color);
    animation: growHeight 0.6s ease 0.3s forwards;
}

@keyframes growHeight {
    to { height: 100%; }
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar .card {
    animation: fadeInRight 0.6s ease forwards;
    opacity: 0;
}

.sidebar .card:nth-child(1) { animation-delay: 0.2s; }
.sidebar .card:nth-child(2) { animation-delay: 0.3s; }
.sidebar .card:nth-child(3) { animation-delay: 0.4s; }

.sidebar .list-group-item {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar .list-group-item:hover {
    background: rgba(233, 69, 96, 0.05);
    border-left-color: var(--secondary-color);
    transform: translateX(5px);
}

.sidebar .list-group-item a {
    transition: all 0.3s ease;
}

.sidebar .list-group-item:hover a {
    color: var(--secondary-color) !important;
}

/* ==========================================
   IMAGEN PLACEHOLDER
   ========================================== */
.image-placeholder {
    position: relative;
    overflow: hidden;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
}

/* ==========================================
   PAGE HEADERS
   ========================================== */
.bg-gradient-primary h1,
.bg-gradient-primary .display-4 {
    animation: fadeInUp 0.8s ease;
}

.bg-gradient-primary p {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

/* ==========================================
   INFORMACIÓN DE ARTISTA
   ========================================== */
.artist-info-card {
    animation: fadeInLeft 0.6s ease;
}

.artist-info-card .list-group-item {
    transition: all 0.3s ease;
}

.artist-info-card .list-group-item:hover {
    background: rgba(233, 69, 96, 0.05);
}

.artist-info-card .btn-danger {
    animation: glow 2s ease-in-out infinite;
}

/* ==========================================
   LISTA DE ELEMENTOS ANIMADOS
   ========================================== */
.row > [class*="col-"] {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.row > [class*="col-"]:nth-child(1) { animation-delay: 0.05s; }
.row > [class*="col-"]:nth-child(2) { animation-delay: 0.1s; }
.row > [class*="col-"]:nth-child(3) { animation-delay: 0.15s; }
.row > [class*="col-"]:nth-child(4) { animation-delay: 0.2s; }
.row > [class*="col-"]:nth-child(5) { animation-delay: 0.25s; }
.row > [class*="col-"]:nth-child(6) { animation-delay: 0.3s; }

/* ==========================================
   ICONOS ANIMADOS
   ========================================== */
.bi {
    transition: all 0.3s ease;
}

a:hover .bi,
button:hover .bi {
    transform: scale(1.1);
}

.bi-calendar-event,
.bi-clock,
.bi-geo-alt {
    animation: pulse 2s ease-in-out infinite;
}

/* ==========================================
   CARD HOVER EFFECTS
   ========================================== */
.card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   LINK ANIMATIONS
   ========================================== */
a:not(.btn):not(.nav-link):not(.navbar-brand):not(.footer-links a) {
    transition: all 0.3s ease;
}

a:not(.btn):not(.nav-link):not(.navbar-brand):not(.footer-links a):hover {
    color: var(--secondary-color);
}

/* ==========================================
   SCROLL ANIMATIONS - FADE IN
   ========================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-down {
    opacity: 0;
    transform: translateY(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-down.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
}

/* Staggered delays for children */
.stagger-children > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .artist-card .card-img-top {
        height: 180px;
    }
    
    .navbar-brand span {
        font-size: 1rem;
    }
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Utility classes */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
