/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background: #f9fafb;
    color: #1f2937;
    padding: 2rem 1rem;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 2rem;
}

/* Encabezado principal */
header {
    margin-bottom: 2rem;
}

/* Contenedor flex para botón e idioma */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Botón "Back to home" */
.back-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    color: #1f2937;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.back-link:hover {
    background-color: #e5e7eb;
    text-decoration: none;
}

/* Estilos para el widget de Google Translate */
#google_translate_element {
    text-align: right;
}

.goog-te-combo, .goog-logo-link {
    font-size: 14px !important;
}

.goog-te-gadget {
    font-family: inherit !important;
}

.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

/* Categoría en azul */
.category {
    font-weight: 500;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.meta {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Tarjeta de artículo en home (no afecta a estos artículos, pero se mantiene) */
.post-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.75rem;
    transition: box-shadow 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.post-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.post-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.post-title a {
    text-decoration: none;
    color: #111827;
}

.post-title a:hover {
    text-decoration: underline;
    color: #2563eb;
}

.post-excerpt p {
    color: #374151;
    margin-bottom: 1.25rem;
}

.read-more {
    display: inline-block;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.read-more:hover {
    border-bottom-color: #2563eb;
}

/* Tablas responsivas */
.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #f3f4f6;
    font-weight: 600;
}

/* Pie de página */
footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

footer a {
    color: #2563eb;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    .post-title {
        font-size: 1.5rem;
    }
    .site-title {
        font-size: 1.75rem;
    }
    .header-top {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    #google_translate_element {
        text-align: center;
    }
}

/* Botón Volver arriba (Back to top) */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background-color: #2563eb;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, transform 0.1s;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #1d4ed8;
    transform: scale(1.05);
}

.back-to-top:active {
    transform: scale(0.98);
}

@media (max-width: 480px) {
    .back-to-top {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        bottom: 1rem;
        right: 1rem;
    }
}