/*
Theme Name: Kodelr
Theme URI: https://kodelr.com/
Author: Kodelr
Author URI: https://kodelr.com/
Description: Tema minimalista limpio inspirado en el diseño moderno, enfocado en contenido y simplicidad.
Version: 2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kodelr
Tags: minimal, clean, modern, white, content-focused
*/

/* ===========================
   RESET Y BASE
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #37352f;
  background: #ffffff;
  font-size: 16px;
}

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

/* ===========================
   LAYOUT PRINCIPAL
   =========================== */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================
   HEADER
   =========================== */
header {
  padding: 40px 0 24px;
  border-bottom: 1px solid rgba(55, 53, 47, 0.09);
  margin-bottom: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  color: #37352f;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.header-nav {
  margin-left: auto;
}

.header-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-menu li {
  margin: 0;
}

.header-menu a {
  color: rgba(55, 53, 47, 0.65);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.header-menu a:hover {
  color: #37352f;
}

.header-menu .current-menu-item a,
.header-menu .current_page_item a,
.header-menu .current-page-ancestor a {
  color: #37352f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===========================
   TIPOGRAFÍA
   =========================== */
h1 {
  font-size: 40px;
  font-weight: 700;
  margin: 48px 0 8px;
  line-height: 1.2;
  color: #37352f;
}

.subtitle {
  font-size: 18px;
  color: rgba(55, 53, 47, 0.65);
  margin-bottom: 48px;
  font-weight: 400;
}

h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 48px 0 16px;
  color: #37352f;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 8px;
  color: #37352f;
}

hr {
  border: none;
  border-top: 1px solid rgba(55, 53, 47, 0.09);
  margin: 32px 0;
}

/* ===========================
   LISTAS
   =========================== */
ol, ul {
  margin: 24px 0;
  padding-left: 28px;
}

li {
  margin: 12px 0;
  color: #37352f;
  line-height: 1.7;
}

li strong {
  font-weight: 600;
  color: #37352f;
}

/* ===========================
   BLOCKQUOTE
   =========================== */
blockquote {
  border-left: 3px solid #37352f;
  padding: 16px 0 16px 20px;
  margin: 32px 0;
  font-size: 18px;
  font-style: italic;
  color: rgba(55, 53, 47, 0.75);
  background: rgba(55, 53, 47, 0.03);
  border-radius: 3px;
}

/* ===========================
   CARDS Y BOTONES
   =========================== */
.card {
  background: #ffffff;
  border: 1px solid rgba(55, 53, 47, 0.16);
  border-radius: 8px;
  padding: 24px;
  margin: 16px 0;
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: rgba(55, 53, 47, 0.24);
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: rgba(55, 53, 47, 0.75);
  margin: 12px 0 16px;
  line-height: 1.6;
}

.button {
  display: inline-block;
  padding: 8px 16px;
  background: #37352f;
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.button:hover {
  background: #2e2c28;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ===========================
   FOOTER
   =========================== */
footer {
  margin-top: 80px;
  padding: 32px 0;
  border-top: 1px solid rgba(55, 53, 47, 0.09);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  color: rgba(55, 53, 47, 0.65);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #37352f;
}

.footer-links .current-menu-item a,
.footer-links .current_page_item a,
.footer-links .current-page-ancestor a {
  color: #37352f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===========================
   CONTENT
   =========================== */
.entry-content {
  color: #37352f;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: #37352f;
  margin-top: 32px;
  margin-bottom: 16px;
}

.entry-content p {
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ===========================
   MENÚ HAMBURGUESA
   =========================== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
  background-color: rgba(55, 53, 47, 0.05);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: #37352f;
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ===========================
   SUBMENÚS
   =========================== */
.header-menu {
  position: relative;
}

.header-menu li {
  position: relative;
}

.header-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid rgba(55, 53, 47, 0.16);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  list-style: none;
  margin: 0;
}

.header-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-menu .sub-menu li {
  margin: 0;
  width: 100%;
}

.header-menu .sub-menu a {
  display: block;
  padding: 8px 16px;
  color: rgba(55, 53, 47, 0.75);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  border-radius: 4px;
  margin: 0 8px;
}

.header-menu .sub-menu a:hover {
  background-color: rgba(55, 53, 47, 0.05);
  color: #37352f;
}

.header-menu .sub-menu .current-menu-item a,
.header-menu .sub-menu .current_page_item a {
  color: #37352f;
  background-color: rgba(55, 53, 47, 0.08);
}

/* Indicador de submenú */
.header-menu .menu-item-has-children > a::after {
  content: '▼';
  font-size: 10px;
  margin-left: 8px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.header-menu .menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 640px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .mobile-menu-toggle {
    display: flex;
    order: 2;
  }

  .logo {
    order: 1;
  }

  .header-nav {
    order: 3;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
  }

  .header-nav.mobile-menu-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .header-menu {
    flex-direction: column;
    gap: 0;
    padding: 8px;
  }

  .header-menu li {
    width: 100%;
  }

  .header-menu a {
    display: block;
    padding: 12px 16px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }

  .header-menu a:hover {
    background-color: rgba(55, 53, 47, 0.05);
  }

  /* Submenús en móvil */
  .header-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-left: 16px;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .header-menu .menu-item-has-children.mobile-submenu-open .sub-menu {
    max-height: 300px;
  }

  .header-menu .sub-menu a {
    padding-left: 32px;
    font-size: 13px;
    color: rgba(55, 53, 47, 0.65);
  }

  .header-menu .menu-item-has-children > a::after {
    content: '▶';
    float: right;
    transition: transform 0.2s ease;
  }

  .header-menu .menu-item-has-children.mobile-submenu-open > a::after {
    transform: rotate(90deg);
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  .container {
    padding: 0 16px;
  }

  .footer-links {
    align-items: center;
    gap: 0 16px;
  }
}

