/*
Theme Name: QR Generator Theme
Theme URI: https://atigeneraqr.com
Author: ATIGENERAQR
Author URI: https://atigeneraqr.com
Description: Tema profesional para generador de códigos QR avanzado con diseño moderno, responsive y modo oscuro.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qr-generator
Tags: qr-code, generator, custom-menu, featured-images, translation-ready
*/

/* ============================================
   Reset y Estilos Base
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1e293b;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enlaces */
a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #1d4ed8;
    text-decoration: underline;
}

a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Imágenes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.2;
    color: #1e293b;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin: 0 0 1.5rem 0;
}

ul, ol {
    margin: 0 0 1.5rem 0;
    padding-left: 2rem;
}

/* Listas */
li {
    margin-bottom: 0.5rem;
}

/* ============================================
   Layout Principal
   ============================================ */
.site-main {
    min-height: 60vh;
    padding: 40px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    min-height: 60px;
    height: auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.site-logo a {
    color: #1e293b;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.site-logo a:hover {
    text-decoration: none;
    color: #2563eb;
}

.site-logo img {
    max-height: 60px;
    width: auto;
    margin: 0;
}

/* Botón hamburguesa para móvil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 101;
    position: relative;
}

.menu-toggle:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

.menu-toggle-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    position: relative;
}

.menu-toggle-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #1e293b;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.header-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    flex-wrap: nowrap;
    align-items: center;
}

.header-menu li {
    margin: 0;
}

.header-menu a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 0;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.header-menu a:hover,
.header-menu a:focus {
    color: #2563eb;
    text-decoration: none;
}

.header-menu .current-menu-item > a,
.header-menu .current_page_item > a {
    color: #2563eb;
    font-weight: 600;
}

/* ============================================
   Header - Modo Oscuro
   ============================================ */
[data-theme="dark"] .site-header {
    background-color: #0f172a;
    border-bottom: 1px solid #334155;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
}

/* Desktop: Header transparente en modo oscuro (sin franja blanca) */
@media (min-width: 1025px) {
    [data-theme="dark"] .site-header {
        background-color: transparent !important;
        border-bottom: none !important;
        box-shadow: none !important;
    }
    
    [data-theme="dark"] .site-header::before,
    [data-theme="dark"] .site-header::after {
        display: none !important;
        content: none !important;
    }
    
    /* Main navigation transparente en desktop */
    [data-theme="dark"] .main-navigation {
        background-color: transparent !important;
        border-top: none !important;
        box-shadow: none !important;
    }
    
    /* Textos del menú en BLANCO en desktop + modo oscuro */
    [data-theme="dark"] .header-menu a {
        color: #ffffff !important;
    }
    
    [data-theme="dark"] .header-menu a:hover,
    [data-theme="dark"] .header-menu a:focus {
        color: #ffffff !important;
        background-color: transparent !important;
        opacity: 0.8;
    }
    
    [data-theme="dark"] .header-menu .current-menu-item > a,
    [data-theme="dark"] .header-menu .current_page_item > a {
        color: #ffffff !important;
        font-weight: 600;
    }
    
    [data-theme="dark"] .header-menu li {
        border-bottom: none !important;
    }
}

/* Logo/Título: BLANCO en modo oscuro */
[data-theme="dark"] .site-logo a,
[data-theme="dark"] .site-logo h1 {
    color: #ffffff !important;
}

[data-theme="dark"] .site-logo a:hover {
    color: #ffffff !important;
    opacity: 0.9;
}

/* Botón hamburguesa: BLANCO en modo oscuro */
[data-theme="dark"] .menu-toggle-icon span {
    background-color: #ffffff !important;
}

[data-theme="dark"] .menu-toggle:focus {
    outline-color: rgba(255, 255, 255, 0.35);
    outline-width: 2px;
}

/* Panel del menú: FONDO BLANCO con TEXTO NEGRO en modo oscuro */
[data-theme="dark"] .main-navigation {
    background-color: #ffffff !important;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .header-menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .header-menu a {
    color: #0b1220 !important;
}

[data-theme="dark"] .header-menu a:hover,
[data-theme="dark"] .header-menu a:focus {
    background-color: rgba(0, 0, 0, 0.06) !important;
    color: #0b1220 !important;
}

[data-theme="dark"] .header-menu .current-menu-item > a,
[data-theme="dark"] .header-menu .current_page_item > a {
    color: #0b1220 !important;
    font-weight: 600;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background-color: #1e293b;
    color: #f1f5f9;
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 3px solid #2563eb;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-widget p {
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-menu a:hover,
.footer-menu a:focus {
    color: #ffffff;
    text-decoration: none;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.875rem;
}

.footer-bottom p {
    margin: 0;
}

/* ============================================
   Contenido y Artículos
   ============================================ */
.entry-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.entry-content {
    line-height: 1.8;
    color: #334155;
}

.entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
}

.entry-content img {
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid #2563eb;
    background-color: #f1f5f9;
    font-style: italic;
}

.entry-content code {
    background-color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #dc2626;
}

.entry-content pre {
    background-color: #1e293b;
    color: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.entry-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* ============================================
   Formularios
   ============================================ */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #ffffff;
    color: #1e293b;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   Botones
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #2563eb;
    color: #ffffff;
}

.btn:hover,
.btn:focus {
    background-color: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #64748b;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #475569;
}

/* ============================================
   Utilidades
   ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ============================================
   Responsive
   ============================================ */
/* MÓVIL Y TABLET (≤ 1024px) */
@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
        position: relative;
    }
    
    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }
    
    /* Ocultar menú completamente en móvil por defecto */
    .main-navigation {
        width: 100%;
        display: none;
        position: relative;
        background-color: #ffffff;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 100;
        margin-top: 0;
        border-top: 1px solid #e2e8f0;
        order: 3;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    /* Mostrar menú cuando está abierto */
    .main-navigation.open {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    .header-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0;
        align-items: stretch;
        list-style: none;
        margin: 0;
    }
    
    .header-menu li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .header-menu li:last-child {
        border-bottom: none;
    }
    
    .header-menu a {
        display: block;
        width: 100%;
        padding: 16px 20px;
        color: #1e293b;
        text-decoration: none;
        font-weight: 500;
        font-size: 1rem;
        transition: background-color 0.2s ease, color 0.2s ease;
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
    }
    
    .header-menu a:hover,
    .header-menu a:focus {
        background-color: #f1f5f9;
        color: #2563eb;
        text-decoration: none;
    }
    
    /* Modo oscuro en móvil: Panel BLANCO con texto NEGRO */
    [data-theme="dark"] .main-navigation {
        background-color: #ffffff !important;
        border-top: 1px solid rgba(0, 0, 0, 0.12);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    [data-theme="dark"] .header-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    }
    
    [data-theme="dark"] .header-menu a {
        color: #0b1220 !important;
    }
    
    [data-theme="dark"] .header-menu a:hover,
    [data-theme="dark"] .header-menu a:focus {
        background-color: rgba(0, 0, 0, 0.06) !important;
        color: #0b1220 !important;
    }
    
    .site-logo {
        order: 1;
        flex: 1;
    }
    
    .site-logo h1 {
        font-size: 1.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .entry-title {
        font-size: 2rem;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .site-main {
        padding: 20px 0;
    }
}

/* DESKTOP (≥ 1025px) */
@media (min-width: 1025px) {
    .menu-toggle {
        display: none !important;
    }
    
    .main-navigation {
        display: flex !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .main-navigation.open {
        display: flex !important;
    }
}


@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .site-header {
        padding: 15px 0;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .entry-title {
        font-size: 1.75rem;
    }
}

/* ============================================
   Paginación
   ============================================ */
.pagination,
.navigation {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination .page-numbers,
.navigation .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover,
.navigation .page-numbers:hover,
.pagination .page-numbers.current,
.navigation .page-numbers.current {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    text-decoration: none;
}

.pagination .prev,
.pagination .next,
.navigation .prev,
.navigation .next {
    font-weight: 600;
}

/* ============================================
   Widgets
   ============================================ */
.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.widget ul {
    list-style: none;
    padding-left: 0;
}

.widget ul li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ============================================
   Comentarios (si se habilitan)
   ============================================ */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e2e8f0;
}

.comment-list {
    list-style: none;
    padding-left: 0;
}

.comment {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 10px;
}

.comment-meta {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 15px;
}

.comment-content {
    line-height: 1.7;
}

.comment-form {
    margin-top: 40px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.comment-form input[type="submit"] {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #2563eb;
    color: #ffffff;
    margin-top: 15px;
}

.comment-form input[type="submit"]:hover,
.comment-form input[type="submit"]:focus {
    background-color: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Accesibilidad
   ============================================ */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
    padding: 8px 16px;
    background-color: #2563eb;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
}

/* ============================================
   Alineación de imágenes de WordPress
   ============================================ */
.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

.aligncenter {
    display: block;
    margin: 0 auto 20px;
}

.alignnone {
    margin: 0 0 20px 0;
}

/* ============================================
   Clearfix
   ============================================ */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

