/* Estilos mejorados para el blog - Paleta Hipertrofit */

/* Variables de colores */
:root {
    --hipertrofit-black: #1a1a1a;
    --hipertrofit-green: #92ff64;
    --hipertrofit-green-alt: #7DFF61;
    --hipertrofit-white: #ffffff;
    --hipertrofit-gray: #333333;
    --hipertrofit-light-gray: #666666;
}

/* Contenedor principal del blog */
.blog-container {
    background-color: var(--hipertrofit-gray) !important;
    color: var(--hipertrofit-white);
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--hipertrofit-black) 0%, var(--hipertrofit-gray) 100%);
    color: var(--hipertrofit-white) !important;
}

.hero-title {
    color: var(--hipertrofit-white) !important;
    text-shadow: 0 0 20px rgba(146, 255, 100, 0.3);
}

.hero-subtitle {
    color: var(--hipertrofit-white) !important;
}

/* Tarjetas de filtros */
.card {
    background-color: var(--hipertrofit-black) !important;
    border: 1px solid var(--hipertrofit-gray) !important;
    color: var(--hipertrofit-white) !important;
}

.card-body {
    background-color: var(--hipertrofit-black) !important;
    color: var(--hipertrofit-white) !important;
}

/* Labels de formularios */
.form-label {
    color: var(--hipertrofit-white) !important;
    font-weight: 500;
}

/* Inputs y selects */
.form-control,
.form-select {
    background-color: var(--hipertrofit-gray) !important;
    border: 2px solid var(--hipertrofit-light-gray) !important;
    color: var(--hipertrofit-white) !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--hipertrofit-gray) !important;
    border-color: var(--hipertrofit-green) !important;
    color: var(--hipertrofit-white) !important;
    box-shadow: 0 0 0 0.2rem rgba(146, 255, 100, 0.25) !important;
}

.form-control::placeholder {
    color: #999 !important;
}

.form-select option {
    background-color: var(--hipertrofit-gray) !important;
    color: var(--hipertrofit-white) !important;
}

/* Botones principales */
.btn-primary {
    background: linear-gradient(135deg, var(--hipertrofit-green) 0%, var(--hipertrofit-green-alt) 100%) !important;
    border: none !important;
    color: var(--hipertrofit-black) !important;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::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: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--hipertrofit-green-alt) 0%, var(--hipertrofit-green) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(146, 255, 100, 0.3);
    color: var(--hipertrofit-black) !important;
}

/* Botones secundarios */
.btn-outline-secondary {
    background-color: transparent !important;
    border: 2px solid var(--hipertrofit-light-gray) !important;
    color: var(--hipertrofit-white) !important;
}

.btn-outline-secondary:hover {
    background-color: var(--hipertrofit-light-gray) !important;
    border-color: var(--hipertrofit-light-gray) !important;
    color: var(--hipertrofit-white) !important;
}

/* Contador de resultados */
.results-counter,
h5.mb-0.text-white {
    background: linear-gradient(135deg, var(--hipertrofit-black) 0%, var(--hipertrofit-gray) 100%) !important;
    color: var(--hipertrofit-white) !important;
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid var(--hipertrofit-green) !important;
}

/* Botones de vista (Grid/Lista) */
.btn-group .btn {
    border: 2px solid var(--hipertrofit-green) !important;
    color: var(--hipertrofit-green) !important;
    background: transparent !important;
    transition: all 0.3s ease;
}

.btn-group .btn:hover {
    background: var(--hipertrofit-green) !important;
    color: var(--hipertrofit-black) !important;
    transform: translateY(-2px);
}

.btn-group .btn.active {
    background: linear-gradient(135deg, var(--hipertrofit-green) 0%, var(--hipertrofit-green-alt) 100%) !important;
    color: var(--hipertrofit-black) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(146, 255, 100, 0.3);
}

/* Tarjetas de blog */
.blog-card {
    background-color: var(--hipertrofit-black) !important;
    border: 1px solid var(--hipertrofit-gray) !important;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--hipertrofit-white) !important;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(146, 255, 100, 0.15);
    border-color: var(--hipertrofit-green);
}

.blog-card .card-body {
    background-color: var(--hipertrofit-black) !important;
    color: var(--hipertrofit-white) !important;
}

/* Efectos de imagen */
.card-img-top {
    transition: transform 0.5s ease-in-out;
}

.blog-card:hover .card-img-top {
    transform: scale(1.08);
}

/* Categorías */
.card-category {
    background: linear-gradient(135deg, var(--hipertrofit-green) 0%, var(--hipertrofit-green-alt) 100%) !important;
    color: var(--hipertrofit-black) !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-radius: 20px;
    padding: 5px 12px;
}

/* Fechas */
.post-date {
    background: rgba(26, 26, 26, 0.9) !important;
    color: var(--hipertrofit-white) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(146, 255, 100, 0.3);
    font-weight: 500;
    border-radius: 4px;
    padding: 4px 8px;
}

/* Títulos de artículos */
.card-title a {
    color: var(--hipertrofit-white) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.card-title a:hover {
    color: var(--hipertrofit-green) !important;
    text-shadow: 0 0 10px rgba(146, 255, 100, 0.3);
    transform: translateX(5px);
}

/* Texto del contenido */
.card-text {
    color: #ccc !important;
    line-height: 1.6;
}

/* Tags */
.tags .badge {
    background: linear-gradient(135deg, var(--hipertrofit-gray) 0%, var(--hipertrofit-light-gray) 100%) !important;
    border: 1px solid var(--hipertrofit-green);
    color: var(--hipertrofit-white) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tags .badge:hover {
    background: linear-gradient(135deg, var(--hipertrofit-green) 0%, var(--hipertrofit-green-alt) 100%) !important;
    color: var(--hipertrofit-black) !important;
    transform: translateY(-2px);
}

.badge.bg-secondary {
    background: var(--hipertrofit-light-gray) !important;
    color: var(--hipertrofit-white) !important;
}

/* Información del autor */
.author-info {
    color: #ccc !important;
    font-size: 0.9rem;
}

.author-name {
    color: var(--hipertrofit-green) !important;
}

/* Paginación */
.pagination .page-link {
    background-color: var(--hipertrofit-black) !important;
    border: 1px solid var(--hipertrofit-gray) !important;
    color: var(--hipertrofit-white) !important;
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--hipertrofit-green) 0%, var(--hipertrofit-green-alt) 100%) !important;
    border-color: var(--hipertrofit-green) !important;
    color: var(--hipertrofit-black) !important;
    transform: scale(1.1);
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, var(--hipertrofit-green-alt) 0%, var(--hipertrofit-green) 100%) !important;
    border-color: var(--hipertrofit-green) !important;
    color: var(--hipertrofit-black) !important;
    transform: translateY(-2px);
}

.pagination .page-item.disabled .page-link {
    background-color: var(--hipertrofit-gray) !important;
    border-color: var(--hipertrofit-gray) !important;
    color: var(--hipertrofit-light-gray) !important;
}

/* Estado vacío */
.empty-state {
    background: linear-gradient(135deg, var(--hipertrofit-black) 0%, var(--hipertrofit-gray) 100%) !important;
    border: 1px solid var(--hipertrofit-gray);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    color: var(--hipertrofit-white) !important;
}

.empty-state i {
    color: var(--hipertrofit-green) !important;
}

.empty-state h4 {
    color: var(--hipertrofit-white) !important;
}

.empty-state p {
    color: #ccc !important;
}

/* Botón de filtros avanzados */
.btn-link {
    color: var(--hipertrofit-green) !important;
    text-decoration: none;
}

.btn-link:hover {
    color: var(--hipertrofit-green-alt) !important;
    text-shadow: 0 0 10px rgba(146, 255, 100, 0.3);
}

/* Vista de lista */
.post-item.list-view .blog-card {
    flex-direction: row;
    height: auto;
}

.post-item.list-view .card-img-top-wrapper {
    flex: 0 0 300px;
    height: 200px;
}

.post-item.list-view .card-body {
    flex: 1;
    padding: 1.5rem;
    background-color: var(--hipertrofit-black) !important;
}

.post-item.list-view .card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.post-item.list-view .card-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #ccc !important;
}

.post-item.list-view .btn {
    align-self: flex-start;
    width: auto;
    padding: 0.5rem 1.5rem;
}

/* Animaciones */
.post-item {
    animation: fadeInUp 0.6s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--hipertrofit-gray);
    border-top: 3px solid var(--hipertrofit-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Estados de carga */
.search-loading,
.filter-loading,
.pagination-loading {
    background: linear-gradient(135deg, var(--hipertrofit-black) 0%, var(--hipertrofit-gray) 100%);
    color: var(--hipertrofit-white);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
    border: 1px solid var(--hipertrofit-green);
}

/* Mejoras en el hover de las tarjetas */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(146, 255, 100, 0.05) 0%, rgba(125, 255, 97, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.blog-card:hover::before {
    opacity: 1;
}

/* Responsive */
/* Loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(146, 255, 100, 0.3);
    border-top: 4px solid var(--hipertrofit-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .post-item.list-view .blog-card {
        flex-direction: column;
    }

    .post-item.list-view .card-img-top-wrapper {
        flex: none;
        height: 200px;
    }

    .post-item.list-view .card-body {
        padding: 1rem;
    }

    .post-item.list-view .card-title {
        font-size: 1.25rem;
    }

    .col-md-2,
    .col-md-3,
    .col-md-4,
    .col-md-6 {
        margin-bottom: 1rem;
    }

    .d-flex.align-items-end {
        flex-direction: column;
        align-items: stretch !important;
    }

    .d-flex.align-items-end .btn {
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
    }
}

/* Mejoras en el focus */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(146, 255, 100, 0.25) !important;
}

/* Accesibilidad */
.blog-card[tabindex="0"]:focus {
    outline: 2px solid var(--hipertrofit-green);
    outline-offset: 2px;
}

/* Mejoras para el touch en móvil */
.blog-card.touch-active {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(146, 255, 100, 0.2);
}

/* Texto de "No se encontraron artículos" */
.text-muted {
    color: #ccc !important;
}

/* Small text */
.text-muted small {
    color: #999 !important;
}

/* Mejoras adicionales para inputs en focus */
.form-control:focus,
.form-select:focus {
    background-color: var(--hipertrofit-gray) !important;
    color: var(--hipertrofit-white) !important;
}

/* Para los iconos de Font Awesome */
.fas {
    color: inherit;
}

/* Mejoras en los botones con iconos */
.btn .fas {
    margin-right: 0.5rem;
}

.btn-outline-secondary .fas {
    color: var(--hipertrofit-white);
}