/*
Theme Name: Autohled Modern
Theme URI: https://autohledmagazin.cz
Author: Autohled Team
Author URI: https://autohled.eu
Description: Moderní téma pro automobilový magazín Autohled - zaměřené na zapojení čtenářů a konzumaci článků s důrazem na mobilní zařízení.
Version: 1.0.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: autohled-modern
Tags: blog, news, magazine, custom-menu, featured-images, responsive-layout, rtl-language-support

Autohled Modern Theme - Český automobilový magazín
*/

/* ==========================================================================
   Custom CSS (beyond Tailwind)
   ========================================================================== */

/* Typography for article content */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

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

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #111827;
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.article-content a {
    color: #dc2626;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    color: #b91c1c;
}

.article-content img {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid #dc2626;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #4b5563;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Sticky sidebar */
@media (min-width: 1024px) {
    .sticky-sidebar {
        position: sticky;
        top: 5rem;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
    }
}

/* Ad slot styling */
.ad-slot {
    background-color: #f9fafb;
    border: 1px dashed #e5e7eb;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ad-slot:empty::before {
    content: 'Reklama';
}

/* Hide ad slot borders when ad is present */
.ad-slot:not(:empty) {
    background: transparent;
    border: none;
    min-height: auto;
}

/* Infinite scroll loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

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

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Category badge colors */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-radius: 9999px;
}

/* Share buttons */
.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.share-button:hover {
    transform: translateY(-2px);
}

.share-button--facebook {
    background-color: #1877f2;
    color: white;
}

.share-button--twitter {
    background-color: #1da1f2;
    color: white;
}

.share-button--linkedin {
    background-color: #0a66c2;
    color: white;
}

.share-button--copy {
    background-color: #6b7280;
    color: white;
}

/* Hamburger menu animation */
.hamburger-line {
    transition: all 0.3s ease;
}

.hamburger-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #dc2626;
    color: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 50;
}

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

.back-to-top:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
}

/* Mega menu styles */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Card hover effects */
.article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image zoom on hover */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.05);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Ad responsive visibility */
@media (max-width: 800px) {
    .banner-desktop { display: none !important; }
}
@media (min-width: 801px) {
    .banner-mobile { display: none !important; }
}

/* Ad container sizing */
.banner-placeholder {
    margin: auto;
    max-width: 100%;
}

/* Print styles */
@media print {
    .no-print,
    .ad-slot,
    .share-buttons,
    .back-to-top,
    header,
    footer,
    .sidebar {
        display: none !important;
    }

    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }
}
