/*
Theme Name: EP GeneratePress Child
Theme URI: https://elplanteo.com
Description: El Planteo child theme based on GeneratePress. Mobile-first, no AMP. ACF Flexible Content compatible.
Author: El Planteo
Author URI: https://elplanteo.com
Template: generatepress
Version: 1.1.0
Text Domain: ep-generatepress-child
*/

/* =============================================
   TOKENS
   ============================================= */
:root {
    --green:       #3d8b37;
    --green-dark:  #2a6125;
    --green-light: #e8f5e2;
    --black:       #0d0d0d;
    --gray-900:    #111111;
    --gray-800:    #1e1e1e;
    --gray-700:    #2e2e2e;
    --gray-500:    #666666;
    --gray-300:    #bbbbbb;
    --gray-100:    #f4f4f4;
    --white:       #ffffff;
    --border:      #e8e8e8;
    --radius:      6px;
    --font-sans:   'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-serif:  'Georgia', 'Times New Roman', serif;
    --max-w:       1200px;
    --content-w:   760px;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-800);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color .15s; }
a:hover { color: var(--green-dark); }

/* =============================================
   HEADER
   ============================================= */
.ep-header {
    background: var(--black);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 3px solid var(--green);
}
.ep-header-top {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 20px;
}
.ep-logo a, .ep-logo {
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.ep-logo img { height: 34px; width: auto; }
.ep-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
    overflow: hidden;
}
.ep-nav a {
    color: var(--gray-300);
    font-family: var(--font-sans);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 6px 9px;
    border-radius: 3px;
    white-space: nowrap;
    text-decoration: none;
    transition: color .15s, background .15s;
}
.ep-nav a:hover { color: var(--white); background: var(--gray-700); }
.ep-nav .ep-subscribe {
    background: var(--green);
    color: var(--white);
    padding: 7px 14px;
    border-radius: 4px;
    margin-left: 6px;
}
.ep-nav .ep-subscribe:hover { background: var(--green-dark); }
.ep-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 32px;
}
.ep-hamburger span { display: block; height: 2px; background: var(--white); border-radius: 2px; }
.ep-mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--gray-900);
    border-top: 1px solid var(--gray-700);
    padding: 8px 0;
}
.ep-mobile-nav.is-open { display: flex; }
.ep-mobile-nav a {
    color: var(--gray-300);
    font-family: var(--font-sans);
    font-size: .875rem;
    font-weight: 600;
    padding: 12px 24px;
    border-bottom: 1px solid var(--gray-800);
    text-decoration: none;
}
.ep-mobile-nav a:hover { color: var(--white); background: var(--gray-800); }
.ep-mobile-nav .ep-subscribe { color: var(--green); }

/* =============================================
   LAYOUT SHELL
   ============================================= */
.ep-wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.ep-main { padding: 36px 0 56px; }

/* =============================================
   LABELS
   ============================================= */
.ep-label {
    font-family: var(--font-sans);
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--white);
    background: var(--green);
    padding: 3px 8px;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 8px;
    text-decoration: none;
}
.ep-label:hover { background: var(--green-dark); color: var(--white); }
.ep-section-heading {
    font-family: var(--font-sans);
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-500);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--black);
    margin-bottom: 24px;
}

/* =============================================
   HERO
   ============================================= */
.ep-hero { margin-bottom: 48px; }
.ep-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    border-radius: var(--radius);
    overflow: hidden;
}
.ep-hero-item {
    position: relative;
    overflow: hidden;
    background: var(--black);
    aspect-ratio: 16/10;
}
.ep-hero-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .78;
    transition: opacity .4s, transform .4s;
}
.ep-hero-item:hover img { opacity: .65; transform: scale(1.02); }
.ep-hero-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 28px 24px 24px;
    background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
}
.ep-hero-title {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 6px 0 8px;
    letter-spacing: -.3px;
}
.ep-hero-title a { color: var(--white); text-decoration: none; }
.ep-hero-title a:hover { text-decoration: underline; text-decoration-color: var(--green); }
.ep-hero-meta {
    font-family: var(--font-sans);
    font-size: .72rem;
    color: rgba(255,255,255,.65);
}
.ep-hero-meta a { color: rgba(255,255,255,.85); }

/* =============================================
   HOME BODY
   ============================================= */
.ep-home-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
}
.ep-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
}
.ep-card { display: flex; flex-direction: column; }
.ep-card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--gray-100);
    margin-bottom: 12px;
}
.ep-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}
.ep-card:hover .ep-card-thumb img { transform: scale(1.04); }
.ep-card-title {
    font-family: var(--font-sans);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--black);
    margin: 6px 0 6px;
    letter-spacing: -.2px;
}
.ep-card-title a { color: inherit; text-decoration: none; }
.ep-card-title a:hover { color: var(--green); }
.ep-card-meta {
    font-family: var(--font-sans);
    font-size: .68rem;
    color: var(--gray-500);
    margin-top: 6px;
}

/* Sidebar */
.ep-sidebar { border-left: 1px solid var(--border); padding-left: 32px; }
.ep-sidebar-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    align-items: start;
}
.ep-sidebar-item:first-of-type { padding-top: 0; }
.ep-sidebar-item:last-of-type { border-bottom: none; }
.ep-sidebar-thumb {
    aspect-ratio: 3/2;
    overflow: hidden;
    border-radius: 3px;
    background: var(--gray-100);
}
.ep-sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-sidebar-title {
    font-family: var(--font-sans);
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--black);
}
.ep-sidebar-title a { color: inherit; text-decoration: none; }
.ep-sidebar-title a:hover { color: var(--green); }

/* =============================================
   SINGLE ARTICLE
   ============================================= */
.ep-single-wrap {
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 40px 24px 64px;
}
.ep-single-kicker {
    font-family: var(--font-sans);
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--green);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ep-single-kicker::after {
    content: '';
    display: block;
    flex: 1;
    height: 1px;
    background: var(--border);
}
.ep-single-title {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -.5px;
    color: var(--black);
    margin-bottom: 20px;
}
.ep-single-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: .78rem;
    color: var(--gray-500);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.ep-single-meta a { color: var(--gray-800); font-weight: 600; }
.ep-single-meta .sep { color: var(--gray-300); }

/* Share */
.ep-share { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.ep-share a {
    font-family: var(--font-sans);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 7px 14px;
    border-radius: 3px;
    color: var(--white);
    text-decoration: none;
    transition: opacity .15s;
}
.ep-share a:hover { opacity: .85; }
.ep-share-fb { background: #1877f2; }
.ep-share-tw { background: #000; }
.ep-share-wa { background: #25d366; }
.ep-share-tg { background: #0088cc; }

/* Hero image */
.ep-single-hero {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 36px;
}

/* Content blocks */
.single-content-block { margin-bottom: 28px; }
.single-content-block h2 {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--black);
    margin: 36px 0 16px;
    letter-spacing: -.3px;
    line-height: 1.3;
}
.single-content-block h3 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 28px 0 14px;
}
.content-text-block { font-size: 1.05rem; line-height: 1.82; color: var(--gray-800); }
.content-text-block p { margin-bottom: 22px; }
.content-text-block a { color: var(--green); text-decoration: underline; text-decoration-color: transparent; }
.content-text-block a:hover { text-decoration-color: var(--green); }
.content-text-block strong a { color: var(--green); }
.content-text-block hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.content-cita-block {
    border-left: 4px solid var(--green);
    padding: 18px 24px;
    background: var(--green-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 32px 0;
}
.content-cita-block h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.55;
}
.credito-imagen {
    font-family: var(--font-sans);
    font-size: .72rem;
    color: var(--gray-500);
    margin-top: 6px;
    font-style: italic;
}
.iframe-out {
    position: relative;
    padding-top: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--black);
}
.iframe-out iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.lazy-video-wrapper { border-radius: var(--radius); overflow: hidden; }
.ep-ad-inline {
    background: var(--gray-100);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    font-family: var(--font-sans);
    font-size: .75rem;
    color: var(--gray-500);
    margin: 24px 0;
}

/* Author block */
.ep-author-block {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    border-top: 2px solid var(--black);
    border-bottom: 1px solid var(--border);
    margin: 40px 0 32px;
}
.ep-author-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ep-author-name { font-family: var(--font-sans); font-size: .85rem; font-weight: 700; color: var(--black); }
.ep-author-name a { color: inherit; }
.ep-author-name a:hover { color: var(--green); }

/* Article footer */
.ep-article-footer {
    font-family: var(--font-sans);
    font-size: .82rem;
    color: var(--gray-500);
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 32px;
}
.ep-article-footer p { margin-bottom: 8px; }
.ep-article-footer a { color: var(--green); }
.ep-support-btn {
    display: inline-block;
    background: var(--green);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: .82rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius);
    margin: 16px 0;
    text-decoration: none;
    transition: background .15s;
}
.ep-support-btn:hover { background: var(--green-dark); color: var(--white); }

/* =============================================
   ARCHIVE
   ============================================= */
.ep-archive-header { padding: 32px 0 28px; border-bottom: 3px solid var(--black); margin-bottom: 36px; }
.ep-archive-title { font-family: var(--font-sans); font-size: 2rem; font-weight: 900; color: var(--black); letter-spacing: -.5px; }
.ep-archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; margin-bottom: 48px; }
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 16px 0; }
.nav-links a, .nav-links span {
    font-family: var(--font-sans);
    font-size: .8rem;
    font-weight: 700;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all .15s;
}
.nav-links a:hover { background: var(--green); color: var(--white); border-color: var(--green); }
.nav-links .current { background: var(--black); color: var(--white); border-color: var(--black); }

/* =============================================
   FOOTER
   ============================================= */
.ep-footer { background: var(--gray-900); color: var(--gray-300); padding: 48px 0 28px; font-family: var(--font-sans); }
.ep-footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.ep-footer-logo { font-size: 1.25rem; font-weight: 900; text-transform: uppercase; color: var(--white); letter-spacing: -.3px; display: block; margin-bottom: 20px; }
.ep-footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--gray-700); }
.ep-footer-nav a { color: var(--gray-300); font-size: .78rem; font-weight: 500; text-decoration: none; transition: color .15s; }
.ep-footer-nav a:hover { color: var(--white); }
.ep-footer-copy { font-size: .72rem; color: var(--gray-500); line-height: 1.6; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 960px) {
    .ep-home-body { grid-template-columns: 1fr; }
    .ep-sidebar { border-left: none; padding-left: 0; border-top: 2px solid var(--black); padding-top: 32px; }
    .ep-archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .ep-nav { display: none; }
    .ep-hamburger { display: flex; }
    .ep-hero-grid { grid-template-columns: 1fr; }
    .ep-hero-item { aspect-ratio: 16/9; }
    .ep-hero-title { font-size: 1.1rem; }
    .ep-hero-content { padding: 16px; }
    .ep-card-grid { grid-template-columns: 1fr; }
    .ep-archive-grid { grid-template-columns: 1fr; }
    .ep-single-title { font-size: 1.55rem; }
    .ep-single-wrap { padding: 24px 16px 48px; }
}
@media (max-width: 420px) {
    .ep-header-top { padding: 0 16px; }
    .ep-wrap { padding: 0 16px; }
    .ep-single-title { font-size: 1.35rem; }
}

/* =============================================
   GP OVERRIDES
   ============================================= */
.inside-header, .main-navigation, #site-header, .site-header,
#site-footer, .site-footer, .generate-back-to-top { display: none !important; }
body { background: var(--white) !important; }
