/*
Theme Name: Graceful Flow Modern
Theme URI: https://example.com/graceful-flow-modern
Author: Lethuan 
Description: Tema moderno (blanco, azul y gris) con banner, rejilla de artículos y sidebar editable.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: graceful-flow-modern
*/

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f8fafc; /* Gris muy claro de fondo para resaltar las tarjetas */
  color: #1e293b; /* Color de texto más suave y moderno */
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* Header / Banner */
.site-header {
  background: linear-gradient(135deg, #4b6d91, #6c8eb2); /* Más claro y más azul */
  color: white;
  text-align: center;
  position: relative;
}

.top-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #3e5165; /* Gris azulado (Steel/Slate Blue) */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10000;
}

.site-branding {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.site-title-link {
  color: white;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.site-title-link:hover {
  text-decoration: none;
  opacity: 0.92;
}

.site-slogan {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: 0.1px;
}

.header-image-container {
  width: 100%;
  overflow: hidden;
  display: block;
}

.header-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.container {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 2.2fr 0.8fr; /* Ajuste leve de proporciones */
  gap: 28px;
}

/* Grid de artículos en home */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0; /* Borde más suave */
  padding: 22px;
  border-radius: 12px; /* Esquinas más redondeadas y premium */
  box-shadow: 0 4px 18px rgba(15, 34, 58, 0.03); /* Sombra muy sutil */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(15, 34, 58, 0.06);
}

.card h3 { 
  margin-bottom: 12px; 
  font-size: 18px; 
  font-weight: 600; 
  color: #0f172a; /* Color pizarra oscuro profesional */
  letter-spacing: -0.3px;
  line-height: 1.4;
}
.card p { 
  color: #475569; /* Gris oscuro para el extracto */
  font-size: 14px; 
  line-height: 1.6;
}

.sidebar {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 18px rgba(15, 34, 58, 0.03);
}

.widget-title { 
  font-size: 14px; 
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: 0.8px; 
  margin-bottom: 16px; 
  color: #475569; 
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.site-footer {
  background: #f1f5f9;
  padding: 24px 16px;
  text-align: center;
  margin-top: 48px;
  color: #64748b;
  font-size: 13px;
  border-top: 1px solid #e2e8f0;
}

/* Botón menú móvil (oculto en desktop) */
.mobile-menu-toggle {
  display: none;
}

/* Responsivo */
@media (max-width: 860px) {
  .container { grid-template-columns: 1fr; position: relative; margin-top: 15px; }
  
  /* Mostrar botón en móvil */
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10100;
  }
  .mobile-menu-toggle .bar {
    width: 100%;
    height: 2.5px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  /* Animación de Hamburguesa a X */
  .mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Barra lateral convertida en menú desplegable */
  .sidebar {
    display: none;
    position: fixed;
    top: 48px; /* Debajo de la barra de navegación */
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #ffffff;
    padding: 30px 24px;
    z-index: 9999;
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-bottom: 4px solid #3e5165;
    border-radius: 0;
    margin-bottom: 0;
    overflow-y: auto;
  }
  
  .sidebar.active {
    display: block;
    animation: slideDown 0.22s ease-out forwards;
  }
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Enlaces */
a { color: #3e5165; text-decoration: none; font-weight: 500; transition: color 0.15s ease; }
a:hover { color: #56697d; text-decoration: underline; }

/* Estilos de navegación en la barra lateral */
.sidebar nav ul {
  list-style: none;
  padding-left: 0;
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
}

.sidebar nav ul li {
  margin-bottom: 4px;
}

.sidebar nav ul li a {
  display: block;
  padding: 10px 14px;
  color: #334155;
  text-decoration: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar nav ul li a:hover {
  background-color: #f1f5f9;
  color: #3e5165;
  text-decoration: none;
}

/* Ocultar el widget de búsqueda de Gutenberg en la barra lateral */
.sidebar .wp-block-search__inside-wrapper {
  display: none !important;
}

/* Ocultar la etiqueta "Buscar" del widget de búsqueda de Gutenberg en la barra lateral */
.sidebar .wp-block-search__label {
  display: none !important;
}

@media (max-width: 480px) {
  .site-header {
    padding: 0;
  }
  .header-image {
    border-radius: 0;
  }
}
