/* =========================================================
   OTTIMO BLOG — Stylesheet
   Brand-consistent with ottimo.ai main site
   Font: DM Sans | Colors: Slate-950 / Blue-400..600 / White
   ========================================================= */

:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --amber-400: #fbbf24;
    --amber-300: #fcd34d;
    --white: #ffffff;

    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --nav-height: 64px;
    --max-width: 1280px;
    --content-width: 780px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--slate-950);
    color: var(--slate-300);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--blue-400); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber-400); }

img, video { max-width: 100%; display: block; }

/* =========================================================
   NAVIGATION — matches main site style
   ========================================================= */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
    background: rgba(2, 6, 23, 0.96);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    text-decoration: none;
}

.nav-logo:hover { color: var(--white); }

.nav-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.nav-logo-text {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.nav-logo-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--white);
}

.nav-logo-dot {
    color: var(--blue-400);
}

.nav-logo-divider {
    color: var(--slate-600);
    font-weight: 300;
    font-size: 1.1rem;
    margin: 0 2px;
}

.nav-logo-sub {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--slate-400);
    letter-spacing: 0.08em;
}

.nav-links { display: flex; align-items: center; gap: 24px; }

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate-300);
    padding: 6px 0;
    transition: color 0.2s;
}

.nav-link:hover { color: var(--white); }

.nav-link-blog { color: var(--blue-400); }

/* =========================================================
   HERO — mountain background matching main site
   ========================================================= */
.hero {
    position: relative;
    padding: calc(var(--nav-height) + 80px) 24px 80px;
    text-align: center;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(15, 23, 42, 0.7) 50%,
        rgba(15, 23, 42, 0.9) 100%);
}

.hero-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-body);
    font-size: clamp(2.4rem, 5.5vw, 3.6rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.15s;
}

.hero-title-comma {
    color: var(--white);
}

.hero-title-accent {
    background: linear-gradient(to right, var(--blue-400), var(--blue-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--slate-300);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.65;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.35s;
}

/* =========================================================
   MOSAIC GRID (Home page)
   ========================================================= */
.mosaic-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.mosaic-card {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: var(--slate-900);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.35s;
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
}

.mosaic-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.15);
    color: inherit;
}

.mosaic-card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
}

.mosaic-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.mosaic-card:hover .mosaic-card-image img {
    transform: scale(1.06);
}

.mosaic-card-image::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, var(--slate-900), transparent);
    pointer-events: none;
}

.mosaic-card-body {
    padding: 20px 22px 24px;
}

.mosaic-card-vibe {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber-400);
    background: rgba(251, 191, 36, 0.08);
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 10px;
}

.mosaic-card-title {
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.mosaic-card:hover .mosaic-card-title { color: var(--blue-400); }

.mosaic-card-cities {
    font-size: 0.85rem;
    color: var(--slate-500);
}

.mosaic-card-cities span {
    color: var(--slate-400);
}

/* Loading & Empty states */
.mosaic-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    color: var(--slate-500);
    gap: 20px;
}

/* =========================================================
   ENTRY / POST PAGE
   ========================================================= */
.entry-page {
    padding-top: var(--nav-height);
    min-height: 100vh;
}

.entry {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.entry-back, .entry-back-bottom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--slate-500);
    margin-bottom: 28px;
    transition: color 0.2s;
}

.entry-back:hover, .entry-back-bottom:hover { color: var(--blue-400); }

.entry-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.entry-vibe {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber-400);
    background: rgba(251, 191, 36, 0.1);
    padding: 4px 12px;
    border-radius: 100px;
}

.entry-date {
    font-size: 0.85rem;
    color: var(--slate-500);
}

.entry-title {
    font-family: var(--font-body);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 16px;
}

.entry-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.city-tag {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--blue-400);
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.15);
    padding: 5px 14px;
    border-radius: 100px;
}

/* Video */
.entry-video-wrap {
    margin-bottom: 48px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--slate-900);
}

.entry-video-wrap video {
    width: 100%;
    display: block;
    background: #000;
}

/* Entry body — city sections */
.city-section {
    margin-bottom: 56px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.city-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.city-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.city-section-name {
    font-family: var(--font-body);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--white);
}

.city-section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(96, 165, 250, 0.2), transparent);
}

.content-block {
    margin-bottom: 32px;
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-block-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-400);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-block-label::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 2px;
    background: var(--blue-600);
    border-radius: 2px;
}

.content-block-text {
    font-size: 1.02rem;
    color: var(--slate-300);
    line-height: 1.8;
}

/* Entry footer CTA */
.entry-cta {
    text-align: center;
    padding: 48px 24px;
    margin: 56px 0 32px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.entry-cta p {
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    padding: 12px 28px;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.25);
}

.entry-back-bottom {
    display: block;
    text-align: center;
    margin-top: 32px;
}

.entry-not-found {
    text-align: center;
    padding: 120px 24px;
}

.entry-not-found h2 {
    font-family: var(--font-body);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.entry-not-found p {
    color: var(--slate-500);
    margin-bottom: 28px;
}

/* =========================================================
   FOOTER — matches main site style
   ========================================================= */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 28px 24px;
    background: var(--slate-950);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--white);
}

.footer-dot {
    color: var(--blue-400);
}

.footer-logo-img {
    border-radius: 6px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--slate-600);
}

.footer-links a { color: var(--slate-500); }
.footer-links a:hover { color: var(--blue-400); }
.footer-sep { color: var(--slate-700); }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Staggered card entrance */
.mosaic-card:nth-child(1)  { animation-delay: 0.05s; }
.mosaic-card:nth-child(2)  { animation-delay: 0.1s; }
.mosaic-card:nth-child(3)  { animation-delay: 0.15s; }
.mosaic-card:nth-child(4)  { animation-delay: 0.2s; }
.mosaic-card:nth-child(5)  { animation-delay: 0.25s; }
.mosaic-card:nth-child(6)  { animation-delay: 0.3s; }
.mosaic-card:nth-child(7)  { animation-delay: 0.35s; }
.mosaic-card:nth-child(8)  { animation-delay: 0.4s; }
.mosaic-card:nth-child(9)  { animation-delay: 0.45s; }
/* =========================================================
   RELATED POSTS CAROUSEL
   Add to the end of blog.css (before @media blocks)
   ========================================================= */

.related-section {
    margin: 56px 0 24px;
    padding: 40px 0 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.related-title {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.related-controls {
    display: flex;
    gap: 8px;
}

.related-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
    font-family: var(--font-body);
    line-height: 1;
}

.related-btn:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(96, 165, 250, 0.35);
    color: var(--blue-400);
}

.related-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.related-carousel {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -8px;
    padding: 4px 8px 16px;
}

.related-carousel::-webkit-scrollbar {
    display: none;
}

.related-track {
    display: flex;
    gap: 16px;
    padding: 0 4px;
}

.related-card {
    flex: 0 0 calc((100% - 32px) / 3);
    min-width: 220px;
    max-width: 260px;
    scroll-snap-align: start;
    background: var(--slate-900);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s,
                border-color 0.3s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(96, 165, 250, 0.2);
    color: inherit;
}

.related-card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--slate-800);
}

.related-card-image img,
.related-card-image picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    display: block;
}

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

.related-card-body {
    padding: 14px 16px 16px;
}

.related-vibe {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber-400);
    background: rgba(251, 191, 36, 0.08);
    padding: 2px 8px;
    border-radius: 100px;
    margin-bottom: 8px;
}

.related-card-title {
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.35;
    margin: 0 0 6px 0;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card:hover .related-card-title {
    color: var(--blue-400);
}

.related-card-cities {
    font-size: 0.78rem;
    color: var(--slate-400);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive card sizing */
@media (max-width: 900px) {
    .related-card {
        flex: 0 0 calc((100% - 16px) / 2);
    }
}

@media (max-width: 520px) {
    .related-card {
        flex: 0 0 80%;
        max-width: none;
    }
    .related-title {
        font-size: 1.25rem;
    }
    .related-btn {
        width: 36px;
        height: 36px;
    }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet */
@media (max-width: 768px) {
    .mosaic-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .hero { padding-top: calc(var(--nav-height) + 48px); padding-bottom: 56px; }

    .entry { padding: 32px 20px 60px; }

    .city-section-name { font-size: 1.5rem; }

    .entry-cta { padding: 36px 20px; }
}

/* Mobile */
@media (max-width: 480px) {
    :root { --nav-height: 56px; }

    .nav-inner { padding: 0 16px; }
    .nav-logo-icon { width: 30px; height: 30px; }
    .nav-logo-brand { font-size: 1.05rem; }
    .nav-logo-sub { font-size: 0.68rem; }
    .nav-logo-divider { font-size: 0.95rem; }
    .nav-links { gap: 14px; }
    .nav-link { font-size: 0.82rem; }

    .hero { padding: calc(var(--nav-height) + 32px) 16px 40px; min-height: 340px; }
    .hero-subtitle { font-size: 0.98rem; }

    .mosaic-section { padding: 32px 16px 48px; }
    .mosaic-grid { grid-template-columns: 1fr; gap: 14px; }
    .mosaic-card-title { font-size: 1.15rem; }
    .mosaic-card-body { padding: 16px 18px 20px; }

    .entry { padding: 24px 16px 48px; }
    .entry-title { margin-bottom: 12px; }

    .content-block-text { font-size: 0.95rem; }

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* Print styles */
@media print {
    .nav, .entry-cta, .entry-back, .entry-back-bottom, .site-footer { display: none; }
    body { background: #fff; color: #1a1a1a; }
    .entry-page { padding-top: 0; }
    .entry { padding-top: 0; }
    .entry-title { color: #1a1a1a; }
    .city-section-name { color: #1a1a1a; }
    .content-block-text { color: #333; }
    .content-block-label { color: #2563eb; }
}
