/*
Theme Name: FAP Blog
Theme URI: https://freeanimationpower.org
Author: Eduardo Fierro Duque
Description: Tema corporativo del blog de Free Animation Power. Diseno premium con la identidad visual del ecosistema FAP.
Version: 1.0
License: GPL v3
Text Domain: fap-blog
*/

/* =============================================
   GOOGLE FONTS
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* =============================================
   ROOT VARIABLES — MISMO SISTEMA DE DISENO
   ============================================= */
:root {
  --yellow:   #ffdc00;
  --yellow2:  #ffe94d;
  --yellow3:  #ffe066;
  --yellow4:  #fff3b3;
  --ink:      #070706;
  --ink2:     #1a1a1a;
  --ink3:     #333333;
  --white:    #ffffff;
  --cream:    #fefcf0;
  --warm:     #faf6e8;
  --border:   #ede4c0;
  --border2:  #e8dca0;
  --muted:    #6b6500;
  --muted2:   #938c00;
  --accent:   #ff4200;
  --success:  #1a7730;
  --error:    #cc2200;

  --radius-sm:  10px;
  --radius:     18px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--yellow);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--yellow);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Decorative dot background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(7,7,6,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.site-wrap {
  position: relative;
  z-index: 1;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.25rem, 3vw, 2rem); margin-bottom: 0.5rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
h4 { font-size: 1rem; margin-bottom: 0.4rem; }

p {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
  transition: all 0.2s var(--ease-out);
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

strong { color: var(--ink); font-weight: 700; }
em { color: var(--muted2); }

code {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  background: var(--warm);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--ink2);
}

pre {
  background: var(--ink);
  color: var(--yellow);
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--warm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--muted);
}

ul, ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

li { margin-bottom: 0.4rem; }

hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.88rem;
}

table th {
  background: var(--ink);
  color: var(--yellow);
  padding: 10px 14px;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

table tr:hover td {
  background: var(--warm);
}

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 220, 0, 0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-logo:hover { color: var(--ink); text-decoration: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink3);
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}

.header-nav a:hover {
  background: var(--yellow4);
  color: var(--ink);
  text-decoration: none;
}

.header-nav .btn-home {
  background: var(--ink);
  color: var(--yellow);
  font-weight: 700;
}

.header-nav .btn-home:hover {
  background: var(--ink2);
  color: var(--yellow);
}

/* Mobile nav */
.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--border2);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  color: var(--ink);
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.site-main {
  padding: 2.5rem 0 5rem;
}

/* Blog listing page */
.page-title {
  text-align: center;
  padding: 2rem 0 3rem;
}

.page-title .eyebrow {
  display: inline-block;
  background: var(--ink);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-title h1 {
  margin-bottom: 0.5rem;
}

.page-title p {
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Post card (listing) */
.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  border: 2px solid var(--border);
  transition: all 0.3s var(--ease-out);
}

.post-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(7,7,6,0.08);
}

.post-card .post-category {
  display: inline-block;
  background: var(--warm);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.post-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.post-card h2 a {
  text-decoration: none;
  color: var(--ink);
}

.post-card h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-card .post-excerpt {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0;
}

.post-card .post-meta {
  display: flex;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--muted2);
  margin-top: 0.75rem;
}

/* =============================================
   SINGLE POST
   ============================================= */
.single-post-wrap {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  border: 2px solid var(--border);
  margin-bottom: 2rem;
}

.single-post-wrap .post-category {
  display: inline-block;
  background: var(--warm);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.single-post-wrap .post-date {
  font-size: 0.75rem;
  color: var(--muted2);
  margin-bottom: 0.5rem;
}

.single-post-wrap .entry-content {
  margin-top: 1.25rem;
}

.single-post-wrap .entry-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.single-post-wrap .entry-content h2 {
  margin-top: 2rem;
}

.single-post-wrap .entry-content h3 {
  margin-top: 1.5rem;
}

.single-post-wrap .entry-content p {
  margin-bottom: 1.25rem;
}

/* Post navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.post-navigation a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}

.post-navigation a:hover {
  border-color: var(--ink);
  background: var(--warm);
  text-decoration: none;
}

/* =============================================
   APP LINK BOX (inset in posts)
   ============================================= */
.app-link-box {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-link-box .box-text {
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
}

.app-link-box .box-text strong {
  color: var(--yellow);
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 12px 28px;
  transition: all 0.2s var(--ease-out);
  user-select: none;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--ink);
  color: var(--yellow);
  font-weight: 800;
}

.btn-primary:hover {
  background: var(--ink2);
  color: var(--yellow);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(7,7,6,0.12);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border2);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: var(--warm);
  text-decoration: none;
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
}

.btn-accent:hover {
  background: #e63900;
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,66,0,0.25);
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2rem;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 50px;
  background: var(--white);
  border: 1.5px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}

.pagination .page-numbers.current {
  background: var(--ink);
  color: var(--yellow);
  border-color: var(--ink);
}

.pagination .page-numbers:hover {
  background: var(--warm);
  text-decoration: none;
}

.pagination .page-numbers.current:hover {
  background: var(--ink);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--ink);
  padding: 4rem 0 2rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring);
}

.footer-brand p {
  color: rgba(255,255,255,0.35);
  font-size: 0.78rem;
  line-height: 1.8;
}

.footer-brand p strong {
  color: var(--yellow);
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-col-label {
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  font-family: 'Outfit', sans-serif;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s var(--ease-out);
}

.footer-links a:hover {
  color: var(--yellow);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
  padding-top: 3rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .site-main { padding: 1.5rem 0 3rem; }

  .single-post-wrap {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    gap: 2rem;
  }

  .header-nav a {
    padding: 6px 12px;
    font-size: 0.72rem;
  }
}

@media (max-width: 600px) {
  .header-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 4px;
    box-shadow: 0 8px 30px rgba(7,7,6,0.08);
  }

  .header-nav.open a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
}
