/*
Theme Name: Dream Travel Theme
Theme URI: https://dream-travel-live.ru
Description: Travel blog child theme based on Twenty Twenty-Five
Author: Dream Travel Live
Template: twentytwentyfive
Version: 1.2
*/

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

/* ===== BACKGROUND ===== */
html {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

body {
    font-family: 'Manrope', system-ui, sans-serif;
    background: #ffffff !important;
    background-color: #ffffff !important;
    overflow-x: hidden;
}

/* Block theme wrapper */
.wp-site-blocks {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Keep generic wrappers white as well */
.wp-site-blocks > .wp-block-group.has-base-background-color:not([class*="template-part"]) {
    background-color: #ffffff !important;
}

/* ===== HEADER — dark teal, sticky ===== */
.wp-block-template-part:first-of-type,
.wp-block-template-part:first-of-type .wp-block-group {
    background-color: #0c4a6e !important;
}

/* Site title in header */
.wp-block-template-part .wp-block-site-title a,
.wp-block-template-part .wp-block-site-title {
    color: #ffffff !important;
    font-family: 'Playfair Display', serif !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Navigation links in header */
.wp-block-template-part .wp-block-navigation a,
.wp-block-template-part .wp-block-navigation-item__content {
    color: #bae6fd !important;
    font-weight: 600;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.wp-block-template-part .wp-block-navigation a:hover {
    color: #ffffff !important;
}

/* Mobile nav overlay */
.wp-block-navigation__responsive-container.is-menu-open {
    background-color: #0c4a6e !important;
}
.wp-block-navigation__responsive-container.is-menu-open a {
    color: #e0f2fe !important;
}

/* Dropdown submenus */
.wp-block-navigation__submenu-container {
    background-color: #0e4f73 !important;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    min-width: 180px;
}
.wp-block-navigation__submenu-container a {
    color: #e0f2fe !important;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem !important;
}
.wp-block-navigation__submenu-container a:hover {
    background-color: rgba(255,255,255,0.1);
    color: #ffffff !important;
}

/* ===== MAIN CONTENT AREA ===== */
main.wp-block-group {
    background: #ffffff !important;
}

/* ===== HOMEPAGE — post grid ===== */

/* Outer query loop wrapper — transparent to show bg */
.wp-block-query {
    background: transparent !important;
}
.wp-block-post-template {
    background: transparent !important;
}

/* Each post card */
.wp-block-post-template li.wp-block-post,
.wp-block-post-template .wp-block-post {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14) !important;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.wp-block-post-template li.wp-block-post:hover,
.wp-block-post-template .wp-block-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.22) !important;
}

/* Featured image in card */
.wp-block-post .wp-block-post-featured-image {
    overflow: hidden;
    margin: 0 !important;
    border-radius: 0 !important;
    flex-shrink: 0;
}
.wp-block-post .wp-block-post-featured-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.wp-block-post:hover .wp-block-post-featured-image img {
    transform: scale(1.06);
}

/* Categories above title */
.wp-block-post .wp-block-post-terms {
    padding: 1rem 1.2rem 0;
}
.wp-block-post .wp-block-post-terms a {
    color: #0891b2 !important;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

/* Card title */
.wp-block-post .wp-block-post-title {
    padding: 0.5rem 1.2rem 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}
.wp-block-post .wp-block-post-title a {
    color: #0c4a6e !important;
    text-decoration: none;
}
.wp-block-post .wp-block-post-title a:hover {
    color: #0891b2 !important;
}

/* Excerpt */
.wp-block-post .wp-block-post-excerpt {
    padding: 0.5rem 1.2rem 0.3rem;
    color: #475569;
    font-size: 0.87rem;
    line-height: 1.65;
    flex-grow: 1;
}
.wp-block-post .wp-block-post-excerpt__more-link {
    color: #0891b2 !important;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Date */
.wp-block-post .wp-block-post-date {
    padding: 0.3rem 1.2rem 1rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Pagination */
.wp-block-query-pagination {
    background: transparent !important;
    padding: 1rem 0 2rem;
}
.wp-block-query-pagination a,
.wp-block-query-pagination-numbers a {
    color: #0891b2 !important;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    transition: background 0.2s;
}
.wp-block-query-pagination a:hover {
    background: #ffffff;
    color: #0c4a6e !important;
}

/* ===== SINGLE POST ===== */
/* Title area above the article */
.wp-block-post .wp-block-post-title.wp-block-post-title {
    background: transparent;
}

/* Post content */
.wp-block-post-content {
    background: #ffffff !important;
    padding: 2rem 2.5rem 3rem !important;
    margin-top: 2.5rem;
}

/* Header above content (title, date, category) */
.wp-block-group.alignwide:has(.wp-block-post-title) {
    padding: 0 !important;
    margin-bottom: 0;
}

/* Post title on single */
h1.wp-block-post-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 2.2rem !important;
    color: #0c4a6e !important;
    text-align: center;
    line-height: 1.25;
}

/* Featured image in single post */
.wp-block-post-featured-image img {
    border-radius: 10px;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6, .wp-block-heading {
    font-family: 'Manrope', system-ui, sans-serif;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    color: #0c4a6e;
}
p, li {
    font-family: 'Manrope', system-ui, sans-serif;
    line-height: 1.85;
    color: #1e293b;
}
a {
    color: #0891b2;
    transition: color 0.2s;
}

/* ===== BLOCKS ===== */

/* Tables */
.wp-block-table figure {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 0;
}
.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}
.wp-block-table thead {
    background-color: #0891b2 !important;
}
.wp-block-table thead th {
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.75rem 1rem;
    text-align: left;
}
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: #e0f2fe !important;
}
.wp-block-table td {
    padding: 0.6rem 1rem;
    border-color: #bae6fd;
    vertical-align: top;
}
figcaption {
    color: #64748b;
    font-size: 0.8rem;
    padding: 0.4rem 0;
    text-align: center;
}

/* Colored columns */
.wp-block-column.has-background {
    border-radius: 10px;
    padding: 1.2rem 1.3rem !important;
}

/* Separator */
.wp-block-separator {
    border-color: #bae6fd !important;
    margin: 2.5rem auto;
    opacity: 1;
}

/* Pullquote */
.wp-block-pullquote {
    border-left: 5px solid #0891b2 !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%) !important;
    border-radius: 0 10px 10px 0;
    padding: 1.2rem 1.5rem !important;
    margin: 1.75rem auto !important;
    max-width: 42rem;
    text-align: left !important;
}
.wp-block-pullquote blockquote {
    margin: 0;
}
.wp-block-pullquote blockquote p {
    color: #0c4a6e !important;
    font-style: italic;
    font-weight: 600;
    font-size: 1rem !important;
    line-height: 1.65 !important;
}

/* Tags */
.wp-block-post-terms.is-style-post-terms-1 a {
    background: #e0f2fe;
    color: #0891b2 !important;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin: 0.2rem;
    transition: background 0.2s;
}
.wp-block-post-terms.is-style-post-terms-1 a:hover {
    background: #0891b2;
    color: #ffffff !important;
}

/* ===== POST NAVIGATION ===== */
nav.wp-block-group[aria-label] {
    background: rgba(255,255,255,0.95) !important;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.wp-block-post-navigation-link a {
    color: #0891b2 !important;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}
.wp-block-post-navigation-link a:hover {
    color: #0c4a6e !important;
}

/* ===== FOOTER ===== */
.wp-block-template-part:last-of-type,
.wp-block-template-part:last-of-type .wp-block-group {
    background-color: #0c4a6e !important;
    color: #e0f2fe !important;
}
.wp-block-template-part:last-of-type *:not(a) {
    color: #bae6fd !important;
}
.wp-block-template-part:last-of-type .wp-block-site-title a {
    color: #ffffff !important;
}

/* ===== ACCESSIBILITY & UX ===== */
:focus-visible {
    outline: 3px solid #0891b2;
    outline-offset: 3px;
    border-radius: 4px;
}
img {
    max-width: 100%;
    height: auto;
}
/* Skip link */
.skip-link {
    position: absolute;
    top: -999px;
}
.skip-link:focus {
    top: 0;
    z-index: 9999;
    background: #0891b2;
    color: #fff;
    padding: 0.5rem 1rem;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
    html {
        background-attachment: scroll; /* fixed breaks on iOS */
    }

    h1.wp-block-post-title {
        font-size: 1.5rem !important;
    }
    h2, .wp-block-heading[style*="font-size"] {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    h3 { font-size: 1.05rem !important; }

    .wp-block-pullquote blockquote p {
        font-size: 0.95rem !important;
    }

    .wp-block-table {
        overflow-x: auto;
        display: block;
        -webkit-overflow-scrolling: touch;
    }
    .wp-block-table table { min-width: 480px; font-size: 0.82rem; }
    .wp-block-table td, .wp-block-table th { padding: 0.4rem 0.6rem; }

    .wp-block-columns { flex-direction: column !important; }
    .wp-block-column {
        width: 100% !important;
        flex-basis: 100% !important;
        margin-bottom: 0.8rem !important;
    }

    .wp-block-post-content {
        padding: 1.2rem 1rem 2rem !important;
        border-radius: 8px;
    }
    .wp-block-post .wp-block-post-featured-image img {
        height: 180px;
    }
    .wp-block-post-template li.wp-block-post {
        border-radius: 8px !important;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    h1.wp-block-post-title { font-size: 1.8rem !important; }
}

/* ===== NAVIGATION FIX — force white links in dark header ===== */

/* All navigation links inside header */
.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content,
.wp-block-template-part .wp-block-navigation a,
.wp-block-template-part .wp-block-navigation-item a,
.wp-block-template-part nav a {
    color: #bae6fd !important;
    font-weight: 600 !important;
}
.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-template-part .wp-block-navigation a:hover {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Submenu arrow icon */
.wp-block-template-part .wp-block-navigation .wp-block-navigation__submenu-icon svg {
    stroke: #bae6fd !important;
    fill: none;
}

/* Mobile hamburger button */
.wp-block-template-part .wp-block-navigation__responsive-container-open,
.wp-block-template-part .wp-block-navigation__responsive-container-close {
    color: #ffffff !important;
}
.wp-block-template-part .wp-block-navigation__responsive-container-open svg,
.wp-block-template-part .wp-block-navigation__responsive-container-close svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

/* Mobile overlay */
.wp-block-navigation__responsive-container.is-menu-open {
    background-color: #0c4a6e !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    color: #e0f2fe !important;
}

/* ===== HERO SECTION (home page) ===== */
.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0a3d5e 0%, #0c6490 60%, #0891b2 100%);
    text-align: center;
    color: #fff;
}
.hero-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #fff !important;
}
.hero-section p {
    font-size: 1.2rem;
    color: #e0f2fe !important;
    max-width: 620px;
    margin: 0 auto 2rem;
}

/* ===== READING PROGRESS BAR ===== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0891b2 var(--scroll, 0%), transparent var(--scroll, 0%));
    z-index: 99999;
    width: 100%;
    pointer-events: none;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 36px;
    right: 36px;
    background: #0891b2;
    color: #fff !important;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.25s ease;
    z-index: 9998;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-3px);
    background: #0369a1;
}

/* ===== UPGRADE card hover (more dynamic) ===== */
.wp-block-post-template li.wp-block-post:hover,
.wp-block-post-template .wp-block-post:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 20px 48px rgba(10,61,94,0.22) !important;
}
.wp-block-post:hover .wp-block-post-featured-image img {
    transform: scale(1.07) !important;
}
