/* ==========================================================================
   LAYOUT.CSS — Header, Footer, Blog (PHP templates)
   Parrilla Julve Child Theme
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES Y CONTENEDOR
   ========================================================================== */

.pj-container {
  max-width: 1236px;
  margin: 0 auto;
  padding: 0 15px;
}

.pj-page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.pj-main-content {
  flex: 1;
}


/* ==========================================================================
   2. HEADER TOP BAR
   ========================================================================== */

.pj-header-top {
  border-bottom: 1px solid #e7e7e7;
  background: transparent;
  min-height: 40px;
}

.pj-header-top .pj-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 7px;
  padding-bottom: 7px;
  gap: 15px;
}

.pj-top-info {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.pj-top-info li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #999;
}

.pj-top-info li i {
  font-size: 1.2em;
  color: #999;
}

.pj-top-info a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s;
}

.pj-top-info a:hover {
  color: var(--pj-link-blue, #3467ef);
}

.pj-btn-cita {
  display: inline-block;
  background: var(--pj-primary, #192b55);
  color: #fff !important;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  padding: 10px 22px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.3s;
  border: none;
  cursor: pointer;
}

.pj-btn-cita:hover {
  background: #142242;
  color: #fff !important;
}


/* ==========================================================================
   3. HEADER PRINCIPAL
   ========================================================================== */

#pj-header {
  background: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s, padding 0.3s;
}

#pj-header.pj-scrolled {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

#pj-header .pj-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* --- Logo --- */
.pj-logo {
  display: block;
  flex-shrink: 0;
}

.pj-logo-img {
  max-width: 200px;
  height: auto;
  display: block;
  transition: max-width 0.3s;
}

#pj-header.pj-scrolled .pj-logo-img {
  max-width: 140px;
}

/* --- Área derecha del header --- */
.pj-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.pj-nav-extras {
  display: flex;
  align-items: center;
  gap: 12px;
}


/* ==========================================================================
   4. NAVEGACIÓN PRINCIPAL
   ========================================================================== */

.pj-main-menu {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 0;
}

.pj-main-menu > li {
  position: relative;
}

.pj-main-menu > li > a.pj-menu-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 38px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
  text-transform: capitalize;
  color: var(--pj-primary, #192b55);
  text-decoration: none;
  transition: color 0.3s;
  white-space: nowrap;
}

#pj-header.pj-scrolled .pj-main-menu > li > a.pj-menu-link {
  padding-top: 24px;
  padding-bottom: 24px;
}

.pj-main-menu > li > a.pj-menu-link:hover,
.pj-main-menu > li > a.pj-menu-link.active,
.pj-main-menu > li.current-menu-item > a.pj-menu-link,
.pj-main-menu > li.current-menu-ancestor > a.pj-menu-link {
  color: var(--pj-accent, #efac97);
}

.pj-menu-arrow {
  font-size: 10px;
  transition: transform 0.3s;
}

.pj-main-menu > li:hover .pj-menu-arrow {
  transform: rotate(180deg);
}

/* --- Submenú --- */
.pj-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 230px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 200;
  border-top: 2px solid var(--pj-primary, #192b55);
}

.pj-submenu li {
  position: relative;
}

.pj-submenu a.pj-menu-link {
  display: block;
  padding: 9px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 12.8px;
  font-weight: 400;
  line-height: 1.4;
  color: #000;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.pj-submenu a.pj-menu-link:hover,
.pj-submenu li.current-menu-item > a.pj-menu-link {
  background: var(--pj-primary, #192b55);
  color: var(--pj-accent, #efac97);
}

/* Sub-submenú */
.pj-submenu .pj-submenu {
  left: 100%;
  top: 0;
  border-top: none;
  border-left: 2px solid var(--pj-primary, #192b55);
}

.pj-main-menu > li:hover > .pj-submenu,
.pj-submenu li:hover > .pj-submenu {
  display: block;
}


/* ==========================================================================
   5. EXTRAS DEL HEADER (Buscador, Idioma, Mobile Toggle)
   ========================================================================== */

.pj-lang-switcher select {
  border: 1px solid #ddd;
  padding: 4px 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  background: #fff;
}

.pj-search-toggle,
.pj-mobile-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--pj-primary, #192b55);
  padding: 5px;
  transition: color 0.3s;
}

.pj-search-toggle:hover,
.pj-mobile-toggle:hover {
  color: var(--pj-accent, #efac97);
}

.pj-mobile-toggle {
  display: none;
}

/* --- Buscador desplegable --- */
.pj-search-popup {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 12px 0;
  box-shadow: 0 5px 20px rgba(0,0,0,0.07);
}

.pj-search-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0;
}

.pj-search-form input[type="search"] {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #eee;
  border-right: none;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #555;
  background: #f7f7f7;
  outline: none;
}

.pj-search-form button {
  padding: 10px 18px;
  background: var(--pj-primary, #192b55);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.pj-search-form button:hover {
  background: #142242;
}


/* ==========================================================================
   6. MENÚ MÓVIL
   ========================================================================== */

.pj-mobile-nav {
  background: #fff;
  border-top: 1px solid #e7e7e7;
  padding: 15px 0;
}

.pj-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pj-mobile-menu li a.pj-menu-link {
  display: block;
  padding: 10px 15px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--pj-primary, #192b55);
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.3s;
}

.pj-mobile-menu li a.pj-menu-link:hover,
.pj-mobile-menu li.current-menu-item > a.pj-menu-link {
  color: var(--pj-accent, #efac97);
}

.pj-mobile-menu .pj-submenu {
  display: none;
  position: static;
  box-shadow: none;
  border: none;
  background: #f9f9f9;
  padding: 0;
}

.pj-mobile-menu .pj-submenu.pj-open {
  display: block;
}

.pj-mobile-menu .pj-submenu a.pj-menu-link {
  padding-left: 30px;
  font-size: 13px;
  font-weight: 400;
}


/* ==========================================================================
   7. PAGE TOP / BREADCRUMBS
   ========================================================================== */

.pj-page-top {
  background-color: var(--pj-accent, #efac97);
  padding: 20px 0;
}

.pj-page-top .pj-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pj-page-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.1875rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 0;
  padding: 0;
}

.pj-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}

.pj-breadcrumb a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

.pj-breadcrumb a:hover {
  opacity: 1;
  color: #fff;
}

.pj-breadcrumb-sep {
  opacity: 0.7;
  font-size: 11px;
}

.pj-breadcrumb span {
  font-weight: 600;
}


/* ==========================================================================
   8. FOOTER
   ========================================================================== */

.pj-footer {
  background-color: var(--pj-secondary, #0e152f);
  color: #777;
}

.pj-footer-main {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 3.25rem 0 1rem;
}

.pj-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.pj-footer-logo-img {
  max-width: 200px;
  height: auto;
  margin-bottom: 15px;
}

.pj-footer .pj-footer-col h4,
.pj-footer .pj-footer-col .widget-title {
  font-size: 1.4em;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}

.pj-footer-menu,
.pj-footer-legal {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pj-footer-menu li,
.pj-footer-legal li {
  margin-bottom: 8px;
  line-height: 24px;
}

.pj-footer-menu a,
.pj-footer-legal a {
  color: #fff;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.3s;
}

.pj-footer-menu a:hover,
.pj-footer-legal a:hover {
  color: var(--pj-accent, #efac97);
}

.pj-footer-bottom {
  padding: 1rem 0;
  text-align: center;
}

.pj-footer-bottom p {
  font-size: 0.875rem;
  color: #777;
  margin: 0;
}

.pj-footer-logos-bar {
  background: #fff;
  padding: 1.5rem 0;
}

.pj-footer-logos-bar .pj-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.pj-footer-logos-bar img {
  max-height: 50px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.pj-footer-logos-bar img:hover {
  opacity: 1;
}


/* ==========================================================================
   9. BLOG TEMPLATES (archive.php / single.php)
   ========================================================================== */

.pj-blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  padding: 3rem 0;
}

.pj-blog-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.pj-post-card {
  background: #fff;
  box-shadow: 0 30px 90px rgba(0,0,0,0.08);
  overflow: hidden;
}

.pj-post-card .pj-post-img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  display: block;
}

.pj-post-card .pj-post-img-placeholder {
  width: 100%;
  height: 290px;
  background: #f4f4f4;
}

.pj-post-card .pj-post-body {
  padding: 1.5rem;
}

.pj-post-meta {
  display: inline-block;
  font-size: 0.8em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: #777;
}

.pj-post-meta + .pj-post-meta {
  border-left: 1px solid #ccc;
  padding-left: 10px;
  margin-left: 4px;
}

.pj-post-meta a {
  color: #777;
  text-decoration: none;
}

.pj-post-title {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0.75rem 0 0.5rem;
  line-height: 1.4;
}

.pj-post-title a {
  color: var(--pj-heading-color, #0e152f);
  text-decoration: none;
  transition: color 0.3s;
}

.pj-post-title a:hover {
  color: var(--pj-primary, #192b55);
}

.pj-post-excerpt {
  font-size: 14px;
  line-height: 26px;
  color: #555;
  margin-bottom: 1rem;
}

.pj-read-more-link {
  color: var(--pj-link-blue, #3467ef) !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  text-transform: uppercase;
}

.pj-read-more-link:hover {
  text-decoration: underline;
}

/* --- Paginación del Blog --- */
.pj-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  line-height: 1;
  background: #fff;
  border: 1px solid #dee2e6;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50%;
  margin: 0 3px;
  color: var(--pj-primary, #192b55);
  text-decoration: none;
  transition: all 0.3s;
}

.pj-pagination .page-numbers:hover,
.pj-pagination .page-numbers.current {
  background: var(--pj-primary, #192b55);
  border-color: var(--pj-primary, #192b55);
  color: #fff;
}

.pj-pagination {
  text-align: center;
  margin-top: 2rem;
}

.pj-pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

/* --- Sidebar Blog --- */
.pj-blog-sidebar {
  /* sticky sidebar */
}

.pj-widget {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.pj-widget:last-child {
  border-bottom: none;
}

.pj-widget .widget-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--pj-secondary, #0e152f);
}

/* --- Post single --- */
.pj-single-article {
  background: #fff;
  box-shadow: 0 30px 90px rgba(0,0,0,0.08);
  padding: 1.5rem;
}

.pj-single-article .pj-post-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

.pj-single-article .pj-post-content {
  font-size: 14px;
  line-height: 26px;
  color: #333;
}

.pj-single-article .pj-post-content h2,
.pj-single-article .pj-post-content h3,
.pj-single-article .pj-post-content h4 {
  color: var(--pj-secondary, #0e152f);
  margin: 1.5rem 0 0.75rem;
}

.pj-single-article .pj-post-content ul,
.pj-single-article .pj-post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.pj-single-article .pj-post-content ul li,
.pj-single-article .pj-post-content ol li {
  margin-bottom: 5px;
}


/* ==========================================================================
   10. RESPONSIVE
   ========================================================================== */

@media (max-width: 1265px) {
  .pj-header-top .pj-header-top-left {
    display: none;
  }
}

@media (max-width: 991px) {
  .pj-nav { display: none; }
  .pj-mobile-toggle { display: block; }
  .pj-blog-layout { grid-template-columns: 1fr; }
  .pj-footer-grid { grid-template-columns: 1fr 1fr; }
  .pj-page-top .pj-container { flex-direction: column; align-items: flex-start; }
  .pj-breadcrumb { display: none; }
}

@media (max-width: 767px) {
  .pj-logo-img { max-width: 140px; }
  .pj-footer-grid { grid-template-columns: 1fr; gap: 25px; }
  .pj-page-title { font-size: 1.6rem; }
  .pj-top-info li:not(:first-child) { display: none; }
}

@media (max-width: 575px) {
  .pj-header-top { display: none; }
  .pj-container { padding: 0 12px; }
}
