/* Fuentes chulas */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Quicksand:wght@400;700&display=swap');
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    display: flex;
    flex-direction: column;
    background: url('./background.jpg') center/cover no-repeat fixed;
    color: #f0f0f0;
    font-family: 'Quicksand', sans-serif;
}


header {
    background-color: #4e54c8;
    padding: 20px;
    text-align: center;
    border-bottom: 5px solid #8f94fb;
}

header h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px #000;
}

nav {
    margin-top: 10px;
}

nav a {
    color: #ffe600;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    color: #00ffe7;
}

input[type="text"] {
    padding: 8px;
    border-radius: 8px;
    border: none;
    margin-left: 10px;
    width: 200px;
}

button {
    padding: 8px 12px;
    background-color: #ff00c8;
    color: white;
    border: none;
    border-radius: 8px;
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

button:hover {
    background-color: #c4009f;
}
main {
    flex: 1;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* 📌 Tarjetas cuadradas */
article {
    position: relative;
    background: linear-gradient(
        to bottom right,
        rgba(0, 0, 0, 0.7),
        rgba(0, 60, 80, 0.5)
    );
    border-radius: 15px;
    overflow: hidden;
    color: white;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    width: 100%;
    max-width: 360px;

}
.article-content {
    flex: 0 0 30%;
    padding: 10px;

    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 👈 CLAVE */
}
.article-content h3 {
    margin: 0 0 4px 0;
    font-size: 25px;
}

.article-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;

    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* 📸 Imagen */
.img-container {
    flex: 0 0 75%;
    overflow: hidden;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

article:hover .img-container img {
    transform: scale(1.1);
}

/* 📝 Título y enlace */
article h3 {
    font-size: 18px;
    padding: 10px;
    color: #00ffe7;
    margin: 0;
}


/* Footer */
footer {
    text-align: center;
    background-color: #4e54c8;
    color: white;
    padding: 15px;
    border-top: 5px solid #8f94fb;
    font-size: 14px;
    font-family: 'Quicksand', sans-serif;
}
.auth-button {
    display: inline-block;
    padding: 8px 16px;
    margin-left: 10px;
    font-weight: bold;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    font-family: 'Quicksand', sans-serif;
}

.auth-button.login {
    background-color: #00c3ff;
    color: white;
}

.auth-button.register {
    background-color: #00ff6e;
    color: #000;
}

.auth-button:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}


/* 🔗 Enlace de tarjeta completo */
.post-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* ❌ Evita estilos de enlace al pasar el ratón */
.post-link:hover,
.post-link:focus,
.post-link:active {
    text-decoration: none;
    color: inherit;
}
/* 📝 Página de artículo (Markdown) */
.post-content {
    display: block;          /* rompe el grid */
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    line-height: 1.7;
}

/* Markdown typography */
.post-content h1,
.post-content h2,
.post-content h3 {
    color: #00ffe7;
    margin-top: 1.5em;
}

.post-content p {
    margin-bottom: 1em;
}

.post-content a {
    color: #ffe600;
    text-decoration: underline;
}

.post-content code {
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 6px;
    border-radius: 6px;
    font-family: monospace;
}

.post-content pre {
    background: rgba(0, 0, 0, 0.85);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
}


/* ⬅️ Botón volver */
.back-container {
    max-width: 900px;
    margin: 20px auto 0;
    padding: 0 30px;
}

.back-button {
    display: inline-block;
    padding: 10px 18px;
    background-color: #00c3ff;
    color: #000;
    font-weight: bold;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.back-button:hover {
    background-color: #00ffe7;
    transform: translateX(-4px);
}
.post-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}


/* 📄 Páginas estáticas (About, Contact, etc.) */
.static-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    line-height: 1.7;
}

.static-page h2,
.static-page h3 {
    color: #00ffe7;
}

.static-page ul {
    margin-left: 20px;
}

.static-page li {
    margin-bottom: 8px;
}

.static-page a.back-button {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 18px;
    background-color: #00c3ff;
    color: #000;
    font-weight: bold;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.static-page a.back-button:hover {
    background-color: #00ffe7;
    transform: translateX(-4px);
}

/* 🔧 Anula el grid en páginas estáticas (About, Contact, etc.) */
main.static-page {
    display: block;
}

/* 📧 Enlace de correo */
.email-link {
    color: #ffe600;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1em;
}

.email-link:hover {
    color: #00ffe7;
    text-decoration: underline;
}
/* 📄 Página de contacto */
/* 🔥 FORZAR layout de una sola columna en páginas estáticas */
main.static-page,
main.contact-page {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
}

/* Email destacado */
.contact-page .email-link {
    display: inline-block;
    margin: 15px 0;
    font-size: 1.2em;
    color: #ffe600;
    font-weight: bold;
    text-decoration: none;
}

.contact-page .email-link:hover {
    color: #00ffe7;
    text-decoration: underline;
}

/* Nota adicional */
.contact-page .contact-note {
    margin-top: 20px;
    font-style: italic;
    opacity: 0.9;
}


#blog-container {
  justify-items: center;
}
header input[type="text"],
header button {
    margin-top: 14px;   /* ajusta: 8–14px según te guste */
}