/* ============================================
   RISHIKESH RAFTING — Clean editorial design
   Mobile-first, SEO-friendly, lightweight
   ============================================ */

/* ---------- Design tokens ---------- */
:root {
    --color-bg:        #ffffff;
    --color-surface:   #f7f5f0;
    --color-text:      #1a1a1a;
    --color-muted:     #666666;
    --color-border:    #e5e5e5;
    --color-accent:    #0d6b47;    /* Ganga green */
    --color-accent-dark: #0a5238;
    --color-highlight: #e8743f;    /* Adventure orange */

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    --max-width: 1200px;
    --max-width-narrow: 720px;
    --gutter: 1.25rem;
    --radius: 6px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    line-height: 1.65;
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--color-accent-dark); }

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 700; margin-top: 2em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.45rem); font-weight: 700; margin-top: 1.6em; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1.2em; }
ul, ol { margin: 0 0 1.5em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--max-width-narrow); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: fixed; top: 0; left: 0; background: #000; color: #fff; padding: 1em; z-index: 9999; }

/* ---------- Header ---------- */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.site-logo { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 900; color: var(--color-text); text-decoration: none; }
.main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.8rem; align-items: center; }
.main-nav a { color: var(--color-text); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.main-nav a:hover { color: var(--color-accent); }
.nav-cta a {
    background: var(--color-accent);
    color: #fff !important;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
    font-weight: 600;
}
.nav-cta a:hover { background: var(--color-accent-dark); }
.nav-toggle { display: none; background: none; border: 0; width: 36px; height: 36px; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-text); margin: 5px auto; transition: 0.3s; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { background: var(--color-surface); font-size: 0.85rem; padding: 0.7rem 0; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.breadcrumbs a { color: var(--color-muted); }
.breadcrumbs span[aria-current] { color: var(--color-text); font-weight: 500; }
.breadcrumbs span[aria-hidden] { color: var(--color-muted); margin: 0 0.3rem; }

/* ---------- Homepage hero ---------- */
.hero {
    position: relative;
    background: linear-gradient(135deg, #0d6b47 0%, #0a4a33 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    text-align: center;
    overflow: hidden;
}
.hero h1 { color: #fff; margin-bottom: 0.4em; max-width: 900px; margin-left: auto; margin-right: auto; }
.hero p.lead { font-size: 1.2rem; opacity: 0.95; max-width: 640px; margin: 0 auto 2rem; }
.hero .btn { margin: 0 0.3rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
    font-size: 0.95rem;
}
.btn-primary { background: var(--color-highlight); color: #fff; }
.btn-primary:hover { background: #d1632c; color: #fff; }
.btn-secondary { background: transparent; color: #fff; border-color: #fff; }
.btn-secondary:hover { background: #fff; color: var(--color-accent); }
.btn-large { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Article page ---------- */
.article-page { padding: 2.5rem 0 4rem; }
.article-header { text-align: center; margin-bottom: 2.5rem; max-width: var(--max-width-narrow); }
.article-category a {
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--color-highlight);
    font-weight: 600;
    margin-bottom: 1rem;
    text-decoration: none;
}
.article-title { margin-bottom: 1rem; }
.article-meta {
    color: var(--color-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.article-meta .separator { color: var(--color-border); }

.article-hero { margin: 0 0 3rem; max-width: var(--max-width); margin-left: auto; margin-right: auto; padding: 0 var(--gutter); }
.article-hero img { width: 100%; max-height: 500px; object-fit: cover; border-radius: var(--radius); }

.article-body { font-size: 1.08rem; line-height: 1.75; }
.article-body h2 { border-bottom: 2px solid var(--color-border); padding-bottom: 0.4em; }
.article-body ul, .article-body ol { padding-left: 1.5em; }
.article-body strong { color: var(--color-text); font-weight: 600; }
.article-body a { font-weight: 500; }
.article-body img { margin: 2rem 0; border-radius: var(--radius); }

/* Inline CTA box within articles */
.article-body .cta-box {
    background: var(--color-surface);
    border-left: 4px solid var(--color-highlight);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--radius);
}
.article-body .cta-box p:last-child { margin-bottom: 0; }

/* ---------- Article grid / cards ---------- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}
.article-card {
    display: block;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); color: var(--color-text); }
.article-card .card-image { aspect-ratio: 16/9; overflow: hidden; background: var(--color-surface); }
.article-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.article-card .card-body { padding: 1.2rem; }
.card-category { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-highlight); font-weight: 600; margin: 0 0 0.5em; }
.card-title { font-size: 1.15rem; margin: 0 0 0.6em; line-height: 1.3; }
.card-meta { font-size: 0.85rem; color: var(--color-muted); margin: 0; }

/* ---------- Related articles ---------- */
.related-articles { background: var(--color-surface); padding: 3rem 0; margin-top: 4rem; }
.related-articles h2 { text-align: center; margin-top: 0; margin-bottom: 2rem; }

/* ---------- Homepage sections ---------- */
.home-section { padding: 4rem 0; }
.home-section:nth-of-type(even) { background: var(--color-surface); }
.home-section h2 { text-align: center; margin-bottom: 0.4em; }
.section-intro { text-align: center; color: var(--color-muted); max-width: 640px; margin: 0 auto 2.5rem; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.category-card {
    background: var(--color-bg);
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    text-align: center;
    border: 1px solid var(--color-border);
    transition: all 0.2s;
}
.category-card:hover { border-color: var(--color-accent); transform: translateY(-3px); color: var(--color-text); }
.category-card h3 { margin: 0 0 0.5em; color: var(--color-accent); }

/* ---------- Pre-footer CTA ---------- */
.pre-footer-cta {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}
.pre-footer-cta h2 { color: #fff; }
.pre-footer-cta p { font-size: 1.1rem; opacity: 0.95; margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: #141414; color: #cccccc; padding: 3rem 0 1.5rem; }
.site-footer a { color: #cccccc; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #fff; font-family: var(--font-sans); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5em; }
.footer-logo { font-family: var(--font-serif); font-size: 1.3rem; color: #fff !important; }
.footer-tagline { margin: 0.6em 0; color: #999; font-size: 0.95rem; }
.footer-disclaimer { font-size: 0.85rem; color: #888; }
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #999;
}
.copyright { margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border); max-height: 0; overflow: hidden; transition: max-height 0.3s; }
    .main-nav.is-open { max-height: 500px; }
    .main-nav ul { flex-direction: column; gap: 0; padding: 1rem var(--gutter); }
    .main-nav li { width: 100%; }
    .main-nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--color-border); }
    .main-nav .nav-cta a { text-align: center; margin-top: 0.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .hero { padding: 3rem 0 2.5rem; }
    .article-meta { flex-direction: column; gap: 0.2rem; }
    .article-meta .separator { display: none; }
}

/* ---------- Image protection (see js/main.js and watermark.php) ---------- */
img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none; /* no "Save image" on iPhone long-press */
}
