﻿/* Estilos específicos para la página Home */
.home-root {
    min-height: 100vh;
    background: #f3f6fb;
    color: #1f2937;
    width: 100%;
}

    .home-root * {
        box-sizing: border-box;
    }

    .home-root .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }

    /* Header */
    .home-root .header {
        background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
        padding: 20px 0;
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
        position: fixed; /* Cambiado de sticky a fixed */
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        width: 100%;
        transform: none !important; /* Previene cualquier transformación */
    }

    .home-root .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .home-root .logo {
        font-size: 2rem;
        font-weight: 700;
        color: white;
        text-decoration: none;
        background: linear-gradient(45deg, #ffffff, #f0f9ff, #dbeafe);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        animation: logoShimmer 3s ease-in-out infinite;
    }

@keyframes logoShimmer {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.home-root .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.home-root .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #059669, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .home-root .user-avatar:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    }

.home-root .logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

    .home-root .logout-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

/* Main Content */
.home-root .main-content {
    padding: 40px 0;
    min-height: calc(100vh - 80px);
    margin-top: 80px; /* Añade este margen para el header fijo */
}
/* Welcome Section */
.home-root .welcome-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

    .home-root .welcome-section::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
        animation: pulse 4s ease-in-out infinite;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

.home-root .welcome-content {
    position: relative;
    z-index: 1;
}

.home-root .welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 15px;
    animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.home-root .welcome-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 10px;
    animation: slideInLeft 1s ease-out 0.2s both;
}

.home-root .welcome-time {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: 500;
    animation: slideInLeft 1s ease-out 0.4s both;
}

/* Stats Cards */
.home-root .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.home-root .stat-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .home-root .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #1e3a8a, #2563eb, #059669);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .home-root .stat-card:hover::before {
        transform: scaleX(1);
    }

    .home-root .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    }

.home-root .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.home-root .stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.home-root .stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(45deg, #1e3a8a, #2563eb);
    color: white;
}

.home-root .stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(45deg, #059669, #10b981);
    color: white;
}

.home-root .stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(45deg, #f59e0b, #f97316);
    color: white;
}

.home-root .stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(45deg, #dc2626, #ef4444);
    color: white;
}

.home-root .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 5px;
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-root .stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Action Buttons */
.home-root .actions-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 40px;
}

.home-root .actions-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 30px;
    text-align: center;
}

.home-root .actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.home-root .action-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 35px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .home-root .action-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
        transition: left 0.6s ease;
    }

    .home-root .action-card:hover::before {
        left: 100%;
    }

    .home-root .action-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
        border-color: #2563eb;
    }

    .home-root .action-card.primary {
        background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
        color: white;
    }

        .home-root .action-card.primary:hover {
            background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
            border-color: #60a5fa;
        }

    .home-root .action-card.secondary {
        background: linear-gradient(135deg, #059669 0%, #10b981 100%);
        color: white;
    }

        .home-root .action-card.secondary:hover {
            background: linear-gradient(135deg, #047857 0%, #059669 100%);
            border-color: #34d399;
        }

.home-root .action-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.home-root .action-card:hover .action-icon {
    animation: none;
    transform: scale(1.2);
}

.home-root .action-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.home-root .action-description {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

.home-root .action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: inherit;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.home-root .action-card:not(.primary):not(.secondary) .action-btn {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.home-root .action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Quick Stats */
.home-root .quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.home-root .quick-stat {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

    .home-root .quick-stat:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }

.home-root .quick-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 5px;
}

.home-root .quick-stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .home-root .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .home-root .welcome-title {
        font-size: 2rem;
    }

    .home-root .actions-grid {
        grid-template-columns: 1fr;
    }

    .home-root .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Loading animation */
.home-root .loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}


/* Carousel Styles */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.carousel-wrapper {
    overflow: hidden;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

    .carousel-slide.active {
        opacity: 1;
    }

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

    .carousel-nav:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.1);
    }

    .carousel-nav.prev {
        left: -25px;
    }

    .carousel-nav.next {
        right: -25px;
    }

    .carousel-nav:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .indicator.active {
        background: #007bff;
        transform: scale(1.2);
    }

    .indicator:hover {
        background: #007bff;
        opacity: 0.8;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

        .carousel-nav.prev {
            left: -20px;
        }

        .carousel-nav.next {
            right: -20px;
        }
}
