/* Homepage Styles */


/* Body and main layout */
body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  margin: 0;
  padding: 0;
  padding-top: 110px; /* Increased for safer margin */
  /* Account for fixed header */
}

/* Container definition moved to common.css */

/* ================================================
   HERO SECTION - ELIMINADO (CLEAN ARCHITECTURE)
   ================================================
   
   ✅ TODOS los estilos de hero ahora en:
      /assets/css/components/hero.css
      
   ✅ Sin duplicación
   ✅ Reutilización máxima
   ✅ Consistencia total
   
   NOTA: hero.css incluye:
   - .hero, .hero-grid, .hero-description
   - .hero-cta, .hero-image, .hero-title
   - Responsive para todos los tamaños
   
   ================================================ */

/* ================================================
   BOTONES - ELIMINADO (CLEAN ARCHITECTURE)
   ================================================
   
   ✅ TODOS los estilos de botones ahora en:
      /assets/css/components/buttons.css
      
   ✅ Sin duplicación
   ✅ Reutilización máxima
   ✅ Consistencia total
   
   NOTA: Este archivo solo debe tener estilos
   específicos de LAYOUT del homepage, NO de botones.
   
   ================================================ */

/* Sections - Base styles en sections.css */

/* ELIMINADO: Ahora manejado por typography-utilities.css
   Sistema context-aware con Clean Architecture
   Elimina !important innecesarios y conflictos de especificidad
*/

.bg-light {
  background-color: var(--color-bg-light);
}

/* Estilos específicos para feature cards (contenido) */
.feature-card {
  text-align: center;
  padding: 2.5rem;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
  transition: color 0.3s ease;
}

.feature-card:hover .feature-title {
  color: var(--color-accent);
}

.feature-description {
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: var(--spacing-lg);
}

.feature-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--color-accent);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-cta {
  opacity: 1;
  transform: translateY(0);
}

.feature-cta:hover {
  background: var(--color-accent);
  color: var(--color-background);
}

.feature-cta i {
  transition: transform 0.3s ease;
}

.feature-cta:hover i {
  transform: translateX(2px);
}

/* Posts Grid - Estilo Moderno Squarespace Full Width */
/* .posts-section width and layout now handled in carousel.css (Clean Architecture) */

#features {
  padding: 6rem 0 4rem; /* Increased top padding */
  margin-top: -1px; /* Overlap slightly to prevent sub-pixel gaps */
  background-color: #000000; /* Force Absolute Black */
}

/* Flechas de navegación */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev {
  left: 1rem;
}

.carousel-arrow.next {
  right: 1rem;
}

.carousel-arrow i {
  color: rgba(0, 0, 0, 0.7);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.carousel-arrow:hover i {
  color: rgba(0, 0, 0, 0.9);
}

/* HOMEPAGE POSTS CAROUSEL - PROTEGIDO */
.homepage .posts-grid,
#posts-container.posts-grid {
  display: flex !important;
  overflow-x: auto !important;
  gap: 2.5rem !important;
  scroll-behavior: smooth !important;
}

.homepage .posts-grid::-webkit-scrollbar,
#posts-container.posts-grid::-webkit-scrollbar {
  display: none !important;
}

/* Indicadores de navegación modernos estilo Squarespace */
.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
}

.carousel-dot::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.carousel-dot.active {
  background: var(--color-text-primary);
  transform: scale(1.3);
}

.carousel-dot.active::before {
  background: rgba(0, 0, 0, 0.1);
}

.carousel-dot:hover {
  background: var(--color-text-secondary);
  transform: scale(1.1);
}

/* ================================================
   POST CARDS - USANDO ESTILOS UNIFICADOS
   ================================================
   ✅ Todos los estilos base en: /assets/css/components/cards.css
   ✅ Solo agregamos comportamiento específico del carousel
   ================================================ */

.homepage .post-card,
#posts-container .post-card {
  /* Resto de estilos heredados de cards-unified.css (Clean Architecture) */
  flex-shrink: 0;
}

/* Eliminamos los overlays para un look más limpio como Squarespace */

/* Scrollbar personalizado para el carousel */
.posts-grid::-webkit-scrollbar {
  height: 8px;
}

.posts-grid::-webkit-scrollbar-track {
  background: var(--color-background-light);
  border-radius: 4px;
}

.posts-grid::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.posts-grid::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* ================================================
   CATEGORY CARDS - ELIMINADO (CLEAN ARCHITECTURE)
   ================================================
   
   ❌ PROBLEMA: Selectores #categories-container con ID
      tenían MAYOR especificidad que .category-card-large
      
   ✅ SOLUCIÓN: TODO en components/cards.css
      - Sin selectores de ID
      - Sin !important
      - Especificidad natural
      
   ✅ Cards ahora son 100% consistentes
   
   ================================================ */

/* ================================================
   HOVER ELIMINADO - USA cards.css
   ================================================
   ✅ Hover consistente: translateY(-2px)
   ✅ Sin efectos ::before complejos
   ✅ Minimalista y profesional
   ================================================ */

/* ================================================
   POST CARDS - COMPLETAMENTE ELIMINADO
   ================================================
   
   ✅ TODOS los estilos ahora en: 
      /assets/css/components/cards.css
      
   ✅ Sin overrides
   ✅ Sin duplicación
   ✅ Clean Architecture total
   
   NOTA: Este archivo solo debe tener estilos
   específicos de LAYOUT del homepage, NO de cards.

/* post-excerpt heredado de cards.css */

/* Post meta definition moved to unified section above */

/* Loading States */
.loading-state {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-light);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  /* Hero responsive - heredado de hero.css */

  .section {
    padding: 2rem 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .features-grid,
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  /* Hero mobile - heredado de hero.css */

  .btn {
    width: 100%;
    max-width: 280px;
  }
}