/*
Theme Name: dds_elchefcoli.com
Theme URI: https://elchefcoli.com
Author: Marina Soler
Author URI: https://elchefcoli.com
Description: Tema informativo para un proyecto que une el archivo histórico de recetas con el diseño de interiores y las reformas de viviendas. Arquitectura dual en la portada, archivo de recetas y bitácora de reformas.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elchefcoli
*/

/* ===== Tokens ===== */
:root {
    --terracotta: #C46D5E;
    --terracotta-dark: #A85648;
    --cream: #F9F3E7;
    --sage: #8DA38A;
    --graphite: #2C2C2C;
    --sand: #EADBC6;
    --footer-bg: #262422;
    --footer-text: #E9E1D2;
    --shell: min(92%, 1180px);
    --radius: 8px;
}

/* ===== Reset / base ===== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--graphite);
    font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
}

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

a { color: var(--terracotta-dark); }
a:hover { color: var(--terracotta); }

h1, h2, h3, h4, h5, h6 {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    color: var(--graphite);
    line-height: 1.2;
    letter-spacing: -0.015em;
    font-weight: 700;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

blockquote {
    margin: 1.4em 0;
    padding: 0.6em 1.2em;
    border-left: 4px solid var(--sage);
    background: var(--sand);
    font-style: italic;
}

code, pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    background: var(--sand);
}
pre { padding: 1em; overflow-x: auto; border-radius: var(--radius); }

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--graphite);
}
th, td {
    border: 1px solid var(--graphite);
    padding: 0.6em 0.8em;
    text-align: left;
}
th { background: var(--sand); }

/* ===== Layout container ===== */
.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* Front page uses a wider 85% container (see spec E3) */
.front-shell {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.site-main { padding: 2.6rem 0 3.4rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 2.4rem;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Buttons ===== */
.btn,
.btn-secondary {
    display: inline-block;
    padding: 0.6em 1.4em;
    border-radius: var(--radius);
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, font-weight 0.18s ease, color 0.18s ease;
}
.btn {
    background: var(--terracotta);
    color: var(--cream);
    border: 1px solid var(--terracotta);
    font-weight: 500;
}
.btn:hover {
    background: var(--terracotta-dark);
    border-color: var(--terracotta-dark);
    color: var(--cream);
    font-weight: 700;
}
.btn-secondary {
    background: transparent;
    color: var(--graphite);
    border: 1px solid var(--graphite);
    font-weight: 500;
}
.btn-secondary:hover {
    background: rgba(196, 109, 94, 0.2);
    color: var(--graphite);
}

/* Filter chips */
.chip {
    display: inline-block;
    padding: 0.32em 0.9em;
    margin: 0.2em 0.25em 0.2em 0;
    border-radius: 999px;
    background: var(--sage);
    color: var(--graphite);
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.82rem;
    text-decoration: none;
}
.chip.is-active,
.chip:hover { background: var(--terracotta); color: var(--cream); }

/* ===== Header ===== */
.site-header {
    background: rgba(249, 243, 231, 0.82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sand);
    box-shadow: 0 6px 22px rgba(44, 44, 44, 0.07);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    text-decoration: none;
}
.brand-logo,
.brand-mark { width: 52px; height: 52px; flex: 0 0 52px; display: block; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.04rem;
    line-height: 1.25;
    color: var(--graphite);
    max-width: 46ch;
}
.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: #6f6457;
    line-height: 1.35;
    margin-top: 0.2rem;
    max-width: 54ch;
}

/* ===== Navigation ===== */
.main-nav { font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif; }
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    text-decoration: none;
    color: var(--graphite);
    font-size: 0.95rem;
    font-weight: 500;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--terracotta-dark);
    border-bottom-color: var(--terracotta);
}
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--graphite);
    border-radius: var(--radius);
    padding: 0.4em 0.7em;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
    padding: 3rem 0 2.2rem;
}
.footer-col { min-width: 0; }
.footer-col,
.footer-col p,
.footer-col li,
.footer-col a { color: var(--footer-text); }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--terracotta); text-decoration: underline; }
.footer-col h2,
.footer-col h3,
.footer-col .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0.4em 0; }
.footer-bottom {
    border-top: 1px solid rgba(233, 225, 210, 0.18);
    padding: 1.2rem 0;
    font-size: 0.85rem;
    color: var(--footer-text);
}

/* ===== Widgets ===== */
.widget { margin-bottom: 2rem; }
.widget-title {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 1.1rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--sage);
}

/* Sidebar widgets: light background -> dark text */
.sidebar {
    background: var(--sand);
    border-radius: var(--radius);
    padding: 1.6rem 1.4rem;
}
.sidebar,
.sidebar p,
.sidebar li,
.sidebar .widget-title { color: var(--graphite); }
.sidebar a { color: var(--terracotta-dark); text-decoration: none; }
.sidebar a:hover { color: var(--terracotta); text-decoration: underline; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
    margin: 0.55em 0;
    padding-bottom: 0.55em;
    border-bottom: 1px solid rgba(44, 44, 44, 0.12);
}
.sidebar li:last-child { border-bottom: none; }
.sidebar .post-date,
.sidebar .rss-date {
    display: block;
    font-size: 0.78rem;
    color: #6f6457;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    width: var(--shell);
    margin: 1.4rem auto 0;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
    color: #6f6457;
}
.breadcrumbs a { color: var(--terracotta-dark); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 0.35em; color: var(--sage); }

/* ===== Page / post ===== */
.page-title {
    margin: 0 0 1.4rem;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid var(--terracotta);
}
.entry-content { margin-top: 1.4rem; }
.entry-content img { border-radius: var(--radius); }
.post-meta {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
    color: #6f6457;
    margin-bottom: 1rem;
}
.featured-media img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
    margin-bottom: 1.4rem;
}

/* ===== Cards ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}
.layout-with-sidebar .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(44, 44, 44, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(44, 44, 44, 0.12);
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap img,
.card-thumb-ph {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.card-thumb-ph {
    background: linear-gradient(135deg, var(--sage), var(--sand));
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
}
.card-title {
    font-size: 1.18rem;
    margin: 0 0 0.5rem;
}
.card-title a { color: var(--graphite); text-decoration: none; }
.card-title a:hover { color: var(--terracotta-dark); }
.card-meta {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.78rem;
    color: #6f6457;
    margin-bottom: 0.6rem;
}
.card-excerpt { font-size: 0.95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-actions { margin-top: auto; padding-top: 0.9rem; }

/* ===== Pagination ===== */
.pagination {
    margin: 2.6rem 0 0;
    display: flex;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-block;
    min-width: 2.4em;
    text-align: center;
    padding: 0.45em 0.7em;
    margin: 0 0.2em;
    border-radius: var(--radius);
    border: 1px solid var(--sand);
    background: #fff;
    color: var(--graphite);
    text-decoration: none;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.9rem;
}
.pagination .page-numbers:hover { border-color: var(--terracotta); }
.pagination .page-numbers.current {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: var(--cream);
}
.pagination .page-numbers.dots { border: none; background: transparent; }

/* ===== Front page ===== */
.front-section { padding: 3.4rem 0; }
.front-section + .front-section { border-top: 1px solid var(--sand); }
.section-head { margin-bottom: 1.8rem; }
.section-kicker {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.74rem;
    color: var(--terracotta-dark);
    font-weight: 700;
}
.section-head h2 { margin: 0.3rem 0 0; }

/* Dual architecture hero */
.dual-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(44, 44, 44, 0.12);
    position: relative;
}
.dual-hero::after {
    content: "";
    position: absolute;
    top: 8%;
    bottom: 8%;
    left: 50%;
    width: 2px;
    transform: translateX(-1px);
    background: linear-gradient(var(--cream), var(--graphite), var(--cream));
    opacity: 0.5;
}
.dual-half {
    padding: 3rem 2.4rem;
    min-width: 0;
}
.dual-half--kitchen { background: var(--sand); }
.dual-half--reform { background: var(--sage); }
.dual-half h3 { font-size: 1.5rem; margin: 0.4rem 0 0.7rem; }
.dual-half .section-kicker { color: var(--graphite); }

/* Step / column blocks */
.tri-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}
.tile {
    background: #fff;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    padding: 1.6rem 1.4rem;
    min-width: 0;
}
.tile .tile-icon {
    width: 44px; height: 44px;
    display: block;
    margin-bottom: 0.8rem;
}
.tile h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.tile p { margin: 0; font-size: 0.95rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
    position: relative;
    padding: 0 0 1.5rem 1.8rem;
    border-left: 2px solid var(--sage);
}
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -8px; top: 2px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--terracotta);
}
.timeline .era {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    color: var(--terracotta-dark);
}

.cta-band {
    background: var(--terracotta);
    color: var(--cream);
    border-radius: var(--radius);
    padding: 2.6rem 2.4rem;
    text-align: center;
}
.cta-band h2 { color: var(--cream); margin: 0 0 0.6rem; }
.cta-band p { margin: 0 auto 1.4rem; max-width: 58ch; }
.cta-band .btn-secondary {
    border-color: var(--cream);
    color: var(--cream);
}
.cta-band .btn-secondary:hover { background: rgba(249, 243, 231, 0.18); color: var(--cream); }

.contact-static {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
    justify-content: center;
}
.contact-static a { color: var(--cream); font-weight: 600; }

/* ===== Search form ===== */
.search-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.6em 0.8em;
    border: 1px solid var(--graphite);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
}
.search-form button {
    padding: 0.6em 1.3em;
    border: 1px solid var(--terracotta);
    background: var(--terracotta);
    color: var(--cream);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
}
.search-form button:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); }

/* ===== Comments ===== */
.comments-area { margin-top: 2.6rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin: 1.2rem 0; }
.comment-body {
    background: #fff;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}
.comment-list .children { list-style: none; margin: 0 0 0 1.6rem; padding: 0; }
.comment-meta { font-size: 0.82rem; color: #6f6457; margin-bottom: 0.4rem; }
.comment-respond {
    background: var(--sand);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    margin-top: 1.6rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.55em 0.7em;
    border: 1px solid var(--graphite);
    border-radius: var(--radius);
    font-family: inherit;
    margin-top: 0.3rem;
}
.comment-form p { margin-bottom: 0.9rem; }
.comment-form .form-submit input {
    width: auto;
    background: var(--terracotta);
    color: var(--cream);
    border: 1px solid var(--terracotta);
    border-radius: var(--radius);
    padding: 0.6em 1.4em;
    cursor: pointer;
}

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 2rem 0; }
.error-404 .big { font-size: 4.5rem; color: var(--terracotta); margin: 0; }
.error-404 .search-form { max-width: 420px; margin: 1.6rem auto; }

/* ===== Cookie banner (rule A11: [hidden] rule BEFORE main block) ===== */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--graphite);
    color: var(--cream);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
}
.cookie-banner p { margin: 0; max-width: 70ch; }
.cookie-banner a { color: var(--sand); }
.cookie-banner button {
    background: var(--terracotta);
    color: var(--cream);
    border: none;
    border-radius: var(--radius);
    padding: 0.55em 1.5em;
    cursor: pointer;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.9rem;
}
.cookie-banner button:hover { background: var(--terracotta-dark); }

/* ===== Misc helpers ===== */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    word-wrap: normal !important;
}
.page-head { margin-bottom: 1.8rem; }
.page-intro,
.archive-description {
    color: #6f6457;
    font-size: 0.98rem;
}
.entry-tags {
    margin-top: 1.6rem;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
}
.entry-tags a {
    display: inline-block;
    margin: 0.2em 0.3em 0.2em 0;
    padding: 0.2em 0.7em;
    background: var(--sand);
    border-radius: 999px;
    text-decoration: none;
    color: var(--graphite);
}
.entry-tags a:hover { background: var(--sage); }
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--sand);
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.9rem;
}
.post-nav a { text-decoration: none; }
.post-nav .next { text-align: right; }
.page-links {
    margin-top: 1.4rem;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.9rem;
}
.comments-title { margin-top: 0; }
.no-comments { color: #6f6457; }

/* ===== Micro-animations ===== */
@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-9deg); }
    75% { transform: rotate(9deg); }
}
.card:hover .tile-icon,
.card:hover .anchor-icon { animation: wobble 0.6s ease; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .card-grid,
    .layout-with-sidebar .card-grid,
    .footer-cols,
    .tri-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dual-hero { grid-template-columns: 1fr; }
    .dual-hero::after { display: none; }
    h1 { font-size: 1.9rem; }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    .card-grid,
    .layout-with-sidebar .card-grid,
    .footer-cols,
    .tri-grid { grid-template-columns: 1fr; }
    .layout-single .content-area { width: 100%; }
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0.2rem;
        margin-top: 0.8rem;
    }
    .main-nav[data-collapsed="true"] ul { display: none; }
    .dual-half { padding: 2rem 1.5rem; }
    .front-section { padding: 2.4rem 0; }
}
