/*
 * Czechs Online Theme
 * Newspaper Style CSS
 * Based on czechsonlinecraft_OK theme
 */

/* Additional custom styles for Lateres integration */
/* Logo colors inspired palette */
:root {
    --color-primary: #DC143C;      /* Rosso (torri, bandiera ceca) */
    --color-secondary: #0066CC;    /* Blu (CZ del logo) */
    --color-success: #009933;      /* Verde (IT del logo, bandiera italiana) */
    --color-accent: #11457E;       /* Blu navy scuro */
    --main-content-width: 1260px;
    --side-overlay-image-height: 1500px;
    --side-overlay-width: min(300px, calc((100vw - var(--main-content-width)) / 2));
    --side-overlay-offset: max(0px, calc(((100vw - var(--main-content-width)) / 2) - var(--side-overlay-width)));
}

.hover-primary:hover {
    color: var(--color-secondary) !important;
}

.hover-success:hover {
    color: var(--color-success) !important;
}

.hover-glow:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Newspaper specific styles */
.newspaper-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--color-primary, #DC143C);
}

/* Site logo image styles */
.site-logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    transition: all 0.3s ease;
    object-fit: contain;
}

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

@media (max-width: 576px) {
    .site-logo {
        max-height: 110px;
    }
}

@media (max-width: 360px) {
    .site-logo {
        max-height: 90px;
    }
}

.newspaper-tagline {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Breaking news ticker */
.ticker-wrapper {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    white-space: nowrap;
    display: inline-block;
}

@media (max-width: 575.98px) {
    .ticker-item {
        padding-right: 2.5rem;
        min-height: 2.5rem;
    }

    .category-tag {
        font-size: 0.875rem;
        min-height: 2.75rem;
        display: inline-flex;
        align-items: center;
        padding: 0.6rem 0.85rem;
    }
}

/* Back to top button */
.btn-back-to-top {
    display: none;
}

.btn-back-to-top.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Social links */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Footer styles */
.footer-links a:hover {
    color: var(--color-primary, #DC143C) !important;
}

/* Side advertising overlays */
.viewport-side-ad-overlay {
    position: fixed !important;
    top: 0 !important;
    bottom: auto !important;
    width: var(--side-overlay-width);
    max-width: var(--side-overlay-width);
    height: 100vh !important;
    z-index: 2;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    overflow: hidden;
}

/* Banner links styling */
.viewport-side-ad-overlay .banner-link,
.viewport-side-ad-overlay .viewport-side-ad-overlay-track {
    display: block;
    width: 100%;
    height: var(--side-overlay-image-height);
    text-decoration: none;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.1s linear;
    will-change: transform;
}

/* Add subtle hover effect to indicate clickability */
.viewport-side-ad-overlay .banner-link:hover img {
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

/* Generic banner ad links (header, sidebar, bottom banners) */
.banner-ad-link {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.banner-ad-link:hover {
    opacity: 0.95;
}

/* Ensure images inside fill width and maintain height */
.viewport-side-ad-overlay img {
    display: block;
    width: 100%;
    height: var(--side-overlay-image-height);
    margin: 0;
    padding: 0;
    vertical-align: top;
    object-fit: contain;
    object-position: center top;
}

/* Fallback text overlays (when no dynamic banner) */
.viewport-side-ad-overlay.fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: var(--side-overlay-width);
    max-width: var(--side-overlay-width);
    padding: 2rem;
    text-align: center;
    color: white;
    font-weight: bold;
}

.viewport-side-ad-overlay.left {
    left: var(--side-overlay-offset);
}

.viewport-side-ad-overlay.right {
    right: var(--side-overlay-offset);
}

.ad-overlay-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.ad-overlay-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.ad-overlay-cta {
    background: white;
    color: #DC143C;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
}

.ad-overlay-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Main content wrapper */
.main-content-wrapper {
    position: relative;
    z-index: 3;
    max-width: 1260px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 40px rgba(0,0,0,0.2);
}

/* Responsive adjustments */
/* Large desktops - full width banners */
@media (min-width: 1600px) {
    .viewport-side-ad-overlay {
        width: var(--side-overlay-width);
    }
}

/* Medium desktops - no side banners, use more width */
@media (max-width: 1599px) and (min-width: 1400px) {
    :root {
        --main-content-width: 1380px;
    }

    .main-content-wrapper {
        max-width: 1380px;
    }
}

/* Small desktops/laptops - no side banners, use more width */
@media (max-width: 1399px) and (min-width: 1200px) {
    :root {
        --main-content-width: 1260px;
    }

    .main-content-wrapper {
        max-width: 1260px;
    }
}

/* Below 1600px - hide side banners */
@media (max-width: 1599px) {
    .viewport-side-ad-overlay {
        display: none !important;
    }

    .page-wrapper {
        background-image: none !important;
        background-color: #f8f9fa;
    }
}

/* Tablets and below */
@media (max-width: 1199px) {
    :root {
        --main-content-width: 1260px;
    }

    .main-content-wrapper {
        max-width: 100%;
    }
}

/* Article content styling */
.content-body {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.content-body h2,
.content-body h3,
.content-body h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

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

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

/* Newsletter form */
.newsletter-form-footer input:focus {
    border-color: white;
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

/* Category tags */
.category-tag {
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.category-tag:hover {
    transform: translateY(-1px);
}
