/* ============================================
   significadodesoñar.lat - Main Stylesheet
   Theme: Deep Dreams (Purple/Blue/Gold)
   ============================================ */

:root {
    /* Primary Colors */
    --color-primary: #6C3CE1;
    --color-primary-dark: #4A2B9E;
    --color-primary-light: #8B5CF6;
    --color-primary-lighter: #A78BFA;
    
    /* Secondary Colors */
    --color-secondary: #1E3A5F;
    --color-secondary-dark: #0F2440;
    --color-accent: #F59E0B;
    --color-accent-light: #FCD34D;
    
    /* Background Colors */
    --bg-primary: #0F0A1E;
    --bg-secondary: #1A1035;
    --bg-card: #231845;
    --bg-card-hover: #2D1F5E;
    
    /* Text Colors */
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6C3CE1 0%, #3B82F6 100%);
    --gradient-hero: linear-gradient(180deg, #0F0A1E 0%, #1A1035 50%, #231845 100%);
    --gradient-card: linear-gradient(135deg, #231845 0%, #1A1035 100%);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Borders */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(108, 60, 225, 0.15);
    --shadow-lg: 0 10px 30px rgba(108, 60, 225, 0.2);
    --shadow-glow: 0 0 20px rgba(108, 60, 225, 0.3);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Header & Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 10, 30, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(108, 60, 225, 0.2);
    padding: var(--space-md) 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo:hover {
    color: var(--color-primary-light);
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav a:hover {
    color: var(--text-primary);
    background: rgba(108, 60, 225, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(108, 60, 225, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    margin-bottom: var(--space-lg);
    position: relative;
}

.hero h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    color: var(--text-muted);
    position: relative;
}

/* Search */
.search-box {
    max-width: 500px;
    margin: var(--space-xl) auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    padding-right: 3rem;
    border: 2px solid rgba(108, 60, 225, 0.3);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    outline: none;
}

.search-box input:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.search-box button:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Categories */
.categories {
    padding: var(--space-2xl) 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(108, 60, 225, 0.15);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

.category-card .icon {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.category-card .name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.category-card .count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Articles Grid */
.articles-section {
    padding: var(--space-2xl) 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.article-card {
    background: var(--bg-card);
    border: 1px solid rgba(108, 60, 225, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108, 60, 225, 0.4);
    box-shadow: var(--shadow-lg);
}

.article-card .card-body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card .card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary-light);
    background: rgba(108, 60, 225, 0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    width: fit-content;
}

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.article-card h3 a:hover {
    color: var(--color-primary-light);
}

.article-card .excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: var(--space-md);
}

.article-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(108, 60, 225, 0.1);
}

.article-card .read-time {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Article Page */
.article-header {
    padding: var(--space-2xl) 0 var(--space-xl);
    text-align: center;
    position: relative;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(108, 60, 225, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-meta .separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-primary);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) 0 var(--space-3xl);
}

.article-content h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.article-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--color-primary-light);
}

.article-content p {
    margin-bottom: var(--space-md);
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-xl);
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: var(--space-sm);
}

.article-content blockquote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg) var(--space-xl);
    border-left: 4px solid var(--color-primary);
    background: rgba(108, 60, 225, 0.05);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Related Articles */
.related-articles {
    padding: var(--space-2xl) 0;
    border-top: 1px solid rgba(108, 60, 225, 0.1);
}

/* Breadcrumb */
.breadcrumb {
    padding: var(--space-md) 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--color-primary-light);
}

.breadcrumb span {
    margin: 0 var(--space-sm);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(108, 60, 225, 0.15);
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-2xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
    display: inline-block;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links h4 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(108, 60, 225, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Loading / Pagination */
.load-more {
    text-align: center;
    padding: var(--space-xl) 0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Stars decoration */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--duration) var(--delay) infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: var(--opacity); }
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(15, 10, 30, 0.98);
        padding: var(--space-lg);
        border-bottom: 1px solid rgba(108, 60, 225, 0.2);
        gap: var(--space-sm);
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero {
        padding: var(--space-2xl) 0;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 0 var(--space-md);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Article page specific */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
    border-top: 1px solid rgba(108, 60, 225, 0.1);
    margin-top: var(--space-xl);
}

.article-nav a {
    flex: 1;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(108, 60, 225, 0.1);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.article-nav a:hover {
    border-color: var(--color-primary);
    background: var(--bg-card-hover);
}

.article-nav .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.article-nav .title {
    font-weight: 600;
    color: var(--text-primary);
}

/* Table of contents */
.toc {
    background: var(--bg-card);
    border: 1px solid rgba(108, 60, 225, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.toc h4 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary-light);
    margin-bottom: var(--space-md);
}

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

.toc li {
    margin-bottom: var(--space-xs);
}

.toc a {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    padding: var(--space-xs) 0;
    border-left: 2px solid transparent;
    padding-left: var(--space-md);
    transition: all 0.2s ease;
}

.toc a:hover {
    color: var(--color-primary-light);
    border-left-color: var(--color-primary);
}
