/*
Theme Name: Dagorret Theme
Theme URI: https://dagorret.com.ar
Author: Dagorret
Description: Tema personalizado basado en la maquetación Blade original.
Version: 1.0.3
*/

/* =========================================================
   BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    line-height: 1.7;
    color: #111111;
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #fff;
}

a {
    color: #004499;
}

/* =========================================================
   CABECERA
   ========================================================= */

header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

header p {
    color: #4a4a4a;
    margin: 0 0 20px 0;
    font-size: 0.95rem;
}

/* =========================================================
   MENÚ PRINCIPAL
   ========================================================= */

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation > div > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.main-navigation li {
    position: relative;
    margin: 0;
}

.main-navigation a {
    display: inline-block;
    color: #004499;
    text-decoration: none;
}

.main-navigation a:hover,
.main-navigation a:focus {
    text-decoration: underline;
}

/* Submenús cerrados por defecto */

.main-navigation .sub-menu {
    display: none;
    min-width: 190px;
}

/* Botón generado por header.php */

.toggle-btn {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.8rem;
    padding: 0 4px;
    margin-right: 4px;
    color: #333;
    min-width: 24px;
    min-height: 24px;
}

.toggle-btn:hover,
.toggle-btn:focus {
    color: #000;
}

/* =========================================================
   MENÚ: ESCRITORIO
   ========================================================= */

@media (min-width: 769px) {

    /* En escritorio no necesitamos la flecha */
    .main-navigation .toggle-btn {
        display: none;
    }

    .main-navigation .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 100;

        background: #fff;
        border: 1px solid #ddd;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.10);

        padding: 8px 0;
    }

    .main-navigation .sub-menu li {
        width: 100%;
    }

    .main-navigation .sub-menu a {
        display: block;
        padding: 7px 14px;
        white-space: nowrap;
        text-decoration: none;
    }

    .main-navigation .sub-menu a:hover,
    .main-navigation .sub-menu a:focus {
        background: #f6f6f6;
        text-decoration: none;
    }

    /*
     * Abrir automáticamente con mouse
     * o al navegar mediante teclado.
     */
    .main-navigation li:hover > .sub-menu,
    .main-navigation li:focus-within > .sub-menu {
        display: block;
    }

    /* Segundo nivel y siguientes */
    .main-navigation .sub-menu .sub-menu {
        top: 0;
        left: 100%;
    }
}

/* =========================================================
   MENÚ: MÓVIL / TABLET
   ========================================================= */

@media (max-width: 768px) {

    .main-navigation > div > ul {
        display: block;
    }

    .main-navigation li {
        margin: 6px 0;
    }

    .main-navigation .toggle-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        min-width: 32px;
        min-height: 32px;

        margin-right: 4px;
        padding: 0;

        cursor: pointer;
        background: none;
        border: 0;
        color: #333;
    }

    .main-navigation .sub-menu {
        position: static;

        margin: 4px 0 6px 20px;
        padding: 0;

        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .main-navigation li.open > .sub-menu {
        display: block;
    }

    .main-navigation .sub-menu a {
        display: inline-block;
        padding: 4px 0;
    }
}

/* =========================================================
   FORMATO DE ENTRADAS
   ========================================================= */

.post-preview {
    margin-bottom: 35px;
}

.post-title {
    font-size: 1.4rem;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.post-title a {
    color: #111;
    text-decoration: none;
}

.post-title a:hover {
    color: #0066cc;
}

.post-meta {
    font-size: 0.85rem;
    color: #4a4a4a;
}

.post-meta a {
    color: #555;
}

/* =========================================================
   BLOQUES DE CÓDIGO
   ========================================================= */

pre,
code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,
        monospace;
    font-size: 0.88em;
}

pre {
    background-color: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-left: 4px solid #24292e;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    line-height: 1.45;
    color: #24292e;
    margin: 20px 0;
}

pre code {
    background: transparent;
    padding: 0;
    border: 0;
}

p code,
li code {
    background-color: rgba(175, 184, 193, 0.2);
    color: #24292e;
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-size: 0.85em;
}

/* =========================================================
   NAVEGACIÓN POST ANTERIOR / SIGUIENTE
   ========================================================= */

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0 20px 0;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
    font-size: 0.9rem;
}

.nav-previous,
.nav-next {
    max-width: 48%;
}

.post-navigation a {
    color: #004499;
    text-decoration: none;
    font-weight: 500;
}

.post-navigation a:hover {
    text-decoration: underline;
}

/* =========================================================
   ENTRADAS RELACIONADAS
   ========================================================= */

.related-posts {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #eee;
}

.related-posts h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: #333;
}

.related-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-posts li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.related-posts a {
    color: #111;
    text-decoration: none;
    font-weight: 500;
}

.related-posts a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.related-date {
    color: #4a4a4a;
    font-size: 0.8rem;
    margin-left: 6px;
}

/* =========================================================
   COMENTARIOS
   ========================================================= */

#comments {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.comment-respond {
    margin-top: 20px;
}

.comment-form p {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.comment-form input[type="submit"] {
    background-color: #111;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.comment-form input[type="submit"]:hover {
    background-color: #0066cc;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column .widget {
    margin-bottom: 20px;
}

.footer-column .widget-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    border-bottom: 2px solid #111;
    padding-bottom: 4px;
}

.footer-copyright {
    border-top: 1px solid #eee;
    padding-top: 20px;
    text-align: center;
}

/* =========================================================
   RESPONSIVE GENERAL
   ========================================================= */

@media (max-width: 600px) {

    body {
        padding: 24px 16px;
    }

    header {
        margin-bottom: 30px;
    }

    header h1 {
        font-size: 1.9rem;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .post-navigation {
        flex-direction: column;
    }

    .nav-previous,
    .nav-next {
        max-width: 100%;
    }
}
