/* 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;
}

/* Header con navegación superior */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.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;
}

.back-link:hover {
    background-color: #e5e7eb;
    text-decoration: none;
}

.next-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #e5e7eb;
    color: #1f2937;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.next-link:hover {
    background-color: #d1d5db;
    text-decoration: none;
}

.next-link.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

/* 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; }

/* Encabezado del sitio */
.site-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.site-description {
    font-size: 1.125rem;
    color: #4b5563;
}

/* Tarjeta de artículo */
.post-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.75rem;
    transition: box-shadow 0.2s ease;
    margin-bottom: 2rem;
}

.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;
}

.category {
    font-weight: 500;
    color: #3b82f6;
}

.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;
}

/* Footer con navegación */
.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.footer-center {
    text-align: center;
    flex: 1;
}

.footer-center p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.footer-center a {
    color: #2563eb;
    text-decoration: none;
}

.footer-center a:hover {
    text-decoration: underline;
}

.back-to-top-link {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: #f3f4f6;
    color: #1f2937;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.back-to-top-link:hover {
    background-color: #e5e7eb;
}

/* Botón Volver arriba fijo (flotante) - se mantiene por si se usa */
.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;
    }
}

/* Responsive general */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    .post-title {
        font-size: 1.5rem;
    }
    .site-title {
        font-size: 1.75rem;
    }
    .nav-left {
        gap: 0.75rem;
    }
    .footer-nav {
        flex-direction: column;
        text-align: center;
    }
    .back-to-top-link {
        order: -1;
    }
}