/*!
Theme Name: JFV
Theme URI: https://them.es/starter
Author: Javier Fernández
Author URI: https://jfv.es
Description: 
Version: 3.0.1
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.2
License: GPL version 2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0
Tags: custom-background, custom-colors, featured-images, flexible-header, microformats, post-formats, rtl-language-support, theme-options, translation-ready, accessibility-ready
Text Domain: jfv-theme
*/

/* ===== VARIABLES ===== */
:root {
  --primary-color: #101010;
  --secondary-color: #000000;
  --text-color: #333333;
  --text-light: #6b7280;
  --text-lighter: #dbdbdb;
  --text-white: #ffffff;
  --text-link: #6b7280;
  --text-link-hover: #000000;
  --bg-white: #ffffff;
  --bg-light: #f0f0f0;
  --shadow: 0 4px 6px -1px rgba(1,1,1,.15);
  --shadow-large: 0 30px 50px 0 rgba(1,1,1,.15);
  --transition: all 0.3s ease;
}

/* ===== ESTILOS GENERALES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
	font-family: 'Montserrat', sans-serif;
	background-color: var(--bg-light);
	color: var(--text-color);
}

img {
	max-width: 100%;
	height: auto;
}

p {
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

a {
	color: var(--text-link);
	text-decoration: none;
	transition: var(--transition);
}

a:hover,
a:focus {
	color: var(--text-link-hover);
}

/* Base común para todos los títulos */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Jerarquía tipográfica */
h1 {
  font-size: 2.2rem;
  font-weight: 700;
}

h2 {
  font-size: 2.1rem;
  font-weight: 600;
}

h3 {
  font-size: 1.7rem;
  font-weight: 500;
}

h4 {
  font-size: 1.5rem;
  font-weight: 500;
}

h5 {
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h6 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5em;
  line-height: 1.5;
}

/* ===== AJUSTES PARA WORDPRESS ===== */

.alignnone {
	margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
	display: block;
	margin: 5px auto 5px auto;
}

.alignright {
	float: right;
	margin: 5px 0 20px 20px;
}

.alignleft {
	float: left;
	margin: 5px 20px 20px 0;
}

a img.alignright {
	float: right;
	margin: 5px 0 20px 20px;
}

a img.alignnone {
	margin: 5px 20px 20px 0;
}

a img.alignleft {
	float: left;
	margin: 5px 20px 20px 0;
}

a img.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption {
	max-width: 96%; /* Image does not overflow the content area */
	padding: 5px 3px 10px;
	text-align: center;
}
.wp-caption.alignnone {
	margin: 5px 20px 20px 0;
}
.wp-caption.alignleft {
	margin: 5px 20px 20px 0;
}
.wp-caption.alignright {
	margin: 5px 0 20px 20px;
}
.wp-caption img {
	border: 0 none;
	height: auto;
	margin: 0;
	max-width: 98.5%;
	padding: 0;
	width: auto;
}
.wp-caption p.wp-caption-text {
	font-size: 11px;
	line-height: 17px;
	margin: 0;
	padding: 0 4px 5px;
}

.gallery-item {
	display: inline-block;
	text-align: left;
	vertical-align: top;
	width: 50%;
}

.gallery-item a,
.gallery-item a:hover,
.gallery-item a:focus {
	-webkit-box-shadow: none;
	box-shadow: none;
	background: none;
	display: inline-block;
	max-width: 100%;
}

.gallery-item a img {
	display: block;
	-webkit-transition: -webkit-filter 0.2s ease-in;
	transition: -webkit-filter 0.2s ease-in;
	transition: filter 0.2s ease-in;
	transition: filter 0.2s ease-in, -webkit-filter 0.2s ease-in;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

.gallery-item a:hover img,
.gallery-item a:focus img {
	-webkit-filter: opacity(60%);
	filter: opacity(60%);
}

.gallery-caption {
	display: block;
	text-align: left;
	padding: 0 10px 0 0;
	margin-bottom: 0;
}

.gallery-columns-1 .gallery-item {
	max-width: 100%;
}

.gallery-columns-2 .gallery-item {
	max-width: 50%;
}

.gallery-columns-3 .gallery-item {
	max-width: 33%;
}

.gallery-columns-4 .gallery-item {
	max-width: 25%;
}

.gallery-columns-5 .gallery-item {
	max-width: 20%;
}

.gallery-columns-6 .gallery-item {
	max-width: 16.66%;
}

.gallery-columns-7 .gallery-item {
	max-width: 14.28%;
}

.gallery-columns-8 .gallery-item {
	max-width: 12.5%;
}

.gallery-columns-9 .gallery-item {
	max-width: 11.11%;
}

.gallery-columns-6 .gallery-caption,
.gallery-columns-7 .gallery-caption,
.gallery-columns-8 .gallery-caption,
.gallery-columns-9 .gallery-caption {
	display: none;
}

.bypostauthor {
	font-weight: bold;
}

/* Text meant only for screen readers. */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	color: var(--primary-color);
	display: block;
	font-size: 14px;
	font-size: 0.875rem;
	font-weight: bold;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000; /* Above WP toolbar. */
}

/* Custom Styles */
.white {
  color: var(--text-white);
}
.black {
  color: var(--primary-color);
}
.gray {
  color: var(--text-light);
}
.light-gray {
  color: var(--text-lighter);
}
.primary {
  color: var(--primary-color);
}
.secondary {
  color: var(--secondary-color);
}

.lead {
  font-size: 1.35rem;
  font-weight: 400;
}

/* ===== HEADER ===== */
.modern-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary-color);
  box-shadow: var(--shadow-large);
  z-index: 1000;
  transition: var(--transition);
  padding-bottom: 15rem;
}

@media (max-width: 991.98px) {
  .modern-header {
    padding-bottom: 0;
  }
}

.modern-header.scrolled {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===== LOGO DESKTOP (arriba, centrado) ===== */
.modern-header .logo-container {
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0 1rem;
}

.modern-header .logo {
  text-decoration: none;
  display: inline-block;
}

.modern-header .logo img {
  height: 150px;
  width: auto;
  max-width: 100%;
}

.modern-header .logo-text {
  font-size: 2rem;
  font-weight: 700;
}

.modern-header .logo:hover .logo-text {
  transform: scale(1.05);
}

/* ===== NAVBAR ===== */
.modern-header  .navbar {
  padding: 0;
  background: none;
}

.modern-header .navbar-brand .logo-text {
  font-size: 1.5rem;
}

.modern-header .navbar-toggler {
  border: none;
  padding: 0.5rem;
}

.modern-header .navbar-toggler:focus {
  box-shadow: none;
}

/* Icono Hamburguesa Personalizado */
.modern-header .hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 26px;
}

.modern-header .hamburger-icon span {
  display: block;
  height: 3px;
  background: var(--text-lighter);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.modern-header .navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.modern-header .navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== MENÚ DESKTOP ===== */
@media (min-width: 992px) {
  .modern-header .navbar-nav {
    flex-direction: row;
    justify-content: center;
    width: 100%;
    gap: 2rem;
    padding: 1rem 0;
  }

  .modern-header .nav-link {
    color: var(--text-lighter);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
  }

  .modern-header .nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-white);
    transition: width 0.3s ease;
  }

  .modern-header .nav-link:hover,
  .modern-header .nav-link.active {
    color: var(--text-white);
  }

  .modern-header .nav-link:hover::after,
  .modern-header .nav-link.active::after {
    width: 100%;
  }
}

/* ===== MENÚ MOBILE FULLSCREEN ===== */
@media (max-width: 991.98px) {
  .modern-header .navbar {
    padding: 1rem 0;
  }

  .modern-header .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99;
  }

  .modern-header .navbar-collapse.show {
    opacity: 1;
    visibility: visible;
  }

  .modern-header .navbar-collapse.collapsing {
    opacity: 0;
    visibility: visible;
    transition: opacity 0.3s ease, height 0s;
    height: 100vh !important;
  }

  .modern-header .navbar-nav {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    text-align: center;
  }

  .modern-header .nav-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
  }

  .modern-header .navbar-collapse.show .nav-item:nth-child(1) {
    animation-delay: 0.1s;
  }
  .modern-header .navbar-collapse.show .nav-item:nth-child(2) {
    animation-delay: 0.2s;
  }
  .modern-header .navbar-collapse.show .nav-item:nth-child(3) {
    animation-delay: 0.3s;
  }
  .modern-header .navbar-collapse.show .nav-item:nth-child(4) {
    animation-delay: 0.4s;
  }
  .modern-header .navbar-collapse.show .nav-item:nth-child(5) {
    animation-delay: 0.5s;
  }

  .modern-header .nav-link {
    color: var(--text-color);
    font-size: 1.75rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: var(--transition);
  }

  .modern-header .nav-link:hover,
  .modern-header .nav-link.active {
    color: var(--primary-color);
    transform: scale(1.1);
  }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== AJUSTE DE CONTENIDO ===== */
main {
  margin-top: 140px;
}

@media (max-width: 991.98px) {
  main {
    margin-top: 70px;
  }
}

/* ===== MAIN CONTENT ===== */
#main {
  margin-top: 270px;
  margin-bottom: 100px;
}

.main-content {
	padding: 7.5rem 10rem;
	min-height: 80vh;
	box-shadow: var(--shadow-large);
  position: relative;
  background-color: var(--bg-white);
  z-index: 9999;
}

@media (max-width: 991.98px) {
  #main {
    margin-top: 82px;
  }
  .main-content {
  	padding: 2.5rem 5rem;
  }
}

@media (max-width: 460px) {
  .main-content {
  	padding: 1.5rem 2.5rem;
  }
}

.main-content .entry-title,
.main-content .post-title {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 1rem;
  text-transform: uppercase;
	color: var(--primary-color);
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.main-content .entry-header::after {
  border-bottom: 5px solid var(--text-light);
  content: "";
  display: block;
  margin: 1rem auto 2.5em auto;
  width: 60px;
}
.main-content .entry-meta {
  font-size: 0.9rem;
  margin-top: 0.9rem;
  margin-bottom: 0.9rem;
  letter-spacing: 1px;
  text-align: center;
}

.main-content .post-letter {
  line-height: 1.2;
  color: rgba(0,0,0,.07);
  z-index: 1;
  position: absolute;
  top: 50%;
  left: -9rem;
  -webkit-transform: translate(0,-50%);
  -ms-transform: translate(0,-50%);
  transform: translate(0,-50%);
  -moz-user-select: none;
  user-select: none;
  pointer-events: none;
  text-transform: uppercase;
}

.main-content .entry-content a {
  border-bottom: 2px solid var(--text-link);
}
.main-content .entry-content .social-links a {
  border-bottom: none;
}

.main-content .entry-footer {
  font-size: 0.9rem;
  margin-top: 4rem;
  margin-bottom: 0.9rem;
  letter-spacing: 1px;
  text-align: left;
}
.main-content .entry-footer p {
  line-height: 1.5;
  margin-bottom: 1rem;
}

.main-content .post-navigation-wrapper::before {
  border-bottom: 5px solid var(--text-light);
  content: "";
  display: block;
  margin: 3.5rem auto 2.5em auto;
  width: 60px;
}

.main-content .post-navigation a {
  color: var(--primary-color);
}
.main-content .post-navigation .nav-previous,
.main-content .post-navigation .nav-next {
  width: 45%;
}

.main-content .post-navigation .nav-previous {
  text-align: left;
}
.main-content .post-navigation .nav-next {
  text-align: right;
}

.main-content .post-navigation .nav-previous .arrow {
  float: left;
  position: relative;
  margin-right: 5px;
}
.main-content .post-navigation .nav-next .arrow {
  float: right;
  position: relative;
  margin-left: 5px;
}

.main-content .post-navigation .meta-nav {
  display: block;
  font-size: .9em;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== MAIN INDEX LOOP ===== */
.card {
  border: none;
  margin-bottom: 2.5rem;
}
.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-transform: uppercase;
}
.card-title a {
  color: var(--primary-color);
}
header.card-body {
  padding-bottom: 0;
}
.card-text {
  text-align: left !important;
}
.card-body .entry-meta {
  text-align: left;
}
.card-body .card-more {
  margin-top: 1.5rem;
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  transition: var(--transition);
  border-bottom: 2px solid var(--text-link);
}


/* ===== FOOTER ===== */
#footer {
	background-color: var(--primary-color);
	color: var(--text-lighter);
	padding: 40px 0;
	margin-top: 60px;
}
#footer a {
	color: var(--text-lighter);
	text-decoration: none;
}
#footer a:hover,
#footer a:focus,
#footer .menu-item a[aria-current="page"] {
	color: var(--text-white);
}

/* ===== COMMENTS ===== */
.comments-area {
  margin-top: 2.5rem !important;
}
.comments-area::before {
  border-bottom: 5px solid var(--text-light);
  content: "";
  display: block;
  margin: 1rem auto 2.5em auto;
  width: 60px;
}
.comments-area #comments-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  text-transform: uppercase;
}


/* ===== PAGINACIÓN ===== */
.pagination-nav {
  display: flex;
  justify-content: center;
  margin: 2.5rem 0 2.5rem 0;
}

.pagination {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.pagination li {
  display: inline;
}

.pagination a,
.pagination span {
  display: inline-block;
  min-width: 40px;
  padding: 0.5rem 1rem;
  margin: 0 2px;
  border-radius: 0px;
  background: var(--bg-light);
  color: var(--primary-color);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border: 1px solid var(--text-light);
}

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

.pagination .prev,
.pagination .next {
  font-weight: 700;
  text-transform: uppercase;
}

.pagination .dots {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: default;
}

/* ===== FORMULARIOS ===== */
.form-control,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--text-light);
  border-radius: 0px;
  background: var(--bg-white);
  color: var(--primary-color);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.no-results {
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
}
.search-form .btn {
  margin-bottom: 1.5rem;
}
.btn-secondary {
  --bs-btn-color: var(--text-white);
  --bs-btn-bg: var(--primary-color);
  --bs-btn-border-color: var(--primary-color);
  --bs-btn-hover-color: var(--text-white);
  --bs-btn-hover-bg: var(--secondary-color);
  --bs-btn-hover-border-color: var(--secondary-color);
  --bs-btn-active-color: var(--text-white);
  --bs-btn-active-bg: var(--secondary-color);
  --bs-btn-active-border-color: var(--secondary-color);
  --bs-btn-disabled-color: var(--text-white);
  --bs-btn-disabled-bg: var(--primary-color);
  --bs-btn-disabled-border-color: var(--primary-color);
  border-radius: 0px;
  min-width: 200px;
}

/* ===== TARJETAS DE SUBPÁGINAS ===== */
.subpages-list .card {
  border: 1px solid var(--bg-light);
  border-radius: 0px;
  transition: box-shadow 0.2s, border-color 0.2s;
  background: var(--bg-white);
  overflow: hidden;
}
.subpages-list .card:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 12px 32px -4px rgba(16,16,16,0.18);
}
.subpages-list .card-img-top {
  width: auto;
  max-width: 100%;
  margin-bottom: 1rem;
}
.subpages-list .card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  color: var(--primary-color);
}
.subpages-list .card-text {
  color: var(--text-light);
}