/* ============================================
   BLOG STYLES - TitanIA Tech
   Versión: 1.0
   Fecha: 2025-10-31
   Objetivo: Alinear diseño del blog con la landing profesional
   ============================================ */

/* ============================================
   NIVEL 1 - CAMBIOS CRÍTICOS
   (Transformación visual inmediata)
   ============================================ */

/* 1. Tipografía profesional - Fuente Inter (igual que landing) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background-color: #0a0a0a !important; /* Fondo igual que landing */
    color: #f5f5f5 !important;
    line-height: 1.6;
}

/* Asegurar visibilidad de TODO el texto */
p {
    color: #e0e0e0 !important;
}

span {
    color: inherit;
}

div {
    color: inherit;
}

/* 2. Cards modernas con gradientes y efectos glow */
.card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%) !important;
    border: 1px solid rgba(250, 81, 11, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 2px 8px rgba(250, 81, 11, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4),
                0 4px 16px rgba(250, 81, 11, 0.2) !important;
    border-color: rgba(250, 81, 11, 0.4) !important;
}

/* 3. Encabezados de cards con gradiente */
.card-header {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%) !important;
    border-bottom: 1px solid rgba(250, 81, 11, 0.3) !important;
    padding: 1.5rem !important;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem !important;
}

/* Texto de cards - Asegurar visibilidad */
.card-text,
.card-body p,
.card-body div {
    color: #e0e0e0 !important;
}

.card-title,
.card-title a {
    color: #f5f5f5 !important;
}

.card-body small,
.text-muted {
    color: #999 !important;
}

.card a {
    color: #fa510b;
    transition: color 0.3s ease;
}

.card a:hover {
    color: #fa930a;
}

/* 4. Botones con gradiente naranja profesional */
.btn-primary {
    background: linear-gradient(135deg, #fa510b 0%, #fa930a 100%) !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px 32px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 4px 15px rgba(250, 81, 11, 0.3),
                0 2px 8px rgba(250, 81, 11, 0.2) !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
    letter-spacing: 0.5px;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #e64a0a 0%, #e58609 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(250, 81, 11, 0.4),
                0 4px 12px rgba(250, 81, 11, 0.3) !important;
    transform: translateY(-2px);
}

/* Botones pequeños (como "Leer más") */
.btn-sm {
    padding: 8px 24px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

.btn-outline-primary {
    border: 2px solid #fa510b !important;
    color: #fa510b !important;
    border-radius: 50px !important;
    padding: 12px 32px !important;
    font-weight: 600 !important;
    background: transparent !important;
    transition: all 0.3s ease !important;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #fa510b 0%, #fa930a 100%) !important;
    color: white !important;
    border-color: #fa510b !important;
    box-shadow: 0 4px 15px rgba(250, 81, 11, 0.3) !important;
}

/* 5. Títulos con efectos de gradiente */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700 !important;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #fa510b 0%, #fa930a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Título principal del blog - Estilo de landing revolucion */
.section-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 900 !important;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #fa930a) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: none !important;
}

/* Responsive para título del blog */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

h2 {
    font-size: 2rem;
    color: #f5f5f5;
}

h3 {
    font-size: 1.5rem;
    color: #e0e0e0;
}

h4 {
    font-size: 1.25rem;
    color: #f5f5f5;
}

h5 {
    font-size: 1.1rem;
    color: #f5f5f5 !important;
}

h6 {
    font-size: 1rem;
    color: #f5f5f5 !important;
}

/* Asegurar visibilidad de títulos en card-header */
.card-header h5,
.card-header h6 {
    color: #f5f5f5 !important;
    margin-bottom: 0 !important;
    font-weight: 600 !important;
}

/* 6. Formularios modernos */
.form-control {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(250, 81, 11, 0.2) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    color: #f5f5f5 !important;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: #1a1a1a !important;
    border-color: #fa510b !important;
    box-shadow: 0 0 0 3px rgba(250, 81, 11, 0.1) !important;
    color: #f5f5f5 !important;
}

.form-control::placeholder {
    color: #888 !important;
}

.form-label {
    color: #f5f5f5 !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ============================================
   NIVEL 2 - MEJORAS ADICIONALES
   (Refinamiento y detalles)
   ============================================ */

/* 7. Badges modernos */
.badge {
    padding: 6px 16px !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #fa510b 0%, #fa930a 100%) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #1a1a1a !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Badges con efecto hover */
.badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* 8. Input de búsqueda con efecto */
input[type="search"],
input[name="search"],
.search-input {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%) !important;
    border: 1px solid rgba(250, 81, 11, 0.2) !important;
    border-radius: 50px !important;
    padding: 12px 24px !important;
    transition: all 0.3s ease;
}

input[type="search"]:focus,
input[name="search"]:focus,
.search-input:focus {
    border-color: #fa510b !important;
    box-shadow: 0 0 0 3px rgba(250, 81, 11, 0.1),
                0 4px 12px rgba(250, 81, 11, 0.2) !important;
}

/* 9. Sidebar con efectos */
.sidebar,
.blog-sidebar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(250, 81, 11, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 10. Links con efecto hover */
a {
    color: #fa510b;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #fa930a;
    text-decoration: none;
}

/* 11. Listas de artículos */
.list-group-item {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(250, 81, 11, 0.2) !important;
    color: #f5f5f5 !important;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: #2a2a2a !important;
    border-color: rgba(250, 81, 11, 0.4) !important;
    transform: translateX(4px);
}

.list-group-item a {
    color: #f5f5f5 !important;
}

.list-group-item a:hover {
    color: #fa510b !important;
}

.list-group-item small {
    color: #999 !important;
}

/* 12. Paginación moderna */
.pagination {
    gap: 8px;
}

.page-link {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(250, 81, 11, 0.2) !important;
    color: #fa510b !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: linear-gradient(135deg, #fa510b 0%, #fa930a 100%) !important;
    color: white !important;
    border-color: #fa510b !important;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #fa510b 0%, #fa930a 100%) !important;
    border-color: #fa510b !important;
}

/* ============================================
   NIVEL 3 - ANIMACIONES PREMIUM
   (Efectos avanzados y detalles finales)
   ============================================ */

/* 13. Animación fadeInUp para cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.blog-post,
.article-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

/* Delay escalonado para múltiples cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* 14. Efecto glow en imágenes al hover */

/* Contenedor de imágenes del blog */
.blog-image-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card img,
.blog-image,
.article-image {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.card-img-top {
    border-radius: 12px 12px 0 0 !important;
}

.card img:hover,
.blog-image:hover,
.article-image:hover {
    box-shadow: 0 8px 24px rgba(250, 81, 11, 0.3),
                0 0 40px rgba(250, 81, 11, 0.2);
    transform: scale(1.05);
}

/* 15. Texto con sombra suave */
.card-title,
.blog-title,
.article-title {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    color: #f5f5f5;
}

/* 16. Breadcrumbs modernos */
.breadcrumb {
    background: transparent !important;
    padding: 1rem 0;
}

.breadcrumb-item {
    color: #888;
}

.breadcrumb-item.active {
    color: #fa510b;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #555;
}

/* 17. Alertas personalizadas */
.alert {
    border-radius: 12px !important;
    border: none !important;
    padding: 1rem 1.5rem !important;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    color: white !important;
}

.alert-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #1a1a1a !important;
}

.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

/* 18. Scrollbar personalizado */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #fa510b 0%, #fa930a 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #e64a0a 0%, #e58609 100%);
}

/* ============================================
   RESPONSIVE - OPTIMIZACIONES MOBILE
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .card {
        margin-bottom: 1.5rem;
    }

    .btn-primary,
    .btn-outline-primary {
        padding: 10px 24px !important;
        font-size: 0.9rem !important;
    }
}

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */

/* Espaciado consistente */
.section-spacing {
    padding: 4rem 0;
}

/* Contenedor máximo */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Separador con gradiente */
.gradient-divider {
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        #fa510b 50%,
        transparent 100%);
    margin: 2rem 0;
}

/* Texto destacado */
.highlight-text {
    color: #fa510b;
    font-weight: 600;
}

/* Sombra de texto sutil */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   FIN DE ESTILOS
   ============================================ */
