/*
Theme Name: Carlos Verano
Theme URI: https://carlosverano.com
Author: Carlos Verano
Author URI: https://carlosverano.com
Description: Tema personalizado para el blog de Carlos Verano - Consultor en Transformación Digital. Diseño moderno con Tailwind CSS, optimizado para SEO y rendimiento.
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: carlosverano
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready

Este tema utiliza Tailwind CSS CDN y está optimizado para rendimiento y SEO.
*/

/* ===== VARIABLES CSS ===== */
:root {
    --primary: #FCD34D;
    --secondary: #000000;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-600: #4B5563;
    --back-bot: #9ca3af;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #000000;
    background: #F9FAFB;
    overflow-x: hidden;
}

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ===== GLASS EFFECT ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

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; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* ===== ENLACES ===== */
a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* ===== CONTENIDO DEL POST ===== */
.entry-content {
    line-height: 1.8;
    font-size: 1.125rem;
    color: #4B5563;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--gray-600);
}

.entry-content code {
    background: #F3F4F6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.entry-content pre {
    background: #000000;
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.entry-content pre code {
    background: transparent;
    padding: 0;
    color: white;
}

/* ===== FEATURED IMAGE ===== */
.post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== META INFO ===== */
.entry-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.entry-meta a {
    color: #6B7280;
}

.entry-meta a:hover {
    color: var(--primary);
}

/* ===== NAVEGACIÓN DE POSTS ===== */
.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}

/* ===== COMENTARIOS ===== */
.comments-area {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid #E5E7EB;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1rem;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #F3F4F6;
}

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

/* ===== PAGINACIÓN ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--secondary);
}

.pagination .current {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* ===== SEARCH FORM ===== */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.search-form button:hover {
    background: #0F172A;
}

/* ===== HERO/HEADER STYLES ===== */
.bg-gradient-to-r {
    background: linear-gradient(to right, #000000, #374151);
}

/* Asegurar que el título sea blanco */
h1.text-white {
    color: #ffffff !important;
}

/* ===== CATEGORY FILTER BUTTONS ===== */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.category-filter a {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-filter a.active {
    background: var(--primary);
    color: var(--secondary);
}

.category-filter a:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.category-filter a:not(.active):hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== SEARCH FORM IN HEADER ===== */
.hero-search-form {
    max-width: 42rem;
    margin: 0 auto 2rem;
}

.hero-search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 1rem;
}

.hero-search-form input[type="search"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.3);
}

.hero-search-form button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--secondary);
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-search-form button:hover {
    background: #FACC15;
}

/* ===== CTA CONTEXTUAL (Single Post) ===== */
.cta-contextual {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #FCD34D;
    border-radius: 1rem;
    padding: 2.5rem;
    margin-top: 3rem;
}

.cta-contextual h3 {
    color: var(--secondary);
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.cta-contextual p {
    color: #374151;
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.cta-contextual .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.cta-contextual .cta-button:hover {
    background: #0f172a;
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.cta-contextual .cta-button:active {
    transform: scale(0.98);
}

/* Responsive CTA */
@media (max-width: 640px) {
    .cta-contextual {
        padding: 1.5rem;
    }
    
    .cta-contextual h3 {
        font-size: 1.5rem;
    }
    
    .cta-contextual p {
        font-size: 1rem;
    }
    
    .cta-contextual .cta-button {
        width: 100%;
        justify-content: center;
    }
}
/* ===== FOOTER STYLES ===== */
footer {
    background: var(--secondary) !important;
    color: white !important;
}

footer h3,
footer h4 {
    color: white !important;
}

footer a {
    color: #D1D5DB; /* gray-300 */
}

footer a:hover {
    color: var(--primary);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 36px;
    height: 36px;
    background: var(--primary); /* #FCD34D; */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* box-shadow: 0 4px 12px rgba(252, 211, 77, 0.4); */
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    background: #FACC15;
    transform: translateY(-2px);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(0.98);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    color: var(--secondary);
    transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

.scroll-to-top.visible {
    animation: bounceIn 0.5s ease;
}

/* Progreso circular del scroll */
.scroll-progress {
    position: absolute;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border-radius: 50%;
    transform: rotate(-90deg);
}

.scroll-progress-circle {
	fill: none;
    stroke: var(--secondary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s ease;
}

/* Responsive scroll button */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 36px;
        height: 36px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== BUTTONS ===== */
button, 
.btn {
    transition: all 0.2s ease;
}

button:active,
.btn:active {
    transform: scale(0.98);
}

/* ===== ROUNDED BUTTON ===== */
.rounded-button {
    border-radius: 8px !important;
}

/* ===== MOBILE MENU Z-INDEX FIX ===== */
nav {
    z-index: 50;
}

#mobileMenuOverlay {
    z-index: 60 !important;
}

#mobileMenuOverlay > div {
    background: white !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

/* Asegurar legibilidad del menú móvil */
#mobileMenuOverlay a {
    color: #000000 !important;
}

#mobileMenuOverlay button {
    color: #000000 !important;
}

/* En móviles pequeños, menú ocupa toda la pantalla */
@media (max-width: 640px) {
    #mobileMenuOverlay > div {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ===== ACCESIBILIDAD ===== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, transform;
    transition-duration: 200ms;
    transition-timing-function: ease-in-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .entry-content {
        font-size: 1rem;
    }
    
    .sidebar {
        margin-top: 3rem;
    }
}

/* Fix responsive en móvil */
@media (max-width: 640px) {
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    article {
        margin-left: 0;
        margin-right: 0;
    }
    
    .grid {
        gap: 1rem;
    }
}

/* Fix para evitar overflow horizontal */
.max-w-7xl {
    max-width: 100%;
    width: 100%;
}

@media (min-width: 1280px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f172a;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

/* ===== RESPONSIVE IMAGES ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== LINE CLAMP UTILITIES ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== PROSE STYLING (para contenido de posts) ===== */
.prose {
    color: #374151;
    max-width: 65ch;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose h2 {
    font-size: 1.875rem;
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 700;
    color: var(--secondary);
}

.prose h3 {
    font-size: 1.5rem;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    font-weight: 700;
    color: var(--secondary);
}

.prose h4 {
    font-size: 1.25rem;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: var(--secondary);
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

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

.prose strong {
    font-weight: 600;
    color: var(--secondary);
}

.prose blockquote {
    font-style: italic;
    border-left: 4px solid var(--primary);
    padding-left: 1.5em;
    margin: 2em 0;
    color: #6B7280;
}

.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: 0.75rem;
}

.prose figure {
    margin-top: 2em;
    margin-bottom: 2em;
}

.prose figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #6B7280;
    margin-top: 0.75em;
}

.prose code {
    background: #F3F4F6;
    padding: 0.25em 0.5em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
    color: #1F2937;
}

.prose pre {
    background: #1F2937;
    color: #F9FAFB;
    padding: 1.5em;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2em 0;
}

.prose pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: 0.875em;
}

.prose table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
}

.prose th {
    background: #F3F4F6;
    padding: 0.75em;
    text-align: left;
    font-weight: 600;
    border: 1px solid #E5E7EB;
}

.prose td {
    padding: 0.75em;
    border: 1px solid #E5E7EB;
}

.prose hr {
    margin: 3em 0;
    border: 0;
    border-top: 2px solid #E5E7EB;
}
