/* Custom Styles for Vanilla JS Version */

/* Smooth transitions (exclude map internals) */
* {
    transition-property: opacity, transform, background-color, border-color;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Yandex Maps: disable global transitions on map internals */
#map,
#map *,
[class*="ymaps-"] {
    transition-property: none !important;
    transition-duration: 0s !important;
}

/* Modal animations */
#route-modal {
    backdrop-filter: blur(4px);
}

#route-modal.active,
.route-modal-overlay.active {
    display: flex !important;
}

/* Details panel slide animation */
#details-panel.open {
    transform: translateX(0) !important;
}

/* Tabs styling */
.tabs-list {
    display: grid;
    background-color: var(--muted);
    border-radius: var(--radius);
    padding: 4px;
}

.tab-trigger {
    background-color: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--muted-foreground);
    transition: all 0.2s;
}

.tab-trigger:hover {
    background-color: var(--background);
}

.tab-trigger.active {
    background-color: var(--background);
    color: var(--foreground);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Checkbox styling */
.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--input);
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    transition: all 0.2s;
}

.checkbox:hover {
    border-color: var(--ring);
}

.checkbox.checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Slider styling */
.slider-container {
    position: relative;
    width: 100%;
    height: 20px;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--muted);
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-webkit-slider-thumb:hover {
    background: var(--primary);
    opacity: 0.9;
}

.slider::-moz-range-thumb:hover {
    background: var(--primary);
    opacity: 0.9;
}

/* Badge animations */
.badge {
    transition: all 0.2s;
}

.badge:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Route card hover effects */
.route-card {
    transition: all 0.3s;
}

.route-card:hover {
    transform: translateY(-4px);
}

.route-card img {
    transition: transform 0.3s;
}

.route-card:hover img {
    transform: scale(1.05);
}

/* Map POI markers hover */
.poi-marker {
    cursor: pointer;
    transition: transform 0.2s;
}

.poi-marker:hover {
    transform: scale(1.1);
}

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

::-webkit-scrollbar-track {
    background: var(--muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
    border-radius: 4px;
}

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

/* Select dropdown styling */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select select {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: var(--text-sm);
    cursor: pointer;
    appearance: none;
}

.custom-select::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 10px;
    color: var(--muted-foreground);
}

.custom-select select:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgba(90, 141, 184, 0.1);
}

/* Loading spinner */
.spinner {
    border: 3px solid var(--muted);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Slide up animation */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

/* Responsive navigation */
@media (max-width: 768px) {
    #mobile-menu {
        display: none;
    }

    #mobile-menu.active {
        display: block;
    }
}

/* Chart tooltip */
.chart-tooltip {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: var(--text-sm);
    color: var(--foreground);
    pointer-events: none;
}

/* Yandex Map custom controls */
.map-legend {
    background: white;
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: var(--text-xs);
    max-width: 200px;
}

.map-control-btn {
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--foreground);
}

.map-control-btn:hover {
    background-color: var(--muted);
}

/* POI popup */
.poi-popup {
    max-width: 300px;
    min-width: 250px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 16px;
    position: absolute;
    z-index: 1000;
}

.poi-popup::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
}

/* View mode toggle active state */
.view-toggle-active {
    border-color: var(--sky-blue) !important;
    background-color: var(--sky-blue) !important;
    color: white !important;
}

/* Route line on map */
.route-line {
    pointer-events: stroke;
    transition: stroke-width 0.2s, opacity 0.2s;
}

.route-line:hover {
    stroke-width: 5px;
}

.route-line.active {
    stroke-width: 5px;
    opacity: 1;
}

/* Desktop dropdown menu styling */
.group .absolute {
    display: none;
}

.group:hover .absolute {
    display: block;
}

/* Add padding to group to prevent dropdown from closing */
.group:hover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
}

/* ===================================
   ACCESSIBILITY BUTTON
   =================================== */

.accessibility-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.accessibility-btn:hover {
    color: #1f2937;
    background: #f9fafb;
}

/* Grid responsive */
@media (max-width: 1024px) {
    #map-container {
        margin-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .lg\:flex-row {
        flex-direction: column;
    }

    #details-panel {
        width: 100%;
        top: 0;
        height: 100vh;
    }

    #close-details-btn {
        right: 100%;
    }

    #close-details-btn.active {
        right: 0;
    }
}

/* Footer Styles */
#main-footer {
    background: linear-gradient(180deg, #0c1929 0%, #162a43 50%, #1a3550 100%);
    color: #ffffff;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

/* ===================================
   STARRY SKY ANIMATION
   =================================== */

.stars-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Generate star backgrounds with CSS */
.stars {
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    animation: twinkle 4s ease-in-out infinite;
}

.stars-small {
    background-image:
        radial-gradient(1px 1px at 20px 30px, white, transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 50px 160px, white, transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 200px 50px, white, transparent),
        radial-gradient(1px 1px at 220px 140px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 260px 90px, white, transparent),
        radial-gradient(1px 1px at 300px 20px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 340px 130px, white, transparent),
        radial-gradient(1px 1px at 380px 60px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 420px 100px, white, transparent),
        radial-gradient(1px 1px at 460px 150px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 500px 40px, white, transparent);
    background-size: 520px 200px;
    opacity: 0.8;
    animation-delay: 0s;
}

.stars-medium {
    background-image:
        radial-gradient(1.5px 1.5px at 100px 50px, white, transparent),
        radial-gradient(1.5px 1.5px at 200px 150px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1.5px 1.5px at 300px 80px, white, transparent),
        radial-gradient(1.5px 1.5px at 400px 180px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 150px 120px, white, transparent),
        radial-gradient(1.5px 1.5px at 250px 30px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1.5px 1.5px at 350px 160px, white, transparent),
        radial-gradient(1.5px 1.5px at 450px 70px, rgba(255,255,255,0.8), transparent);
    background-size: 500px 220px;
    opacity: 0.7;
    animation-delay: 1s;
}

.stars-large {
    background-image:
        radial-gradient(2px 2px at 150px 100px, #fff, transparent),
        radial-gradient(2.5px 2.5px at 350px 50px, rgba(200,220,255,0.9), transparent),
        radial-gradient(2px 2px at 250px 180px, #fff, transparent),
        radial-gradient(2.5px 2.5px at 450px 130px, rgba(255,240,200,0.9), transparent),
        radial-gradient(2px 2px at 50px 60px, #fff, transparent);
    background-size: 550px 250px;
    opacity: 0.9;
    animation-delay: 2s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Shooting stars - падают вниз-вправо */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    /* Градиент: слева прозрачный (хвост), справа яркий (голова) */
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,1) 100%);
    border-radius: 50%;
    transform: rotate(35deg);
    animation: shooting 6s ease-in-out infinite;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    /* Яркая точка справа (голова звезды) - движется вниз-вправо */
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255,255,255,0.8);
}

.shooting-star:nth-child(4) {
    top: 10%;
    left: 70%;
    animation-delay: 0s;
}

.shooting-star:nth-child(5) {
    top: 5%;
    left: 40%;
    animation-delay: 2.5s;
}

.shooting-star:nth-child(6) {
    top: 8%;
    left: 20%;
    animation-delay: 4.5s;
}

@keyframes shooting {
    0% {
        transform: rotate(35deg) translateX(0);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    15% {
        transform: rotate(35deg) translateX(300px);
        opacity: 0;
    }
    100% {
        opacity: 0;
        transform: rotate(35deg) translateX(300px);
    }
}

/* Aurora / Northern lights effect */
.aurora {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background:
        linear-gradient(180deg,
            transparent 0%,
            rgba(0, 255, 150, 0.03) 20%,
            rgba(0, 200, 255, 0.05) 40%,
            rgba(100, 0, 255, 0.03) 60%,
            transparent 100%
        );
    filter: blur(40px);
    animation: aurora-wave 15s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes aurora-wave {
    0%, 100% {
        transform: translateX(-5%) skewX(-5deg);
        opacity: 0.4;
    }
    25% {
        transform: translateX(3%) skewX(3deg);
        opacity: 0.7;
    }
    50% {
        transform: translateX(5%) skewX(5deg);
        opacity: 0.5;
    }
    75% {
        transform: translateX(-3%) skewX(-3deg);
        opacity: 0.6;
    }
}

/* Mountain silhouette at the bottom of footer */
#main-footer::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,120 L0,80 L100,60 L200,75 L300,40 L400,65 L500,30 L600,55 L700,25 L800,50 L900,35 L1000,60 L1100,45 L1200,70 L1300,50 L1440,65 L1440,120 Z' fill='rgba(0,0,0,0.3)'/%3E%3C/svg%3E") bottom/cover no-repeat;
    pointer-events: none;
    z-index: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 0;
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-column {
    min-width: 0;
}

.footer-heading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 20px;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--sky-blue);
    padding-left: 24px;
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
}

.contact-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--sky-blue);
}

.contact-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--sky-blue);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-btn:hover {
    background: var(--sky-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(90, 141, 184, 0.3);
}

.social-btn i {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--sky-blue);
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-content {
        padding: 40px 16px 0;
    }

    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 32px;
        margin-bottom: 32px;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

/* ===================================
   PAGE TEMPLATE STYLES
   =================================== */

/* Page Header */
.page-header {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    padding-top: 100px;
    margin-bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.page-header-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 50%, #1a202c 100%);
    z-index: 0;
}

.page-header-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(90, 141, 184, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(56, 189, 248, 0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.page-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* Decorative mountain silhouette */
.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,80 L0,60 Q180,30 360,50 T720,35 T1080,55 T1440,40 L1440,80 Z' fill='%23ffffff'/%3E%3C/svg%3E") bottom/cover no-repeat;
    z-index: 2;
}

.page-header-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding-bottom: 100px;
    padding-top: 90px;
}
.section-description {
    margin-bottom: 25px !important;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--sky-blue);
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.4);
}

.breadcrumb-current {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Page Title */
.page-header-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.page-header-excerpt {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 16px;
    max-width: 600px;
    line-height: 1.6;
}

/* News single meta (category + date in page-header) */
.page-header .news-single-meta {
    display: flex !important;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.page-header .news-single-meta .news-category {
    font-size: 0.8rem;
    padding: 0.35rem 0.9rem;
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-radius: 9999px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(4px);
}

.page-header .news-single-meta .news-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75) !important;
}

.page-header .news-single-meta .news-date svg {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Breadcrumb truncation for long titles */
.breadcrumb-current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

/* Page Content */
.page-content {
    background-color: #ffffff;
    min-height: 50vh;
}

.page-article {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Featured Image */
.page-featured-image {
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.page-featured-image .featured-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.page-featured-image:hover .featured-img {
    transform: scale(1.02);
}

/* Prose Typography */
.page-entry-content.prose {
    color: #374151;
    line-height: 1.8;
}

.page-entry-content.prose h1,
.page-entry-content.prose h2,
.page-entry-content.prose h3,
.page-entry-content.prose h4,
.page-entry-content.prose h5,
.page-entry-content.prose h6 {
    color: #1f2937;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
}

.page-entry-content.prose h2 {
    font-size: 1.875rem;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #e5e7eb;
}

.page-entry-content.prose h3 {
    font-size: 1.5rem;
}

.page-entry-content.prose h4 {
    font-size: 1.25rem;
}

.page-entry-content.prose p {
    margin-bottom: 1.5em;
}

.page-entry-content.prose a {
    color: var(--sky-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.page-entry-content.prose a:hover {
    color: #3b82f6;
    border-bottom-color: currentColor;
}

.page-entry-content.prose ul,
.page-entry-content.prose ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.page-entry-content.prose li {
    margin-bottom: 0.5em;
}

.page-entry-content.prose ul li::marker {
    color: var(--sky-blue);
}

.page-entry-content.prose ol li::marker {
    color: var(--sky-blue);
    font-weight: 600;
}

.page-entry-content.prose blockquote {
    margin: 2em 0;
    padding: 1.5em 2em;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid var(--sky-blue);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #4b5563;
}

.page-entry-content.prose blockquote p:last-child {
    margin-bottom: 0;
}

.page-entry-content.prose img {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 2em auto;
    display: block;
}

.page-entry-content.prose figure {
    margin: 2em 0;
}

.page-entry-content.prose figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.75em;
}

.page-entry-content.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.9375rem;
}

.page-entry-content.prose th,
.page-entry-content.prose td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.page-entry-content.prose th {
    background: #f8fafc;
    font-weight: 600;
    color: #1f2937;
}

.page-entry-content.prose tr:hover td {
    background: #f9fafb;
}

.page-entry-content.prose code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
    color: #be185d;
}

.page-entry-content.prose pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5em;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2em 0;
}

.page-entry-content.prose pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.page-entry-content.prose hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 3em 0;
}

/* Page Links (pagination) */
.page-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid #e5e7eb;
}

.page-links-title {
    font-weight: 600;
    color: #374151;
    margin-right: 8px;
}

.page-links a,
.page-links > span:not(.page-links-title) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-links a {
    background: #f1f5f9;
    color: #374151;
    text-decoration: none;
}

.page-links a:hover {
    background: var(--sky-blue);
    color: #ffffff;
}

.page-links > span:not(.page-links-title) {
    background: var(--sky-blue);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        min-height: 280px;
        padding-top: 80px;
    }

    .page-header-content {
        padding-bottom: 80px;
    }

    .page-header::after {
        height: 50px;
    }

    .page-header-title {
        font-size: 1.75rem;
    }

    .page-header-excerpt {
        font-size: 1rem;
    }

    .breadcrumb {
        flex-wrap: wrap;
        font-size: 12px;
        gap: 4px 6px;
    }

    .breadcrumb-current {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
    }

    .page-header .news-single-meta {
        gap: 12px;
        margin-top: 14px;
    }

    .page-header .news-single-meta .news-category {
        font-size: 0.7rem;
        padding: 0.25rem 0.7rem;
    }

    .page-header .news-single-meta .news-date {
        font-size: 0.8rem;
    }

    .page-entry-content.prose h2 {
        font-size: 1.5rem;
    }

    .page-entry-content.prose h3 {
        font-size: 1.25rem;
    }

    .page-entry-content.prose blockquote {
        padding: 1em 1.25em;
    }
}

/* ===================================
   MOBILE NAVIGATION & HEADER FIXES
   =================================== */

/* Mobile header - smaller on small screens */
@media (max-width: 768px) {
    #navigation {
        padding: 0;
        z-index: 9999 !important;
    }

    #navigation .py-4 {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    /* Smaller logo on mobile */
    .nav-logo img {
        height: 40px !important;
    }

    /* Mobile menu button */
    #mobile-menu-toggle {
        padding: 0.5rem;
    }

    #mobile-menu-toggle i {
        width: 24px;
        height: 24px;
    }

    /* Mobile menu styles */
    #mobile-menu {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    #mobile-menu > div {
        padding: 1rem;
    }

    #mobile-menu a,
    #mobile-menu button {
        padding: 0.75rem 1rem;
        font-size: 15px;
        border-radius: 8px;
    }

    #mobile-menu a:hover,
    #mobile-menu button:hover {
        background: rgba(14, 165, 233, 0.1);
    }
}

/* Mobile menu visibility - only for mobile menu element */
#mobile-menu.hidden {
    display: none !important;
}

#mobile-menu:not(.hidden) {
    display: block !important;
}
