/*
Theme Name: Cassinelli Blog
Theme URI: https://cassinelli.com
Description: Tema de blog inspirado en el diseño de Cassinelli. Layout moderno con hero, grid de cards y navegación por categorías.
Version: 1.0.0
Author: Cassinelli
Text Domain: cassinelli-blog
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
*/

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

:root {
  --blue: #0060B9;
  --blue-dark: #004A8F;
  --navy: #0A1628;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --gray-900: #0B1B3A;
  --radius: 12px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08);
  --transition: 0.25s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER / NAVBAR ===== */
.site-header {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-logo img { height: 40px; width: auto; }
.site-logo .site-title {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Nav */
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a, .main-nav li a {
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background var(--transition);
  list-style: none;
}
.main-nav li { list-style: none; }
.main-nav a:hover, .main-nav li a:hover { background: rgba(255,255,255,0.15); }
.main-nav .current-menu-item a,
.main-nav .current-cat a { background: rgba(255,255,255,0.2); }

/* CTA button - outline style */
.cta-button {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 10px 28px;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,0.7);
  transition: all var(--transition);
}
.cta-button:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* ===== HERO ===== */
.blog-hero {
  text-align: center;
  padding: 64px 24px 48px;
}
.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.blog-hero p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== BLOG GRID ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 80px;
}

/* Featured (first) post */
.post-card { position: relative; border-radius: var(--radius); overflow: hidden; transition: box-shadow var(--transition), transform var(--transition); }
.post-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

.post-card.featured {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
}
.post-card.featured .post-thumb { height: 380px; overflow: hidden; }
.post-card.featured .post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.post-card.featured:hover .post-thumb img { transform: scale(1.03); }
.post-card.featured .post-info { padding: 24px; }
.post-card.featured .post-title { font-size: 1.25rem; color: var(--blue); }

/* Regular cards */
.post-card.regular {
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
}
.post-card.regular .post-thumb { height: 200px; overflow: hidden; }
.post-card.regular .post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.post-card.regular:hover .post-thumb img { transform: scale(1.03); }
.post-card.regular .post-info { padding: 20px; }

.post-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  background: #E6F0FA;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.post-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.35;
}

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 0 0 64px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  font-weight: 600; font-size: 0.9375rem; transition: all var(--transition);
}
.pagination a { background: var(--gray-100); color: var(--gray-800); }
.pagination a:hover { background: var(--blue); color: var(--white); }
.pagination .current { background: var(--blue); color: var(--white); }

/* ===== FOOTER ===== */
.site-footer {
  background: #484848;
  color: var(--white);
  padding: 48px 0 28px;
  text-align: center;
}
.site-footer a { color: var(--white); }
.footer-brand { margin-bottom: 20px; }
.footer-logo img { height: 44px; width: auto; display: inline-block; }
.footer-title { color: var(--white); font-size: 1.75rem; font-weight: 700; letter-spacing: 0.08em; }
.footer-social {
  display: flex; justify-content: center; gap: 18px;
  list-style: none; margin: 0 0 28px; padding: 0;
}
.footer-social li { list-style: none; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--white);
  color: #484848;
  transition: opacity var(--transition);
}
.footer-social a:hover { opacity: 0.75; }
.footer-social svg { width: 16px; height: 16px; }
.footer-divider {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.25);
  max-width: 100%;
  margin: 0 0 20px;
}
.footer-copy { color: var(--white); font-size: 18px; margin: 0; }

/* ===== SINGLE POST ===== */
.single-featured-image { max-width: 1200px; margin: 32px auto 0; border-radius: var(--radius); overflow: hidden; }
.single-featured-image img { width: 100%; max-height: 520px; object-fit: cover; }
.single-post-header { max-width: 800px; margin: 0 auto; padding: 40px 24px 24px; text-align: center; }
.single-post-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin: 12px 0 20px; line-height: 1.2; }
.single-post-header .post-category { margin-bottom: 0; }
.post-author { color: var(--gray-900); font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.post-date { color: var(--gray-600); font-size: 0.9375rem; }
.post-meta { color: var(--gray-600); font-size: 0.9375rem; }
.post-content { max-width: 720px; margin: 0 auto; padding: 0 24px 80px; font-size: 1.0625rem; line-height: 1.8; color: var(--gray-800); }
.post-content h2, .post-content h3 { margin: 40px 0 16px; color: var(--gray-900); }
.post-content p { margin-bottom: 24px; }
.post-content img { border-radius: var(--radius); margin: 32px 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.active {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--blue); padding: 16px 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .menu-toggle { display: block; }
  .blog-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-column: span 1; grid-row: span 1; }
  .post-card.featured .post-thumb { height: 260px; }
  .blog-hero { padding: 40px 24px 32px; }
}
