/* ==================================================
   BLOG.CSS - Estilos completos para blog.html
   Diseño basado en las capturas - Tarjetas organizadas
   ================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

.blog-page {
  font-family: 'Nunito', sans-serif;
  background: #e6f2ff;
  color: #333;
  line-height: 1.6;
  padding-top: 72px;
}

/* ===== HEADER ===== */
.blog-header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.blog-header .header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 14px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.blog-header .header-logo img { max-height: 50px; width: auto; display: block; }
.blog-header .main-nav > ul { display: flex; list-style: none; gap: 4px; }
.blog-header .main-nav > ul > li { display: flex; align-items: center; }
.blog-header .main-nav a {
  padding: 8px 16px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
}
.blog-header .main-nav a:hover { color: #ffd166; }
.blog-header .dropdown { position: relative; }
.blog-header .dropdown .arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}
.blog-header .dropdown:hover .arrow { transform: rotate(180deg); }
.blog-header .dropdown-content {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 10px;
  overflow: hidden;
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-header .dropdown:hover .dropdown-content { display: block !important; }
.blog-header .dropdown-content li { border-bottom: 1px solid #eee; }
.blog-header .dropdown-content li:last-child { border-bottom: none; }
.blog-header .dropdown-content a { display: block; padding: 12px 18px; }
.blog-header .header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.blog-header .phone {
  font-weight: 600;
  color: #444;
  font-size: 0.95rem;
}
.blog-header .login {
  background: #4a90e2;
  color: #fff;
  padding: 8px 18px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}
.blog-header .login:hover { background: #3a7bc8; }
.blog-header .menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #333;
}

/* ===== HERO DEL BLOG ===== */
.blog-hero {
  position: relative;
  padding: 64px 24px 56px;
  text-align: center;
  overflow: hidden;
}

.blog-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e6f2ff 0%, #d4e8ff 40%, rgba(255, 209, 102, 0.15) 100%);
  z-index: 0;
}

.blog-paw {
  position: absolute;
  width: 70px;
  opacity: 0.12;
  z-index: 1;
  pointer-events: none;
}
.blog-paw-1 { top: 18%; left: 8%; transform: rotate(-15deg); }
.blog-paw-2 { bottom: 20%; right: 10%; transform: rotate(12deg); }

.blog-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}

.blog-badge {
  display: inline-block;
  background: #ffd166;
  color: #333;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.blog-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #333;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.blog-hero-sub {
  font-size: 1.1rem;
  color: #555;
  font-weight: 500;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.blog-main {
  padding: 0 24px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== GRID DE POSTS - DISEÑO DE TARJETAS ===== */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 40px 0;
}

.blog-post-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(74,144,226,0.15);
}

.post-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-date {
  font-size: 0.9rem;
  color: #4a90e2;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-excerpt {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.read-more-btn {
  background: none;
  border: 2px solid #4a90e2;
  color: #4a90e2;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
  margin-top: auto;
}

.read-more-btn:hover {
  background: #4a90e2;
  color: white;
}

/* ===== MODAL PARA POST COMPLETO ===== */
.blog-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.blog-modal.active {
  display: flex;
}

.blog-modal-content {
  background: white;
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10;
  line-height: 1;
}

.blog-modal-close:hover {
  color: #4a90e2;
}

.blog-post-full {
  padding: 40px;
}

.modal-featured-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 30px;
}

.modal-date {
  font-size: 0.95rem;
  color: #4a90e2;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
}

.modal-content p {
  margin-bottom: 1.5rem;
}

.no-posts {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px;
  font-size: 1.2rem;
  color: #666;
}

/* ===== FOOTER ===== */
.blog-footer {
  background: #e3ecfc;
  color: #333;
  padding: 48px 24px 28px;
  text-align: center;
}

.blog-footer .footer-content {
  max-width: 800px;
  margin: 0 auto 24px;
}

.blog-footer .footer-info p {
  margin: 6px 0;
  font-size: 1rem;
  font-weight: 500;
}

.blog-footer .footer-info a {
  color: #4a90e2;
  text-decoration: none;
}
.blog-footer .footer-info a:hover { text-decoration: underline; }

.blog-footer .social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.blog-footer .social img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.blog-footer .social a:hover img {
  transform: translateY(-4px) scale(1.08);
}

.blog-footer .copyright {
  margin-top: 24px;
  padding-top: 20px;
  font-size: 0.9rem;
  color: #555;
  border-top: 1px solid rgba(51,51,51,0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .blog-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-page { padding-top: 64px; }
  
  .blog-header .header-container { padding: 10px 20px; }
  .blog-header .main-nav { display: none; }
  .blog-header .main-nav.active {
    display: block;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .blog-header .main-nav.active > ul {
    flex-direction: column;
    align-items: center;
  }
  .blog-header .menu-toggle { display: block; }
  .blog-header .header-right { gap: 10px; }
  .blog-header .phone { font-size: 0.85rem; }
  .blog-header .login { padding: 6px 12px; font-size: 0.85rem; }
  
  .blog-hero { padding: 48px 20px 40px; }
  .blog-main { padding: 0 16px 60px; }
  
  .blog-posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .blog-post-full {
    padding: 30px 20px;
  }
  
  .modal-featured-img {
    max-height: 250px;
  }
  
  .blog-modal-close {
    top: 15px;
    right: 20px;
    font-size: 35px;
  }
}

@media (max-width: 480px) {
  .blog-hero h1 { font-size: 1.9rem; }
  .post-title { font-size: 1.2rem; }
  .post-excerpt { font-size: 0.95rem; }
  .modal-content { font-size: 1rem; }
  .blog-footer .social { gap: 15px; }
  .blog-footer .social img { width: 35px; height: 35px; }
}
