/* =========================================
   LEARCORP - ESTILOS DEL BLOG
   ========================================= */
:root {
  --brand-green: #00a88f;
  --brand-green-hover: #008f7a;
  --text-main: #222222;
  --text-muted: #666666;
  --bg-body: #ffffff;
  --bg-light: #f9f9f9;
  --border-color: #e5e5e5;
  --font-family: 'Open Sans', sans-serif;
  --transition: all 0.2s ease-in-out;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  color: var(--text-main); background: var(--bg-body);
  font-family: var(--font-family); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container { width: min(1200px, 90%); margin: auto; }

/* Navbar */
.navbar {
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 100;
}
.nav-content {
  display: flex; justify-content: space-between;
  align-items: center; height: 70px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 24px; color: var(--text-main);
}
.brand img { height: 40px; object-fit: contain; }
.nav-tools { display: flex; align-items: center; gap: 20px; }

.search-header { position: relative; display: flex; align-items: center; }
.search-header input {
  width: 200px; padding: 8px 35px 8px 15px;
  border: 1px solid var(--border-color); border-radius: 20px;
  font-size: 14px; outline: none; transition: var(--transition);
}
.search-header input:focus { border-color: var(--brand-green); width: 250px; }
.search-icon { position: absolute; right: 12px; color: #999; font-size: 16px; pointer-events: none; }

.btn-account {
  background: var(--brand-green); color: white;
  padding: 10px 20px; border-radius: 4px;
  font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  transition: var(--transition);
}
.btn-account:hover { background: var(--brand-green-hover); }

/* Page header */
.page-header { padding: 40px 0; text-align: center; }
.breadcrumbs {
  text-align: left; font-size: 13px;
  color: var(--text-muted); margin-bottom: 30px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 5px; }
.page-title { font-size: 40px; font-weight: 700; margin-bottom: 15px; color: var(--text-main); }
.page-subtitle { font-size: 18px; color: var(--text-muted); max-width: 800px; margin: 0 auto; }

/* Blog */
.blog-section { padding: 20px 0 80px; }
.filters {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 10px; margin-bottom: 40px;
}
.filter {
  background: transparent; border: 1px solid var(--border-color);
  color: var(--text-main); padding: 8px 18px;
  border-radius: 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.filter:hover { border-color: var(--brand-green); color: var(--brand-green); }
.filter.active { background: var(--brand-green); border-color: var(--brand-green); color: white; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.post-card {
  background: white; display: flex; flex-direction: column;
  border: none; cursor: pointer;
}
.post-image {
  width: 100%; height: 200px; border-radius: 8px;
  overflow: hidden; margin-bottom: 20px; background: #f0f0f0;
}
.post-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.post-card:hover .post-image img { transform: scale(1.05); }
.post-title {
  font-size: 20px; font-weight: 700; line-height: 1.4;
  margin-bottom: 15px; color: var(--text-main); transition: var(--transition);
}
.post-card:hover .post-title { color: var(--brand-green); }
.post-excerpt {
  font-size: 15px; color: var(--text-muted); margin-bottom: 20px;
  flex-grow: 1; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.read-more {
  color: var(--brand-green); font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 5px;
}
.read-more svg { width: 14px; height: 14px; transition: transform 0.2s; }
.post-card:hover .read-more svg { transform: translateX(4px); }
.no-results {
  display: none; text-align: center;
  padding: 40px; color: var(--text-muted); grid-column: 1 / -1;
}

/* Modal */
.article-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.article-modal.open { opacity: 1; visibility: visible; }
.modal-container {
  background: var(--bg-body); border-radius: 8px;
  max-width: 820px; width: 100%; max-height: 90vh;
  overflow-y: auto; padding: 40px 50px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(20px);
  transition: transform 0.3s ease; position: relative;
}
.article-modal.open .modal-container { transform: translateY(0); }
.modal-close {
  position: absolute; top: 20px; right: 20px;
  background: var(--bg-light); border: none;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); z-index: 10;
}
.modal-close:hover { background: var(--border-color); color: var(--text-main); }
.modal-category {
  color: var(--brand-green); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 10px; display: block;
}
.modal-title {
  font-size: 32px; font-weight: 700;
  color: var(--text-main); line-height: 1.3; margin-bottom: 15px;
}
.modal-meta {
  color: var(--text-muted); font-size: 13px;
  margin-bottom: 20px; display: flex; gap: 15px; align-items: center;
}

/* Compartir */
.share-buttons {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 25px; padding-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
}
.share-buttons span {
  font-size: 14px; font-weight: 600;
  color: var(--text-muted); margin-right: 5px;
}
.btn-share {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: white; transition: var(--transition);
  cursor: pointer; border: none;
}
.btn-share svg { width: 18px; height: 18px; fill: currentColor; }
.btn-share.whatsapp { background: #25D366; }
.btn-share.whatsapp:hover { background: #128C7E; transform: translateY(-2px); }
.btn-share.facebook { background: #1877F2; }
.btn-share.facebook:hover { background: #0d5bbd; transform: translateY(-2px); }
.btn-share.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.btn-share.instagram:hover { opacity: 0.9; transform: translateY(-2px); }

.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-main); color: white;
  padding: 12px 24px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0; transition: all 0.3s ease; z-index: 2000;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Modal content */
.modal-body h3 { font-size: 22px; color: var(--text-main); margin: 30px 0 15px; font-weight: 700; }
.modal-body p { margin-bottom: 18px; color: #444; font-size: 16px; line-height: 1.7; }
.modal-body ul, .modal-body ol { margin: 15px 0 20px 20px; color: #444; }
.modal-body li { margin-bottom: 10px; }
.modal-body blockquote {
  background: var(--bg-light); border-left: 4px solid var(--brand-green);
  padding: 20px; margin: 25px 0; font-style: italic; color: #444;
}
.modal-body blockquote p { margin: 0; }

.seo-answer-box {
  background-color: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-left: 5px solid var(--brand-green);
  padding: 20px; border-radius: 6px; margin-bottom: 25px;
}
.seo-answer-box p {
  margin: 0; font-size: 16px; color: #115e59;
  font-weight: 600; line-height: 1.6;
}
.story-intro {
  font-size: 17px; font-weight: 600; color: var(--text-main);
  margin-bottom: 25px; line-height: 1.7;
  border-left: 3px solid var(--brand-green); padding-left: 15px;
}
.modal-body a.internal-link {
  color: var(--brand-green); font-weight: 700;
  text-decoration: underline; cursor: pointer;
}
.modal-body a.internal-link:hover { color: var(--brand-green-hover); }

/* Footer */
footer {
  background: var(--bg-light); padding: 40px 0;
  border-top: 1px solid var(--border-color);
  font-size: 14px; color: var(--text-muted);
}
.footer-content {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 20px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--brand-green); }

/* Responsive */
@media (max-width: 1024px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 850px) {
  .page-title { font-size: 32px; }
  .modal-container { padding: 30px; }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .search-header input { width: 150px; }
  .search-header input:focus { width: 180px; }
  .btn-account span { display: none; }
  .modal-title { font-size: 24px; }
  .footer-content { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .share-buttons { flex-wrap: wrap; }
}