/* SuperVikend - Public frontend styles */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --primary:      #ef6c00;
    --primary-dark: #d65a00;
    --primary-light:#fff1e6;
    --accent:       #0f8b8d;
    --dark:         #14213d;
    --dark-soft:    #1e2c50;
    --text:         #28293d;
    --muted:        #6b7280;
    --border:       #e7e5e1;
    --bg:           #f8f6f2;
    --white:        #fff;
    --radius:       16px;
    --radius-sm:    10px;
    --max-w:        1320px;
    --shadow-sm:    0 2px 8px rgba(20, 33, 61, .06);
    --shadow-md:    0 10px 30px rgba(20, 33, 61, .12);
    --shadow-lg:    0 20px 50px rgba(20, 33, 61, .18);
    --header-h:     68px;
    --font-head:    'Poppins', system-ui, -apple-system, sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    margin: 0;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--dark); line-height: 1.25; margin: 0 0 .6rem; }
h1 { font-weight: 700; }
h2, h3, h4 { font-weight: 600; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

::selection { background: var(--primary); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s;
    text-decoration: none !important;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline:hover { background: #fff; color: var(--dark); }

/* ===== Header ===== */
.site-header {
    background: var(--dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-w);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 1.25rem;
    gap: 1rem;
}
.site-logo {
    color: #fff;
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -.02em;
    flex-shrink: 0;
}
.site-logo span { color: var(--primary); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,.08); }
.nav-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: transform .2s, opacity .2s;
}
.nav-toggle .bar::before, .nav-toggle .bar::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: #fff;
    transition: transform .2s, top .2s;
}
.nav-toggle .bar::before { top: -7px; }
.nav-toggle .bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar::after { top: 0; transform: rotate(-45deg); }

.header-nav-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: flex-end;
}
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { color: #cbd3e1; font-size: .92rem; font-weight: 500; white-space: nowrap; }
.main-nav a:hover { color: #fff; text-decoration: none; }

/* Language switcher (desktop: inline pills, mobile: dropdown) */
.lang-switcher { position: relative; }
.lang-switcher-list { display: flex; gap: .4rem; }
.lang-switcher a {
    font-size: .75rem;
    font-weight: 600;
    padding: 4px 9px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 20px;
    color: #cbd3e1;
    transition: background .15s, color .15s, border-color .15s;
}
.lang-switcher a:hover { text-decoration: none; border-color: rgba(255,255,255,.6); color: #fff; }
.lang-switcher a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.lang-switcher a.no-trans { opacity: .45; }
.lang-switcher a.no-trans:hover { opacity: .7; }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .header-nav-area {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--dark-soft);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: .5rem 1.25rem 1.5rem;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .18s, transform .18s, visibility .18s;
        box-shadow: var(--shadow-md);
    }
    .header-nav-area.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .main-nav { flex-direction: column; gap: 0; }
    .main-nav a { padding: .85rem .25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
    .lang-switcher { width: 100%; padding-top: .75rem; }
    .lang-switcher-list { flex-wrap: wrap; }
    .lang-switcher a { font-size: .8rem; padding: 6px 12px; }
}

/* ===== Hero sections ===== */
.hero {
    position: relative;
    color: #fff;
    background: var(--dark) center/cover no-repeat;
    padding: 4.5rem 1.25rem;
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20,33,61,.55) 0%, rgba(20,33,61,.78) 100%);
}
.hero .hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero-eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #ffd9b3;
    margin-bottom: .75rem;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .85rem; }
.hero p.lead { color: #e4e8f1; font-size: 1.15rem; margin: 0 auto 1.75rem; max-width: 560px; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.hero--page { padding: 3.25rem 1.25rem; }
.hero--page h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: .4rem; }
.hero .meta { position: relative; color: #d8deea; font-size: .9rem; }
.hero .meta a { color: #ffd9b3; }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 1.25rem 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span::before { content: ' / '; }

/* ===== Sections ===== */
.section { padding: 3.25rem 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 2.25rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { color: var(--muted); margin: 0; }
.section-head.align-left { text-align: left; margin: 0 0 2rem; }

/* ===== Card grids (destinations / themes) ===== */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.tile-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    box-shadow: var(--shadow-sm);
    transition: transform .25s, box-shadow .25s;
}
.tile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.tile-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.tile-card:hover img { transform: scale(1.06); }
.tile-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20,33,61,0) 35%, rgba(20,33,61,.85) 100%);
}
.tile-card .tile-label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 1.1rem;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.05rem;
    z-index: 1;
}

.theme-grid .tile-card { aspect-ratio: 1 / 1; }

/* ===== Article cards - news layout ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card .card-media { position: relative; overflow: hidden; height: 190px; display: block; }
.article-card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.article-card:hover .card-media img { transform: scale(1.05); }
.article-card-body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.article-card-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.article-card-body a { color: var(--text); }
.article-card-body a:hover { color: var(--primary); text-decoration: none; }
.article-card-meta {
    font-size: .74rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.article-card-date { font-size: .78rem; color: var(--muted); margin-top: auto; }
.article-excerpt { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.55; }

/* Featured first card */
.article-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
}
.article-card--featured .card-media {
    flex: 0 0 52%;
    height: auto;
    min-height: 300px;
    border-radius: var(--radius) 0 0 var(--radius);
}
.article-card--featured .article-card-body {
    padding: 2rem 2.25rem;
    justify-content: center;
    gap: .6rem;
}
.article-card--featured .article-card-body h3 {
    font-size: 1.55rem;
    line-height: 1.3;
}
.article-card--featured .article-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .95rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    color: var(--muted);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: .75rem; }

/* Cover image (article) */
.cover-image-wrap {
    position: relative;
    background: var(--dark) center/cover no-repeat;
}

/* Article body */
.article-body {
    max-width: var(--max-w);
    margin: 2.5rem auto;
    padding: 0 1.25rem;
}
.article-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    /* Prevent any child from breaking out of the column */
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0; /* needed inside CSS grid to allow shrinking */
}
.article-content h2 { margin-top: 2rem; }
.article-content h3 { color: var(--primary); }
.article-content img { border-radius: var(--radius-sm); margin: .5rem 0; display: block; max-width: 100%; height: auto; }
.article-content img,
.article-content video,
.article-content iframe {
    max-width: 100%;
    height: auto;
}
.article-content p {
    margin: 0 0 1.1rem;
    text-align: justify;
    hyphens: auto;
    overflow-wrap: break-word;
}

/* Tables — table-wrapper div scrolls; page stays fixed */
.article-content .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin: 1.5rem 0;
}
.article-content table {
    border-collapse: collapse;
    min-width: 600px; /* forces table to keep its structure */
    width: 100%;
}
.article-content table th,
.article-content table td {
    padding: .55rem .9rem;
    border: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.article-content table thead th {
    background: var(--bg);
    font-weight: 600;
    color: var(--dark);
}
.article-content table tbody tr:nth-child(even) {
    background: #faf9f7;
}

/* Affiliate block */
.affiliate-block {
    background: var(--primary-light);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 1.4rem 1.6rem;
    margin: 1.75rem 0;
}
.affiliate-block h4 { margin: 0 0 .85rem; color: var(--primary-dark); }
.affiliate-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--primary);
    color: #fff;
    padding: .65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin: .25rem .4rem 0 0;
    transition: background .15s, transform .15s;
}
.affiliate-link:hover { background: var(--primary-dark); transform: translateY(-1px); text-decoration: none; }

/* AdSense placeholder */
.adsense-slot { text-align: center; margin: 2rem 0; min-height: 90px; }

/* Sidebar layout */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.25rem;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}
/* Grid items default to min-width:auto, which prevents them from shrinking
   below their content's natural width. Without this fix, a wide table or other
   content inside <main> causes the grid to overflow the viewport and the entire
   page to scroll horizontally on mobile. */
.content-with-sidebar > * {
    min-width: 0;
}
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.sidebar-widget h4 { margin: 0 0 .9rem; font-size: .95rem; color: var(--dark); }
.sidebar-widget .tag-link {
    display: inline-block;
    margin: 0 .4rem .4rem 0;
    padding: .4rem .85rem;
    background: var(--bg);
    border-radius: 20px;
    font-size: .85rem;
    color: var(--text);
}
.sidebar-widget .tag-link:hover { background: var(--primary-light); color: var(--primary-dark); text-decoration: none; }
.sidebar-widget .lang-link { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; font-size: .9rem; }

/* ===== Footer ===== */
.site-footer { background: var(--dark); color: #b9c0d4; margin-top: 4rem; }
.footer-grid {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 3rem 1.25rem 2rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer-about .site-logo { font-size: 1.3rem; margin-bottom: .75rem; display: inline-block; }
.footer-about p { font-size: .88rem; color: #9aa3bc; max-width: 320px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .6rem; font-size: .88rem; }
.footer-links a { color: #b9c0d4; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 1.25rem 1.25rem;
    text-align: center;
    font-size: .8rem;
    color: #828aa3;
}
.footer-bottom a { color: #828aa3; }

@media (max-width: 760px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: left; }
}

@media (max-width: 900px) {
    .content-with-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .article-card--featured { flex-direction: column; }
    .article-card--featured .card-media {
        flex: none;
        height: 240px;
        border-radius: var(--radius) var(--radius) 0 0;
    }
    .article-card--featured .article-card-body { padding: 1.25rem 1.5rem 1.5rem; }
    .article-card--featured .article-card-body h3 { font-size: 1.25rem; }
}

@media (max-width: 540px) {
    .section { padding: 2.5rem 0; }
    .hero { padding: 3.25rem 1rem; }
    .article-content { padding: 1.4rem; }
    .tile-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .85rem; }
    .articles-grid { grid-template-columns: 1fr; }
    .article-card--featured .card-media { height: 200px; }
}
