/* Magazine Template - Additional Custom Styles */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--color-primary);
    color: white;
}

/* Focus Styles */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Dropcap for First Paragraph */
.article-content > p:first-of-type::first-letter {
    font-family: var(--font-serif);
    font-size: 4.5rem;
    line-height: 1;
    float: left;
    margin: 0.1rem 0.75rem 0 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* Pull Quote */
.pull-quote {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    line-height: 1.4;
    font-style: italic;
    color: var(--color-primary);
    text-align: center;
    margin: 3rem auto;
    max-width: 700px;
    padding: 2rem 0;
    border-top: 3px solid var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    position: relative;
}

.pull-quote::before {
    content: '"';
    font-size: 6rem;
    line-height: 1;
    position: absolute;
    top: -1rem;
    left: 0;
    color: var(--color-primary);
    opacity: 0.2;
}

/* Magazine Columns */
.magazine-columns {
    column-count: 2;
    column-gap: 3rem;
    column-rule: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .magazine-columns {
        column-count: 1;
    }
}

/* Image Captions */
figure {
    margin: 2.5rem 0;
}

figcaption {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    margin-top: 0.75rem;
    padding: 0 1rem;
}

/* Highlighted Text */
mark, .highlight {
    background: linear-gradient(to bottom, transparent 50%, rgba(var(--color-primary-rgb), 0.3) 50%);
    padding: 0 0.25rem;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Hover Effects */
.magazine-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.magazine-card:hover {
    transform: translateY(-8px);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--color-secondary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Magazine Badge Variants */
.magazine-badge-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.magazine-badge-outline:hover {
    background: var(--color-primary);
    color: white;
}

/* Divider */
.magazine-divider {
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: 2rem auto;
}

/* Newsletter Form Styling */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: var(--color-surface);
    font-family: var(--font-sans);
    transition: border-color 0.2s;
}

.newsletter-input:focus {
    border-color: var(--color-primary);
}

.newsletter-button {
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-button:hover {
    background: var(--color-secondary);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--color-primary);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Print Styles */
@media print {
    .magazine-navbar,
    .sidebar,
    .magazine-badge,
    footer,
    .share-buttons,
    .scroll-to-top {
        display: none !important;
    }
    
    article {
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .prose {
        font-size: 12pt !important;
        line-height: 1.6 !important;
    }
}

/* Dark Mode Enhancements (if dark mode is enabled) */
@media (prefers-color-scheme: dark) {
    .magazine-card {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .magazine-card:hover {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}
