/*
Theme Name: Recetas Lattay Real
Theme URI: https://example.com/recetas-lattay
Author: Codex
Description: Theme WordPress dinamico para recetas sin gluten, basado en el diseno provisto.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: recetas-lattay
*/

:root {
  --paper: #fffdf9;
  --soft: #f5ede6;
  --ink: #382525;
  --muted: #6d5c58;
  --line: #e8ddd4;
  --red: #d62d2a;
  --red-dark: #b82020;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { display: block; max-width: 100%; height: auto; }
input, textarea, button { font: inherit; }
.rl-container { width: min(100% - 64px, 1180px); margin-inline: auto; }
.rl-content-width { width: min(100% - 40px, 820px); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

.rl-site-header { position: absolute; z-index: 10; inset: 0 0 auto; padding: 18px 0; }
.rl-header-inner { display: grid; grid-template-columns: 180px 1fr 250px; align-items: start; gap: 26px; }
.rl-brand img, .custom-logo { width: 150px; max-height: 130px; object-fit: contain; }
.custom-logo-link { display: block; }
.rl-nav { padding-top: 16px; }
.rl-menu, .rl-nav { display: flex; justify-content: center; gap: 30px; }
.rl-menu { margin: 0; padding: 0; list-style: none; }
.rl-nav a { position: relative; display: block; padding: 0 0 10px; font-size: 14px; font-weight: 600; color: #2f2020; }
.rl-nav a:hover::after, .rl-nav .current-menu-item > a::after, .rl-nav .current_page_item > a::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--red); content: ""; }
.rl-search { position: relative; margin-top: 8px; }
.rl-search input { width: 100%; height: 40px; border: 1px solid transparent; border-radius: 22px; background: #f1ebe7; padding: 0 44px 0 17px; color: var(--ink); }
.rl-search input:focus { border-color: var(--red); outline: 0; }
.rl-search button { position: absolute; top: 0; right: 4px; width: 38px; height: 40px; border: 0; background: transparent; font-size: 24px; cursor: pointer; }

.rl-hero { min-height: 610px; padding: 180px 0 70px; background: linear-gradient(90deg, #fffdf9 0%, rgba(255,253,249,.98) 40%, rgba(255,253,249,.2) 66%, transparent 100%), var(--rl-hero-image) right top / auto 610px no-repeat; }
.rl-hero-copy { width: min(500px, 100%); }
.rl-hero h1 { margin: 0 0 24px; font: 800 clamp(44px, 5vw, 65px)/.98 var(--serif); letter-spacing: 0; }
.rl-hero p { max-width: 470px; margin: 0 0 30px; color: #403332; font-size: 18px; }
.rl-btn { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; border: 1px solid var(--red); border-radius: 24px; padding: 0 26px; color: var(--red); font-weight: 800; cursor: pointer; }
.rl-btn:hover, .rl-btn-solid { background: var(--red); color: #fff; }
.rl-btn-solid:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }

/* ===========================
   CATEGORÍAS
=========================== */

.rl-categories{
    background:#fbf7f4;
    border-top:1px solid #e6ddd5;
    border-bottom:1px solid #e6ddd5;
}

.rl-category-menu{
    display:flex;
    justify-content:space-between;
    align-items:center;

    margin:0;
    padding:0;

    list-style:none;
}

.rl-category-menu li{
    position:relative;
    flex:1;
    margin:0;
    text-align:center;
}

.rl-category-menu li:not(:last-child)::after{
    content:"";
    position:absolute;
    top:50%;
    right:0;
    transform:translateY(-50%);
    width:1px;
    height:26px;
    background:#e5ddd5;
}

.rl-category-menu a{
    display:block;
    padding:22px 12px;
    font-size:18px;
    font-weight:600;
    color:#433232;
    white-space:nowrap;
    transition:.25s;
}

.rl-category-menu a:hover{
    color:#d62d2a;
}

.rl-category-menu .active a{
    color:#d62d2a;
}

.rl-category-menu .active a::after{
    content:"";
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    bottom:-1px;
    width:42px;
    height:3px;
    background:#d62d2a;
    border-radius:2px;
}

@media(max-width:900px){
    .rl-category-menu{
        justify-content:flex-start;
        overflow-x:auto;
        white-space:nowrap;
    }
    .rl-category-menu li{
        flex:0 0 auto;
    }
    .rl-category-menu a{
        padding:22px 24px;
    }
}

.rl-section { padding: 38px 0 24px; }
.rl-section-title, .rl-page-header h1, .rl-entry-header h1 { font-family: var(--serif); letter-spacing: 0; }
.rl-section-title { width: fit-content; margin: 0 auto 30px; font-size: clamp(32px, 4vw, 44px); line-height: 1.08; text-align: center; }
.rl-section-title::after { display: block; width: 110px; height: 7px; margin: 5px auto 0; background: var(--red); clip-path: polygon(0 56%, 100% 32%, 100% 62%, 0 88%); content: ""; }
.rl-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rl-card, .rl-tip { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.rl-card-media { position: relative; display: block; aspect-ratio: 1.08 / 1; overflow: hidden; background: var(--soft); }
.rl-card-media img, .rl-tip-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.rl-card:hover img, .rl-tip:hover img { transform: scale(1.025); }
.rl-badge { position: absolute; bottom: 0; left: 14px; border-radius: 4px 4px 0 0; background: #fff; padding: 7px 12px; font-size: 12px; font-weight: 700; }
.rl-card-body { padding: 17px 22px 20px; }
.rl-card-title { min-height: 62px; margin: 0 0 12px; font: 600 22px/1.2 var(--serif); }
.rl-card-body p { color: var(--muted); font-size: 13px; }
.rl-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 12px; }
.rl-read { color: var(--red); font-size: 13px; font-weight: 800; }
.rl-center { display: flex; justify-content: center; padding-top: 24px; }
.rl-empty { border: 1px dashed #d8c7bb; border-radius: 8px; padding: 38px; background: #fffaf6; text-align: center; }
.rl-empty h2, .rl-empty h3 { font-family: var(--serif); font-size: 28px; }
.rl-empty .rl-search { width: min(100%, 380px); margin: 20px auto; }

.rl-tips-section { padding-bottom: 26px; }
.rl-tips-layout { display: grid; grid-template-columns: 1fr 390px; gap: 54px; border-top: 1px solid var(--line); padding-top: 34px; }
.rl-left-title { margin-left: 0; }
.rl-left-title::after { margin-left: 0; }
.rl-tip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rl-tip-image { display: block; aspect-ratio: 1.8 / 1; overflow: hidden; background: var(--soft); }
.rl-tip-body { padding: 14px 16px 17px; }
.rl-tip h3 { min-height: 48px; margin: 0 0 10px; font-size: 15px; line-height: 1.3; }
.rl-newsletter { align-self: start; min-height: 280px; border-radius: 8px; background: linear-gradient(145deg, #faf4ef, #f1e6dc); padding: 30px 32px; }
.rl-newsletter h2 { margin: 0 0 14px; font: 800 28px/1.12 var(--serif); }
.rl-newsletter p { margin-bottom: 24px; color: var(--muted); font-size: 14px; }

.rl-site-footer { border-top: 1px solid var(--line); background: #fffaf5; padding: 24px 0 30px; }
.rl-footer-grid { display: grid; grid-template-columns: 280px repeat(3, 1fr); gap: 50px; }
.rl-footer-brand img { width: 130px; }
.rl-footer-brand p, .rl-copyright { color: var(--muted); font-size: 13px; }
.rl-site-footer h2 { margin: 8px 0 10px; font: 800 14px var(--sans); }
.rl-footer-menu, .rl-footer-menu ul { margin: 0; padding: 0; list-style: none; }
.rl-footer-menu a { font-size: 13px; }

.rl-page-shell { min-height: 70vh; padding: 170px 0 70px; }
.rl-page-header { margin: 0 0 34px; text-align: center; }
.rl-page-header h1 { margin: 0; font-size: clamp(38px, 5vw, 58px); line-height: 1.08; }
.rl-archive-description { color: var(--muted); }
.rl-archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.navigation.pagination { margin-top: 35px; }
.nav-links { display: flex; justify-content: center; gap: 8px; }
.page-numbers { display: grid; min-width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.page-numbers.current, .page-numbers:hover { border-color: var(--red); background: var(--red); color: #fff; }

.rl-entry-header { margin-bottom: 30px; text-align: center; }
.rl-entry-header h1 { margin: 8px 0 12px; font-size: clamp(40px, 6vw, 68px); line-height: 1.05; }
.rl-entry-categories { color: var(--red); font-weight: 700; }
.rl-entry-meta { color: var(--muted); font-size: 14px; }
.rl-entry-image { overflow: hidden; margin-bottom: 34px; border-radius: 8px; }
.rl-entry-image img { width: 100%; }
.rl-entry-content { font-size: 18px; }
.rl-entry-content h2, .rl-entry-content h3 { margin-top: 1.7em; font-family: var(--serif); line-height: 1.2; }
.rl-entry-content a { color: var(--red); text-decoration: underline; }
.rl-entry-content blockquote { margin: 28px 0; border-left: 4px solid var(--red); padding: 5px 0 5px 24px; color: var(--muted); font-family: var(--serif); font-size: 22px; }
.rl-entry-footer { margin-top: 35px; border-top: 1px solid var(--line); padding-top: 18px; }
.rl-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 35px; border-block: 1px solid var(--line); padding: 22px 0; font-weight: 700; }
.rl-post-nav > div:last-child { text-align: right; }
.rl-comments { margin-top: 45px; }
.rl-comments h2, .comment-reply-title { font-family: var(--serif); }
.comment-list { padding-left: 24px; }
.comment-list li { margin-bottom: 24px; }
.comment-form input:not([type=submit]), .comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.comment-form .submit { border: 0; border-radius: 24px; background: var(--red); padding: 12px 24px; color: #fff; font-weight: 700; }

@media (max-width: 980px) {
  .rl-container { width: min(100% - 36px, 760px); }
  .rl-site-header { position: relative; background: var(--paper); }
  .rl-header-inner { grid-template-columns: 1fr; }
  .rl-brand img, .custom-logo { margin-inline: auto; }
  .rl-menu, .rl-nav { flex-wrap: wrap; gap: 16px; }
  .rl-search { width: min(100%, 380px); margin-inline: auto; }
  .rl-hero { min-height: 560px; padding: 80px 0; background: linear-gradient(180deg, rgba(255,253,249,.5), #fffdf9 85%), var(--rl-hero-image) center top / cover no-repeat; }
  .rl-category-grid { grid-template-columns: repeat(3, 1fr); }
  .rl-card-grid, .rl-archive-grid { grid-template-columns: repeat(2, 1fr); }
  .rl-tips-layout { grid-template-columns: 1fr; }
  .rl-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .rl-page-shell { padding-top: 70px; }
}

@media (max-width: 620px) {
  .rl-container { width: min(100% - 28px, 480px); }
  .rl-hero h1 { font-size: 44px; }
  .rl-category-grid, .rl-card-grid, .rl-archive-grid, .rl-tip-grid, .rl-footer-grid { grid-template-columns: 1fr; }
  .rl-category, .rl-category:first-child { min-height: 112px; border-left: 0; border-right: 0; border-bottom: 1px solid #ddcfc5; }
  .rl-card-title { min-height: auto; }
  .rl-post-nav { grid-template-columns: 1fr; }
  .rl-post-nav > div:last-child { text-align: left; }
}
