/**
 * Zona Negra Theme Main Styles
 * Horror/Paranormal Dark Theme - Bootstrap 5 Edition
 * 
 * @package Zona_Negra
 * @version 4.1.3
 */

/* ========================================
   CSS VARIABLES
======================================== */
:root {
    /* Colors */
    --color-bg-primary: #0b0b0b;
    --color-bg-secondary: #111111;
    --color-bg-tertiary: #1a1a1a;
    --color-accent-primary: #eb6316;
    --color-accent-primary-hover: #ff7e33;
    --color-accent-red: #eb6316;
    --color-accent-red-hover: #ff7e33;
    --color-text-primary: #e0e0e0;
    --color-text-secondary: #a0a0a0;
    --color-text-muted: #666666;
    --color-border: #2a2a2a;
    --color-border-light: #333333;
    
    /* Typography */
    --font-primary: 'Lato', sans-serif;
    --font-heading: 'Cinzel', serif;
    --font-display: 'Creepster', cursive;
    --font-serif: 'Playfair Display', serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   BASE STYLES
======================================== */
html {
    overflow-y: scroll !important;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary) !important;
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-primary) !important;
    background-color: var(--color-bg-primary) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: auto !important;
    min-height: 100vh;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
}

/* ========================================
   TYPOGRAPHY
======================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-primary) !important;
}

a {
    color: var(--color-accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-primary-hover);
}

/* ========================================
   HEADER & NAVBAR
======================================== */
.site-header {
    background: rgba(11, 11, 11, 0.95) !important;
    border-bottom: 2px solid var(--color-accent-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(235, 99, 22, 0.3);
}

.navbar {
    padding: 1rem 0;
    background: transparent !important;
}

.navbar-brand.site-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-accent-primary);
    letter-spacing: 1px;
    transition: color 0.3s ease;
    text-shadow: none;
}

.navbar-brand.site-title:hover {
    color: var(--color-accent-primary-hover);
    text-shadow: none;
}

.navbar-toggler {
    border-color: var(--color-accent-primary) !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(235, 99, 22, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(235, 99, 22, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-nav .nav-link {
    color: var(--color-text-primary) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
    padding: 0.6rem 1rem !important;
    transition: var(--transition-normal);
    border-radius: 4px;
    position: relative;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent-primary);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--color-accent-primary) !important;
}

/* ========================================
   HERO POSTS SECTION
======================================== */
.home-banner-section {
    position: relative;
    line-height: 0;
    background-color: #000000; /* Fondo negro base */
}

.home-banner-container {
    position: relative;
    height: 100%; /* Mobile layout */
    display: flex;
    justify-content: center;
    align-items: center; 
    overflow: hidden;
    transition: height 0.3s ease;
}

.home-banner-image {
    display: block;
    height: 100%;       
    width: auto;        
    max-width: 100%;    
    object-fit: contain;
    
    /* Mobile: Less aggressive fade */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.home-banner-container::after {
    content: none;
}

/* Tablet & Desktop adjustment */
@media (min-width: 768px) {
    .home-banner-container {
        height: 100%;
    }
    
    .home-banner-image {
        /* Desktop: Standard fade */
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .home-banner-container {
        height: 100%;
    }
}

.home-banner-text-section {
    background-color: var(--color-bg-secondary);
}

.home-banner-content {
    position: relative;
    z-index: 2;
}

.home-banner-title {
    font-family: var(--font-display) !important;
    font-size: 2.5rem;
    color: #fff !important;
    text-shadow: none;
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

.home-banner-subtitle {
    font-family: var(--font-serif) !important;
    font-size: 1.2rem;
    color: var(--color-text-primary);
    text-shadow: none;
    margin-bottom: 0;
}

.hero-posts {
    background: var(--color-bg-secondary);
}

.hero-post {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: var(--transition-normal);
}

.hero-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(235, 99, 22, 0.4);
}

.hero-post-link {
    text-decoration: none;
    color: inherit;
}

.hero-post-thumbnail {
    min-height: 400px;
    overflow: hidden;
}

.hero-post-thumbnail img {
    transition: var(--transition-slow);
}

.hero-post:hover .hero-post-thumbnail img {
    transform: scale(1.05);
}

.hero-post-overlay {
    background: linear-gradient(
        to top,
        rgba(11, 11, 11, 0.95) 0%,
        rgba(11, 11, 11, 0.7) 40%,
        rgba(11, 11, 11, 0.2) 70%,
        transparent 100%
    );
}

.hero-post-content {
    z-index: 2;
}

.hero-post-title {
    font-family: var(--font-heading) !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transition: var(--transition-normal);
}

.hero-post:hover .hero-post-title {
    color: var(--color-accent-primary) !important;
}

.hero-post-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* ========================================
   POST CARDS
======================================== */
.post-card {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(235, 99, 22, 0.35);
    border-color: var(--color-accent-primary);
}

.post-card-image {
    overflow: hidden;
}

.post-card-image img {
    transition: var(--transition-slow) !important;
    width: 100%;
    height: auto;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-category .badge {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.post-card-title {
    font-family: var(--font-heading) !important;
    margin: 0.75rem 0;
}

.post-card-title a {
    color: var(--color-text-primary) !important;
    text-decoration: none;
    transition: var(--transition-fast);
}

.post-card-title a:hover {
    color: var(--color-accent-primary) !important;
}

.post-card-excerpt {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
    margin-top: auto;
}

.post-card-meta .author-name a {
    color: var(--color-text-secondary);
    font-weight: 600;
}

.post-card-meta .author-name a:hover {
    color: var(--color-accent-primary);
}

.post-overlay {
    background: linear-gradient(
        to top,
        rgba(11, 11, 11, 0.7) 0%,
        transparent 100%
    );
    opacity: 0;
    transition: var(--transition-normal);
}

.post-card:hover .post-overlay {
    opacity: 1;
}


/* ========================================
   SECTION TITLES
======================================== */
.section-title {
    font-family: var(--font-heading) !important;
    color: var(--color-text-primary);
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent-primary);
}

/* ========================================
   ARCHIVE PAGE
======================================== */
.archive-header-section {
    border-bottom: 1px solid var(--color-border);
}

.archive-title {
    font-family: var(--font-heading) !important;
    font-size: 2.5rem;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

.archive-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.archive-meta .badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.no-results-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.no-results-content svg {
    color: var(--color-text-muted);
}

.no-results-content .btn {
    margin-top: 1rem;
}

/* ========================================
   PAGINATION
======================================== */
.pagination {
    margin: 3rem 0 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-border);
    color: var(--color-text-primary);
    border-radius: 8px;
    transition: var(--transition-normal);
    font-weight: 600;
    font-size: 0.95rem;
}

.page-numbers:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(235, 99, 22, 0.3);
}

.page-numbers.current {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: white;
    cursor: default;
    box-shadow: 0 0 20px rgba(235, 99, 22, 0.4);
}

.page-numbers.current:hover {
    transform: none;
}

.page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.page-numbers.prev,
.page-numbers.next {
    padding: 0.5rem 1.25rem;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.copyright a {
    color: var(--color-text-primary);
}

/* ========================================
   SIDEBAR
======================================== */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.widget {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
======================================== */
@media (max-width: 991px) {
    .hero-post-thumbnail {
        min-height: 300px;
    }
    
    .navbar-brand.site-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    .hero-post-thumbnail {
        min-height: 250px;
    }
    
    .navbar-brand.site-title {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   UTILITIES
======================================== */
.text-white {
    color: #ffffff !important;
}

.bg-danger {
    background-color: var(--color-accent-red) !important;
}

.object-fit-cover {
    object-fit: cover;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   SINGLE POST
======================================== */
.single-post-header {
    position: relative;
    padding: 4rem 0;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50vh;
    background-color: var(--color-bg-secondary);
}

.single-post-thumbnail-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.single-post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7);
}

.single-post-header .thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(11, 11, 11, 0.8) 20%, transparent 100%);
    z-index: 1;
}

.single-post-header .container {
    position: relative;
    z-index: 2;
}

.single-post-header .entry-header {
    color: #fff;
}

.single-post-header .entry-title {
    font-size: 3rem;
    font-family: var(--font-serif);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
    color: #fff !important;
}

.single-post-header .entry-meta {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
}

.single-post-header .entry-meta a {
    color: var(--color-text-primary);
    text-decoration: none;
}

.single-post-header .entry-meta a:hover {
    color: var(--color-accent-primary);
}

.single-post-content .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-primary);
}

.single-post-content .entry-content p {
    margin-bottom: 1.5rem;
}

.single-post-content .entry-content h2,
.single-post-content .entry-content h3,
.single-post-content .entry-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.single-post-content .entry-footer .post-tags {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
.single-post-content .entry-footer .post-tags strong {
    color: var(--color-text-primary);
}

.single-post-content .entry-footer .post-tags a {
    display: inline-block;
    background-color: var(--color-bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin: 0.25rem;
    transition: var(--transition-normal);
}

.single-post-content .entry-footer .post-tags a:hover {
    background-color: var(--color-accent-primary);
    color: #fff;
}

.post-navigation {
    margin: 4rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    padding: 2rem;
    position: relative;
}

.post-navigation .nav-previous {
    border-right: 1px solid var(--color-border);
    text-align: left;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation a {
    display: block;
    color: var(--color-text-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-normal);
}

.post-navigation a:hover {
    color: var(--color-accent-primary);
}

.post-navigation .nav-title {
    display: block;
    font-size: 1.1rem;
    color: var(--color-text-primary);
}

.post-navigation .nav-previous a::before,
.post-navigation .nav-next a::after {
    font-family: 'serif';
    font-size: 1.5rem;
    color: var(--color-accent-primary);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition-normal);
}

.post-navigation .nav-previous a::before {
    content: '«';
    left: 1rem;
}

.post-navigation .nav-next a::after {
    content: '»';
    right: 1rem;
}

.post-navigation .nav-previous a:hover::before {
    transform: translateY(-50%) translateX(-5px);
}
.post-navigation .nav-next a:hover::after {
    transform: translateY(-50%) translateX(5px);
}

/* Comments */
.comments-area {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.comments-title, .comment-reply-title {
    font-family: var(--font-heading);
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    position: relative;
}

.comment-author .avatar {
    border-radius: 50%;
    margin-right: 1rem;
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.comment-meta a {
    color: var(--color-text-secondary);
}

.comment-content {
    margin-top: 1rem;
}

.reply .comment-reply-link {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-accent-primary);
    text-decoration: none;
}

.comment-form .form-control {
    background-color: var(--color-bg-tertiary);
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

.comment-form .form-control:focus {
    background-color: var(--color-bg-tertiary);
    border-color: var(--color-accent-primary);
    color: var(--color-text-primary);
    box-shadow: 0 0 0 0.25rem rgba(235, 99, 22, 0.25);
}

.comment-form .form-label {
    color: var(--color-text-secondary);
}

.comment-form .btn-primary {
    background-color: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
}

.comment-form .btn-primary:hover {
    background-color: var(--color-accent-primary-hover);
    border-color: var(--color-accent-primary-hover);
}

/* ========================================
   POST SHARE BUTTONS
======================================== */
.post-share-buttons {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.share-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.share-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
    transition: var(--transition-normal);
    position: relative;
}

.share-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: var(--transition-fast);
}

.share-link:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-primary);
    color: #fff;
}

.share-link.facebook:hover { background-color: #1877F2; border-color: #1877F2; }
.share-link.twitter:hover { background-color: #1DA1F2; border-color: #1DA1F2; }
.share-link.whatsapp:hover { background-color: #25D366; border-color: #25D366; }
.share-link.copy-link:hover { background-color: var(--color-accent-primary); border-color: var(--color-accent-primary); }

.share-link.copy-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-accent-primary);
    color: #fff;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.share-link.copy-link.show-tooltip::after {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
======================================== */
@media (max-width: 991px) {
    .hero-post-thumbnail {
        min-height: 300px;
    }
    
    .navbar-brand.site-title {
        font-size: 1.5rem;
    }
    
    .home-banner-title {
        font-size: 3rem;
    }
    
    .home-banner-subtitle {
        font-size: 1.2rem;
    }
    
    .single-post-header .entry-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 575px) {
    .hero-post-thumbnail {
        min-height: 250px;
    }
    
    .navbar-brand.site-title {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .home-banner-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .home-banner-subtitle {
        font-size: 1rem;
    }
    
    .single-post-header {
        min-height: 40vh;
    }
    .single-post-header .entry-title {
        font-size: 2rem;
    }
    .post-navigation .nav-links {
        flex-direction: column;
    }
    .post-navigation .nav-previous {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }
}

/* ========================================
   UTILITIES
======================================== */
.text-white {
    color: #ffffff !important;
}

.bg-danger {
    background-color: var(--color-accent-red) !important;
}

.object-fit-cover {
    object-fit: cover;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
