/*
Theme Name: Cheapsly
Theme URI: https://cheapsly.com
Description: Custom travel affiliate theme for Cheapsly
Version: 1.0
Author: Cheapsly
*/

:root {
    --bg: #ffffff;
    --text: #202124;
    --accent: #0057b8;
    --muted: #6b7280;
    --border: #e5e7eb;
    --font: system-ui, -apple-system, sans-serif;
    --max-width: 1100px;
    --radius: 4px;
}

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

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
    background: var(--bg);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-top: 3px solid var(--accent);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.site-logo {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -0.4px;
    flex-shrink: 0;
}
.site-logo span {
    font-style: italic;
    color: var(--accent);
}
.site-nav { flex: 1; }
.site-nav ul { list-style: none; display: flex; gap: 2px; }
.site-nav a {
    display: block;
    padding: 6px 10px;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9375rem;
    border-radius: var(--radius);
}
.site-nav a:hover { color: var(--text); background: #f5f9ff; }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 700px) {
    .site-header__inner {
        height: 56px;
        justify-content: space-between;
    }
    .site-nav { display: none; }
    .nav-toggle { display: flex; }
    .site-nav.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        animation: nav-slide-in 0.18s ease;
    }
    @keyframes nav-slide-in {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .site-nav ul { flex-direction: column; gap: 0; padding: 4px 0; }
    .site-nav a {
        padding: 14px 24px;
        border-radius: 0;
        font-size: 1rem;
        color: var(--text);
        border-bottom: 1px solid var(--border);
    }
    .site-nav li:last-child a { border-bottom: none; }
}

/* Main */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* Breadcrumb */
.breadcrumb { margin-bottom: 24px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 0; margin: 0; }
.breadcrumb li { font-size: 0.8125rem; color: var(--muted); }
.breadcrumb li + li::before { content: '›'; margin-right: 4px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb li[aria-current="page"] { color: var(--text); }

/* USP Article */
.usp-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.usp-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--text);
}

/* Practical Info Box */
.usp-updated {
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: 8px;
}

aside.usp-practical-info {
    background: #f0f5ff;
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 48px;
}
.usp-practical-info dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 40px;
}
.usp-practical-info dl > div { display: flex; flex-direction: column; gap: 3px; }
.usp-practical-info dt {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.usp-practical-info dd {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.5;
}
.usp-practical-info a { color: var(--accent); text-decoration: none; }
.usp-practical-info dt a { color: var(--accent); font-weight: 600; }
.usp-practical-info a:hover { text-decoration: underline; }
.usp-practical-info a[target="_blank"]::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 5px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230057b8' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Safety info box */
aside.usp-safety-info {
    background: #fff5f5;
    border-left: 3px solid #c0392b;
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 48px;
}
.usp-safety-info dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 40px;
}
.usp-safety-info dl > div { display: flex; flex-direction: column; gap: 3px; }
.usp-safety-info dt {
    font-size: 0.75rem;
    font-weight: 600;
    color: #c0392b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.usp-safety-info dd {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.5;
}
.usp-safety-info h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #c0392b;
    margin: 0 0 16px;
    letter-spacing: 0.01em;
}

/* USP Content */
.usp-intro { margin-bottom: 48px; }

.usp-intro p,
.usp-section-content p { margin-bottom: 16px; }

.usp-intro h2,
.usp-section-content h2 {
    font-size: 1.1875rem;
    font-weight: 700;
    margin: 40px 0 10px;
    color: var(--text);
    letter-spacing: -0.2px;
}

.usp-intro h2:first-child,
.usp-section-content h2:first-child { margin-top: 0; }

.usp-section-content strong { font-weight: 600; }

.usp-intro ul,
.usp-section-content ul {
    list-style: disc;
    margin: 12px 0 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.usp-intro li,
.usp-section-content li { padding-left: 4px; }

/* USP Sections */
.usp-section {
    margin-bottom: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.usp-section-content { margin-bottom: 24px; }

/* Disclaimer */
.usp-disclaimer {
    margin-top: 48px;
    padding: 12px 16px;
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #713f12;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: 40px;
}
.site-footer .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

/* Page content (Privacy Policy, Disclaimer, etc.) */
.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}
.page-content h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.4px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.page-content h2 {
    font-size: 1.1875rem;
    font-weight: 700;
    margin: 36px 0 10px;
    color: var(--text);
}
.page-content p { margin-bottom: 16px; }
.page-content a { color: var(--accent); }
.page-content a:hover { text-decoration: underline; }

/* Archive header */
.archive-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.archive-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.archive-header p {
    font-size: 0.9375rem;
    color: var(--muted);
    margin-top: 4px;
}

/* Homepage */
.hp-hero {
    padding: 64px 0 56px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 56px;
}
.hp-hero h1 {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.15;
    max-width: 22ch;
    margin-bottom: 14px;
}
.hp-hero p {
    font-size: 1.0625rem;
    color: var(--muted);
    max-width: 56ch;
}
.hp-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 14px;
}

.hp-accent { color: var(--accent); }

.hp-featured {
    padding-bottom: 56px;
    margin-bottom: 56px;
}
.hp-featured-title {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 14px;
}
.hp-featured-title:hover { text-decoration: underline; }
.hp-featured-blurb {
    color: var(--muted);
    font-size: 1.0625rem;
    line-height: 1.65;
    max-width: 60ch;
    margin-bottom: 24px;
}
.hp-featured-links {
    list-style: none;
    border-top: 1px solid var(--border);
}
.hp-featured-links li {
    border-bottom: 1px solid var(--border);
}
.hp-featured-links a {
    display: block;
    padding: 12px 0;
    color: var(--accent);
    text-decoration: none;
    font-size: 1rem;
}
.hp-featured-links a::before {
    content: '→';
    display: inline-block;
    margin-right: 12px;
    color: var(--muted);
}
.hp-featured-links a:hover {
    text-decoration: underline;
}

.hp-latest-section {
    padding-top: 56px;
    border-top: 1px solid var(--border);
    padding-bottom: 56px;
    margin-bottom: 40px;
}
.hp-latest {
    list-style: none;
    border-top: 1px solid var(--border);
}
.hp-latest li {
    display: flex;
    align-items: baseline;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.hp-latest-date {
    flex: 0 0 5em;
    color: var(--muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hp-latest-link {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
}
.hp-latest-link:hover {
    color: var(--accent);
}


/* Responsive */
@media (max-width: 600px) {
    .usp-practical-info dl { grid-template-columns: 1fr; }
    .hp-hero { padding: 40px 0 36px; margin-bottom: 40px; }
    .hp-featured, .hp-latest-section { padding-bottom: 40px; margin-bottom: 40px; }
    .hp-latest li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .hp-latest-date { flex: none; }
}
