/*
Theme Name: TechHole
Theme URI: https://proton.me/support/lumo
Author: Ivan
Author URI: https://proton.me/support/lumo
Description: Un tema de tecnología inspirado en la soberanía digital "Mi Madriguera", con la calidez de un Maltipoo y un Conejo Bélier. Menú a la izquierda, logo a la derecha, scroll suave.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techhole
Tags: technology, privacy, custom-colors, responsive-layout, hero-banner
*/

/* =========================================
   SCROLL SUAVE (CORRECCIÓN BOTÓN)
   ========================================= */
html {
    scroll-behavior: smooth;
}

/* =========================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    --color-bg: #FDFBF7;
    --color-text: #4B3621;
    --color-accent: #D2691E;
    --color-accent-hover: #A0522D;
    --color-security: #556B2F;
    --color-card: #FFFFFF;
    --font-main: 'Nunito', sans-serif;
    --font-code: 'Fira Code', monospace;
    --radius-tunnel: 20px;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* =========================================
   TIPOGRAFÍA
   ========================================= */
h1, h2, h3 {
    color: var(--color-accent);
    font-weight: 700;
    margin-top: 0;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

p { margin-bottom: 1rem; }

code, pre {
    font-family: var(--font-code);
    background: #f0e6d2;
    padding: 2px 5px;
    border-radius: 4px;
    color: #8b4513;
    font-size: 0.9em;
}

pre {
    padding: 1rem;
    overflow-x: auto;
    border-radius: 8px;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* =========================================
   LAYOUT GENERAL
   ========================================= */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* =========================================
   CABECERA PRINCIPAL Y LOGO
   ========================================= */
.site-header {
    background: var(--color-card);
    padding: 1rem 2rem;
    border-bottom: 3px solid var(--color-accent);
    border-radius: 0 0 var(--radius-tunnel) var(--radius-tunnel);
    box-shadow: 0 4px 6px rgba(75, 54, 33, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
}

.site-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.site-logo-link:hover {
    transform: scale(1.05);
}

.site-logo-img {
    max-height: 80px;
    max-width: 400px;
    width: auto;
    height: auto;
    display: block;
}

.site-title-link {
    text-decoration: none;
    color: var(--color-accent);
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navegación (a la izquierda) */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: var(--color-accent);
}

/* =========================================
   CABECERA HERO (BANNER PRINCIPAL)
   ========================================= */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #FDFBF7 0%, #F5E6D3 100%);
    padding: 3rem;
    border-radius: var(--radius-tunnel);
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(210, 105, 30, 0.1);
    border: 1px solid #e0d5c5;
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
    z-index: 2;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.5s ease;
    animation: float 6s ease-in-out infinite;
}

.hero-image img:hover {
    transform: scale(1.02);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* =========================================
   TARJETAS DE ENTRADAS
   ========================================= */
.post-card {
    background: var(--color-card);
    border: 1px solid #e0d5c5;
    border-radius: var(--radius-tunnel);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(210, 105, 30, 0.15);
    border-color: var(--color-accent);
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background-image: radial-gradient(circle, var(--color-accent) 15%, transparent 16%);
    background-size: 15px 15px;
    opacity: 0.1;
    pointer-events: none;
}

.post-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.post-title a {
    text-decoration: none;
    color: inherit;
}

.post-title a:hover {
    color: var(--color-accent);
}

.post-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    font-style: italic;
}

.post-thumbnail {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.post-card:hover .post-thumbnail img {
    transform: scale(1.02);
}

.post-excerpt {
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.btn-primary {
    display: inline-block;
    background-color: var(--color-accent);
    color: white !important;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none !important;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(210, 105, 30, 0.2);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(210, 105, 30, 0.3);
}

/* =========================================
   ELEMENTOS DE SEGURIDAD
   ========================================= */
.security-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(85, 107, 47, 0.1);
    color: var(--color-security);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(85, 107, 47, 0.2);
}

.security-badge::before {
    content: '🔒';
    margin-right: 8px;
    font-size: 1.1em;
}

/* =========================================
   FOOTER (COMPACTO)
   ========================================= */
.site-footer {
    background: var(--color-text);
    color: #fff;
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: 3rem;
    border-radius: var(--radius-tunnel) var(--radius-tunnel) 0 0;
}

.site-footer p {
    margin: 0.3rem 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--color-accent);
    font-weight: bold;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.8rem;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* =========================================
   PAGINACIÓN
   ========================================= */
.pagination {
    margin: 2rem 0;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    background: var(--color-card);
    border: 1px solid var(--color-accent);
    border-radius: 5px;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: bold;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--color-accent);
    color: white;
}

/* =========================================
   ANIMACIONES DE ENTRADA
   ========================================= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-navigation {
    animation: fadeInDown 0.8s ease-out forwards;
}

.site-logo-link {
    animation: fadeInDown 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.post-card {
    animation: fadeInDown 0.8s ease-out 0.5s forwards;
    opacity: 0;
}

/* =========================================
   RESPONSIVE (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column-reverse;
        gap: 1rem;
        padding: 1rem;
    }

    .logo-container {
        width: 100%;
        justify-content: center;
    }

    .site-logo-img {
        max-height: 60px;
        max-width: 280px;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
        width: 100%;
    }

    .container {
        padding: 1rem;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }

    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        padding: 2rem 1rem;
    }

    .hero-content {
        padding-right: 0;
        margin-top: 1.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin: 0 auto 1.5rem auto;
    }

    .hero-image {
        width: 100%;
    }
    
    .hero-image img {
        max-width: 80%;
    }

    .site-footer {
        padding: 1.2rem 1rem;
    }
    
    .footer-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}