/* Estilos para la página principal index.html */
/* Inspirado en el diseño moderno de archer_diary.css */

/* Hero section con gradiente */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.index-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem 3rem;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
    z-index: 1;
}

.index-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.index-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 10;
}

.index-hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    position: relative;
    z-index: 10;
}

/* Tarjetas con efecto elevado */
.elevated-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.elevated-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Stats cards (para estadísticas/métricas) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    position: relative;
    z-index: 20;
    margin-top: -2rem;
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.stat-card.blue { border-top: 4px solid #3b82f6; }
.stat-card.yellow { border-top: 4px solid #f59e0b; }
.stat-card.green { border-top: 4px solid #10b981; }
.stat-card.indigo { border-top: 4px solid #6366f1; }
.stat-card.purple { border-top: 4px solid #8b5cf6; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Botones de acción modernos */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 0.625rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
}

.btn-secondary {
    background: white;
    color: #374151 !important;
    border: 2px solid #e5e7eb;
    padding: 0.625rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Inputs y formularios */
.form-input,
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1f2937;
    background-color: white;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: #fefefe;
}

.form-input:hover,
.form-select:hover {
    border-color: #9ca3af;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input:disabled,
.form-select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Labels de formulario */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

/* Empty state moderno */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 2rem;
}

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Estilos adicionales para el calendario público */
.calendar-event-card {
    background: white;
    border-radius: 0.75rem;
    border-left: 4px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    padding: 1rem;
}

.calendar-event-card:hover {
    border-left-color: #3b82f6;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    background: #f8fafc;
}

.calendar-event-card h3 a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.calendar-event-card h3 a:hover {
    color: #3b82f6;
}

.event-datetime-indicator {
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

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

.grid-calendar-news {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 1024px) {
    .grid-calendar-news {
        grid-template-columns: 1fr;
    }
}

/* Estilos para el blog */
.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.blog-header::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.blog-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 10;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.blog-header p {
    font-size: 1.375rem;
    font-weight: 400;
    opacity: 0.95;
    position: relative;
    z-index: 10;
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .blog-header {
        padding: 3rem 1.5rem;
    }
    
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .blog-header p {
        font-size: 1.125rem;
    }
}

.post-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.category-badge {
    display: inline-block;
    background-color: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.tag-badge {
    display: inline-block;
    background-color: #e5e7eb;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.tag-badge:hover {
    background-color: #d1d5db;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Grid responsive para layout del blog */
@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: 2fr 1fr !important;
    }
}

@media (max-width: 1023px) {
    .blog-grid {
        grid-template-columns: 1fr !important;
    }
    
    .blog-sidebar {
        order: 2;
    }
    
    .blog-main-content {
        order: 1;
    }
}

/* Prevenir overflow en artículos del blog */
.post-card {
    max-width: 100%;
    box-sizing: border-box;
}

.post-card > div {
    max-width: 100%;
}

.post-card img {
    max-width: 100%;
    height: auto;
}

/* Asegurar que el contenido de texto no cause overflow */
.post-card h3,
.post-card p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Layout responsive para tarjetas de posts - móvil en columna */
@media (max-width: 768px) {
    .post-card-content {
        flex-direction: column !important;
    }
    
    .post-card-image {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .post-card-image img {
        width: 100% !important;
        height: 200px !important;
    }
}

/* Ajuste para el blog cuando está en grid con calendario */
.grid-calendar-news .blog-header {
    padding: 2rem 1rem;
}

.grid-calendar-news .blog-header h1 {
    font-size: 2rem;
}

.grid-calendar-news .blog-header p {
    font-size: 1rem;
}

/* Estilos del botón Arena (match arena/index.html) */
.btn-gamified {
    background-color: #ea580c;
    color: white !important;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 800;
    display: inline-block;
    padding: 1.25rem 2.5rem;
    transition: background-color 0.2s;
    border: none;
}

.btn-gamified:hover {
    background-color: #c2410c;
}

/* Estilos para las tarjetas del dashboard */
.dashboard-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: linear-gradient(90deg, rgba(248,250,252,1) 0%, rgba(255,255,255,1) 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(59,130,246,0.05);
    transition: box-shadow .18s, transform .18s;
    text-decoration: none;
    color: inherit;
    min-height: 112px;
}

.dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(59,130,246,0.12);
    transform: translateY(-3px);
    background: #f1f5f9;
}

.dashboard-card .icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
}

.dashboard-card .icon i {
    width: 32px;
    height: 32px;
}

/* Dashboard card vertical (para archer_dashboard) */
.dashboard-card-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 1rem;
    padding: 2rem 1rem;
    box-shadow: 0 2px 8px rgba(59,130,246,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    min-height: 160px;
}

.dashboard-card-vertical:hover {
    box-shadow: 0 8px 24px rgba(59,130,246,0.12);
    transform: translateY(-2px) scale(1.03);
    background: #e0e7ef;
}

.dashboard-card-vertical .icon {
    margin-bottom: 0.5rem;
}

.dashboard-card-vertical .title {
    font-weight: 600;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.dashboard-card-vertical .desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Grid para dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
