/*
Theme Name: GeneratePress Child - Juristes Locals
Template: generatepress
Version: 1.1
Description: Child theme personalitzat per a Juristes Locals
Author: Barbara ML
Text Domain: generatepress-child
*/

@import url("../generatepress/style.css");

/* ========================================
   VARIABLES CSS - PALETA DE COLORS
   ======================================== */
:root {
  --jl-primary: #CC0000;
  --jl-secondary: #F59E0B;
  --jl-dark: #1F1F1F;
  --jl-gray-dark: #4A4A4A;
  --jl-gray-medium: #9CA3AF;
  --jl-gray-light: #F3F4F6;
  --jl-white: #FFFFFF;
}

/* ========================================
   TIPOGRAFIA GLOBAL
   ======================================== */
body {
  color: var(--jl-gray-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========================================
   TÍTOLS GLOBALS (Manté vermell per a títols de seccions principals)
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--jl-primary);
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* ========================================
   TÍTOLS DE PÀGINES I ENTRADES (NEGRE)
   ======================================== */
/* Títol principal de l'entrada/pàgina */
.page-title,
.post-title,
.entry-title,
h1.page-title,
h1.post-title,
h1.entry-title {
  color: var(--jl-dark) !important;
}

/* Títols dins el contingut de l'entrada */
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
  color: var(--jl-dark) !important;
}

/* ========================================
   TÍTOLS DEL BLOG - CARDS (NEGRE)
   ======================================== */
/* Títols en llistats de blog */
.blog-post-card h3,
.post-list h3,
.post-grid h3,
.post-card h3,
article h3,
.wp-block-post-title {
  color: var(--jl-dark) !important;
}

/* Enllaços amb títols de blog */
.blog-post-card h3 a,
.post-list h3 a,
.post-grid h3 a,
.post-card h3 a,
article h3 a,
.entry-title a {
  color: var(--jl-dark) !important;
}

.blog-post-card h3 a:hover,
.post-list h3 a:hover,
.post-grid h3 a:hover,
.post-card h3 a:hover,
article h3 a:hover,
.entry-title a:hover {
  color: var(--jl-primary);
  text-decoration: underline;
}

/* ========================================
   PARÀGRAFS
   ======================================== */
p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--jl-gray-dark);
}

/* ========================================
   ENLLAÇOS
   ======================================== */
a {
  color: var(--jl-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--jl-secondary);
  text-decoration: underline;
}

/* ========================================
   BOTONS
   ======================================== */
.button,
button,
input[type="button"],
input[type="submit"],
.wp-block-button__link,
a.button {
  background-color: var(--jl-primary) !important;
  color: var(--jl-white) !important;
  padding: 0.875rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  border: 2px solid var(--jl-primary) !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
a.button:hover {
  background-color: #E31C23 !important;
  border-color: #E31C23 !important;
}

/* ========================================
   BOTONS SECUNDARIS
   ======================================== */
.button.secondary,
.button-secondary {
  background-color: var(--jl-secondary) !important;
  border-color: var(--jl-secondary) !important;
}

.button.secondary:hover,
.button-secondary:hover {
  background-color: #e89e0b !important;
  border-color: #e89e0b !important;
}

/* ========================================
   HEADER / NAVEGACIÓ
   ======================================== */
.site-header {
  background-color: var(--jl-white);
  border-bottom: 2px solid var(--jl-gray-light);
}

.site-title a {
  color: var(--jl-dark);
  font-weight: 700;
}

.site-title a:hover {
  color: var(--jl-primary);
}

.main-navigation a {
  color: var(--jl-gray-dark);
  font-weight: 500;
  transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a.current,
.main-navigation a.active {
  color: var(--jl-primary);
  border-bottom: 2px solid var(--jl-primary);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background-color: var(--jl-dark) !important;
  color: var(--jl-white) !important;
  padding: 3rem 0 1rem;
}

.site-footer a {
  color: var(--jl-secondary);
}

.site-footer a:hover {
  color: var(--jl-white);
  text-decoration: underline;
}

.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6 {
  color: var(--jl-secondary) !important;
}

/* ========================================
   FOOTER - WIDGETS (SOLUCIÓ)
   ======================================== */

/* Títols dels widgets al footer */
.site-footer .widget-title,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6 {
  color: #FFFFFF !important;
  border-bottom-color: #F59E0B !important;
}

/* Text dels widgets */
.site-footer .widget {
  color: #FFFFFF !important;
}

.site-footer .widget p {
  color: #FFFFFF !important;
}

/* Enllaços dels widgets */
.site-footer .widget a,
.site-footer .widget-content a,
.site-footer a {
  color: #FFFFFF !important;
  text-decoration: none;
}

.site-footer .widget a:hover,
.site-footer a:hover {
  color: #F59E0B !important;
  text-decoration: underline;
}

/* Llistes dins widgets */
.site-footer .widget ul li,
.site-footer .widget ol li {
  color: #FFFFFF !important;
}

.site-footer .widget ul li a,
.site-footer .widget ol li a {
  color: #FFFFFF !important;
}

.site-footer .widget ul li a:hover,
.site-footer .widget ol li a:hover {
  color: #F59E0B !important;
}

/* Separador del widget */
.site-footer .widget ul li {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

/* Categories widget */
.site-footer .widget_categories a,
.site-footer .widget_categories ul li a {
  color: #FFFFFF !important;
}

.site-footer .widget_categories a:hover,
.site-footer .widget_categories ul li a:hover {
  color: #F59E0B !important;
}

/* Recent posts widget */
.site-footer .widget_recent_entries a,
.site-footer .widget_recent_entries ul li a {
  color: #FFFFFF !important;
}

.site-footer .widget_recent_entries a:hover,
.site-footer .widget_recent_entries ul li a:hover {
  color: #F59E0B !important;
}

/* Archives widget */
.site-footer .widget_archive a,
.site-footer .widget_archive ul li a {
  color: #FFFFFF !important;
}

.site-footer .widget_archive a:hover,
.site-footer .widget_archive ul li a:hover {
  color: #F59E0B !important;
}

/* Meta widget */
.site-footer .widget_meta a,
.site-footer .widget_meta ul li a {
  color: #FFFFFF !important;
}

.site-footer .widget_meta a:hover,
.site-footer .widget_meta ul li a:hover {
  color: #F59E0B !important;
}

/* Calendar widget */
.site-footer .widget_calendar {
  color: #FFFFFF !important;
}

.site-footer .widget_calendar a {
  color: #FFFFFF !important;
}

.site-footer .widget_calendar a:hover {
  color: #F59E0B !important;
}

/* Search widget */
.site-footer .widget_search input,
.site-footer .widget_search button {
  color: #FFFFFF !important;
}

.site-footer .search-form input[type="search"] {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #FFFFFF !important;
}

.site-footer .search-form button {
  background-color: #F59E0B !important;
  color: #FFFFFF !important;
}

/* Text widget */
.site-footer .widget_text,
.site-footer .widget_text p {
  color: #FFFFFF !important;
}

.site-footer .widget_text a {
  color: #FFFFFF !important;
}

.site-footer .widget_text a:hover {
  color: #F59E0B !important;
}

/* Nav menu widget */
.site-footer .widget_nav_menu a {
  color: #FFFFFF !important;
}

.site-footer .widget_nav_menu a:hover {
  color: #F59E0B !important;
}

/* Custom HTML widget */
.site-footer .widget_custom_html {
  color: #FFFFFF !important;
}

.site-footer .widget_custom_html a {
  color: #FFFFFF !important;
}

.site-footer .widget_custom_html a:hover {
  color: #F59E0B !important;
}

/* ========================================
   SECCIONS AMB FONS
   ======================================== */
.section-light,
.bg-light {
  background-color: var(--jl-gray-light) !important;
  padding: 3rem 2rem;
}

.section-dark,
.bg-dark {
  background-color: var(--jl-dark) !important;
  color: var(--jl-white) !important;
  padding: 3rem 2rem;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6,
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.bg-dark h5,
.bg-dark h6 {
  color: var(--jl-secondary) !important;
}

/* ========================================
   DESTACATS / CALLOUTS
   ======================================== */
.highlight,
.highlight-box {
  background-color: rgba(204, 0, 0, 0.05);
  border-left: 4px solid var(--jl-primary);
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 2px;
}

.highlight strong {
  color: var(--jl-primary);
}

/* ========================================
   LLISTATS
   ======================================== */
ul, ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

ul li::marker {
  color: var(--jl-primary);
  font-weight: bold;
}

ol li::marker {
  color: var(--jl-primary);
  font-weight: bold;
}

/* ========================================
   TAULES
   ======================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: var(--jl-white);
}

table th {
  background-color: var(--jl-primary);
  color: var(--jl-white);
  padding: 1rem;
  font-weight: 700;
  text-align: left;
  border-bottom: 2px solid var(--jl-dark);
}

table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--jl-gray-light);
}

table tr:hover {
  background-color: var(--jl-gray-light);
}

/* ========================================
   FORMULARIS
   ======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--jl-gray-medium);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--jl-primary);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--jl-gray-dark);
}

/* ========================================
   BLOCKQUOTE
   ======================================== */
blockquote {
  border-left: 4px solid var(--jl-secondary);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background-color: var(--jl-gray-light);
  font-style: italic;
  color: var(--jl-gray-dark);
}

blockquote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: var(--jl-primary);
  margin-top: 0.5rem;
}

/* ========================================
   WORDPRESS BLOCKS
   ======================================== */
.wp-block-heading {
  color: var(--jl-primary);
}

.wp-block-heading h2,
.wp-block-heading h3,
.wp-block-heading h4,
.wp-block-heading h5,
.wp-block-heading h6 {
  color: var(--jl-dark) !important;
}

.wp-block-button__link {
  background-color: var(--jl-primary) !important;
}

.wp-block-separator {
  border-top: 2px solid var(--jl-secondary);
  margin: 2rem 0;
}

.wp-block-quote {
  border-left-color: var(--jl-secondary);
}

/* ========================================
   BADGES / TAGS
   ======================================== */
.badge,
.tag {
  display: inline-block;
  background-color: var(--jl-primary);
  color: var(--jl-white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.badge.secondary {
  background-color: var(--jl-secondary);
}

/* ========================================
   WIDGETS
   ======================================== */
.widget {
  margin-bottom: 2rem;
}

.widget-title {
  color: var(--jl-primary);
  border-bottom: 2px solid var(--jl-secondary);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.widget a {
  color: var(--jl-primary);
}

.widget a:hover {
  color: var(--jl-secondary);
}

/* ========================================
   PAGINACIÓ
   ======================================== */
.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem;
  border: 1px solid var(--jl-gray-light);
  border-radius: 4px;
  color: var(--jl-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
  background-color: var(--jl-primary);
  color: var(--jl-white);
  border-color: var(--jl-primary);
}

/* ========================================
   UTILITATS
   ======================================== */
.text-primary {
  color: var(--jl-primary) !important;
}

.text-secondary {
  color: var(--jl-secondary) !important;
}

.text-dark {
  color: var(--jl-dark) !important;
}

.bg-primary {
  background-color: var(--jl-primary) !important;
  color: var(--jl-white) !important;
}

.bg-secondary {
  background-color: var(--jl-secondary) !important;
  color: var(--jl-white) !important;
}

.border-primary {
  border-color: var(--jl-primary) !important;
}

.border-secondary {
  border-color: var(--jl-secondary) !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .button,
  button,
  input[type="button"],
  input[type="submit"] {
    width: 100%;
    padding: 1rem;
  }
}