/* ==========================================================================
   Reissupiste.fi — tyylit
   Teema: suomalainen ulkoilu & matkailu. Metsänvihreä + lämmin meripihka.
   ========================================================================== */

:root {
    --forest: #1c4536;
    --pine: #2f6b4f;
    --moss: #6f9b6e;
    --amber: #e08a34;
    --amber-dark: #c5721f;
    --paper: #f6f3ec;
    --paper-2: #efe9dd;
    --ink: #212a22;
    --muted: #6a7268;
    --line: #e0d9ca;
    --white: #ffffff;
    --shadow-sm: 0 2px 10px rgba(28, 69, 54, .06);
    --shadow: 0 12px 34px rgba(28, 69, 54, .12);
    --radius: 16px;
    --radius-lg: 26px;
    --ff-head: 'Fraunces', Georgia, serif;
    --ff-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--ff-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    margin: 0;
}

h1, h2, h3, h4 {
    font-family: var(--ff-head);
    font-weight: 600;
    line-height: 1.12;
    color: var(--forest);
    letter-spacing: -.01em;
}

a { color: var(--pine); text-decoration: none; }
a:hover { color: var(--amber-dark); }

.skip-link {
    position: absolute; top: .5rem; left: .5rem; z-index: 2000;
    background: var(--forest); color: #fff; padding: .5rem .9rem; border-radius: 8px;
}

/* ---------- Painikkeet ---------- */
.btn { font-weight: 600; border-radius: 999px; padding: .65rem 1.4rem; transition: .18s ease; }
.btn-accent { background: var(--amber); color: #241c10; border: none; box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--amber-dark); color: #fff; transform: translateY(-1px); }
.btn-forest { background: var(--forest); color: #fff; border: none; }
.btn-forest:hover { background: #143528; color: #fff; }
.btn-outline-forest { border: 1.5px solid var(--forest); color: var(--forest); background: transparent; }
.btn-outline-forest:hover { background: var(--forest); color: #fff; }
.btn-lg { padding: .85rem 1.9rem; font-size: 1.05rem; }

/* ---------- Navigaatio ---------- */
.site-header {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(246, 243, 236, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.navbar { padding: .55rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .55rem; font-family: var(--ff-head); font-size: 1.5rem; color: var(--forest); }
.navbar-brand:hover { color: var(--forest); }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--forest); color: var(--amber); font-size: 1.2rem;
}
.brand-text { letter-spacing: -.02em; }
.brand-text strong { color: var(--amber-dark); font-weight: 700; }
.navbar .nav-link { color: var(--ink); font-weight: 500; padding: .5rem .9rem; border-radius: 8px; }
.navbar .nav-link:hover { color: var(--forest); background: var(--paper-2); }
.navbar .nav-link.active { color: var(--forest); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
    position: relative; color: #fff; overflow: hidden;
    background:
        radial-gradient(120% 120% at 80% 0%, rgba(224,138,52,.28) 0%, transparent 45%),
        linear-gradient(160deg, #1c4536 0%, #22503c 45%, #16382a 100%);
}
.hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 90px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath fill='%23f6f3ec' d='M0 90V45c120-30 260 20 420 12s280-52 470-40 300 55 550 33v40z'/%3E%3C/svg%3E") no-repeat center / cover;
}
.hero-inner { position: relative; z-index: 2; padding-top: 5.5rem; padding-bottom: 7rem; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.8rem); }
.hero .lead { color: #e9f0e6; font-size: 1.2rem; max-width: 34rem; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
    padding: .35rem .85rem; border-radius: 999px; font-size: .9rem; font-weight: 500;
    margin-bottom: 1.2rem;
}
.hero-badge i { color: var(--amber); }

/* ---------- Sektiot ---------- */
.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.section-alt { background: var(--white); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--amber-dark); }
.section-title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: .35rem 0 .6rem; }
.section-intro { color: var(--muted); max-width: 42rem; }

/* ---------- Kategoriakortit ---------- */
.category-card {
    display: block; height: 100%; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm);
    transition: .2s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--moss); }
.category-icon {
    width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
    background: var(--paper-2); color: var(--pine); font-size: 1.5rem; margin-bottom: 1rem;
}
.category-card h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.category-card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Tuotekortit ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.product-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm); transition: .2s ease; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-media { aspect-ratio: 4 / 3; background: var(--paper-2); position: relative; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-type-tag {
    position: absolute; top: .8rem; left: .8rem; background: rgba(28,69,54,.9); color: #fff;
    font-size: .75rem; font-weight: 600; padding: .28rem .7rem; border-radius: 999px;
    display: inline-flex; align-items: center; gap: .35rem;
}
.product-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 1.2rem; margin-bottom: .25rem; }
.product-desc { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; flex: 1; }
.product-price { font-family: var(--ff-head); font-size: 1.35rem; color: var(--forest); font-weight: 600; }
.product-price small { font-family: var(--ff-body); font-size: .8rem; color: var(--muted); font-weight: 500; }

/* ---------- Suodatinnapit ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-chip {
    border: 1.5px solid var(--line); background: var(--white); color: var(--ink);
    padding: .45rem 1.05rem; border-radius: 999px; font-weight: 500; font-size: .92rem; cursor: pointer;
    transition: .15s ease;
}
.filter-chip:hover { border-color: var(--moss); }
.filter-chip.active { background: var(--forest); color: #fff; border-color: var(--forest); }

/* ---------- Askeleet (Miten vuokraus toimii) ---------- */
.step { text-align: center; padding: 1rem; }
.step-num {
    width: 58px; height: 58px; margin: 0 auto 1rem; border-radius: 50%;
    display: grid; place-items: center; font-family: var(--ff-head); font-size: 1.5rem; font-weight: 700;
    background: var(--amber); color: #241c10;
}
.step h3 { font-size: 1.2rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Tuotesivu ---------- */
.gallery-main { border-radius: var(--radius); overflow: hidden; background: var(--paper-2); aspect-ratio: 16/11; box-shadow: var(--shadow-sm); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .7rem; flex-wrap: wrap; }
.gallery-thumbs img { width: 76px; height: 60px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.active { border-color: var(--amber); }
.spec-list { list-style: none; padding: 0; margin: 1rem 0; }
.spec-list li { padding: .5rem 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; }
.spec-list li span:first-child { color: var(--muted); }

.info-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }

/* ---------- Tarvikeluettelo (avattava kortti) ---------- */
.accessories-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.accessories-box > summary {
    display: flex; align-items: center; gap: .6rem; cursor: pointer; list-style: none;
    padding: 1.15rem 1.5rem; font-family: var(--ff-head); font-size: 1.25rem; font-weight: 600;
    color: var(--forest); user-select: none;
}
.accessories-box > summary::-webkit-details-marker { display: none; }
.accessories-box > summary:hover { background: var(--paper); }
.accessories-box > summary > .bi-box-seam { color: var(--amber); font-size: 1.2rem; }
.accessories-hint { font-family: var(--ff-body); font-size: .9rem; font-weight: 400; color: var(--muted); }
.accessories-chevron { margin-left: auto; color: var(--muted); transition: transform .2s ease; }
.accessories-box[open] > summary { border-bottom: 1px solid var(--line); }
.accessories-box[open] > summary .accessories-chevron { transform: rotate(180deg); }
.accessories-content { padding: 1.25rem 1.5rem 1.5rem; }
.accessories-content h2, .accessories-content h3, .accessories-content h4 {
    font-family: var(--ff-head); color: var(--forest); font-size: 1.1rem; margin: 1.1rem 0 .5rem;
}
.accessories-content h2:first-child, .accessories-content h3:first-child, .accessories-content h4:first-child { margin-top: 0; }
.accessories-content p { margin: 0 0 .6rem; }
.accessories-content img { max-width: 100%; height: auto; border-radius: 8px; }
@media (max-width: 575px) {
    .accessories-box > summary { padding: 1rem 1.15rem; font-size: 1.1rem; flex-wrap: wrap; }
    .accessories-hint { flex-basis: 100%; }
    .accessories-content { padding: 1rem 1.15rem 1.15rem; }
}

/* ---------- Blogi: listaus ---------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.article-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.article-card-media { display: block; aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; }
.article-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--moss); font-size: 2.5rem; }
.article-card-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.article-card-title { font-family: var(--ff-head); font-size: 1.3rem; line-height: 1.25; margin: .35rem 0 .5rem; }
.article-card-title a { color: var(--forest); }
.article-card-title a:hover { color: var(--amber-dark); }
.article-card-excerpt { color: var(--muted); font-size: .96rem; margin: 0 0 1rem; }
.article-card-link { margin-top: auto; font-weight: 600; color: var(--amber-dark); font-size: .95rem; }
.article-card-link:hover { color: var(--forest); }
.article-meta { color: var(--muted); font-size: .85rem; display: inline-flex; align-items: center; gap: .4rem; }
.article-meta .bi { color: var(--amber); }

/* ---------- Blogi: yksittäinen artikkeli ---------- */
.article-single { max-width: 760px; }
.article-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1.75rem; }
.article-lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink); font-weight: 500; margin: 0 0 1.5rem; }

/* Rikas leipäteksti – pakotetaan sivuston tyyliin riippumatta editorin syötteestä */
.article-content { font-family: var(--ff-body); font-size: 1.06rem; line-height: 1.8; color: var(--ink); max-width: 68ch; }
.article-content > *:first-child { margin-top: 0; }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 {
    font-family: var(--ff-head); color: var(--forest); line-height: 1.25; margin: 2rem 0 .75rem;
}
.article-content h1 { font-size: 1.9rem; }
.article-content h2 { font-size: 1.55rem; }
.article-content h3 { font-size: 1.3rem; }
.article-content h4 { font-size: 1.12rem; }
.article-content p { margin: 0 0 1.1rem; }
.article-content a { color: var(--amber-dark); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--forest); }
.article-content ul, .article-content ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.article-content li { margin-bottom: .4rem; }
.article-content blockquote {
    margin: 1.5rem 0; padding: .85rem 1.25rem; border-left: 4px solid var(--amber);
    background: var(--paper); border-radius: 0 8px 8px 0; color: var(--ink); font-style: italic;
}
.article-content img { max-width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.article-content hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

/* Kuvalohkot: asettelut vastaavat editorin image_layout-arvoja */
.article-figure { margin: 1.75rem 0; }
.article-figure figcaption { margin-top: .5rem; font-size: .9rem; color: var(--muted); font-style: italic; text-align: center; }
.article-figure .article-figure-row { display: flex; gap: .75rem; }
.article-figure .article-figure-row > * { flex: 1; min-width: 0; }
.article-figure.article-rows-2 .article-figure-row { flex-direction: column; }
.article-figure img { width: 100%; display: block; }

@media (max-width: 575px) {
    .article-content { font-size: 1rem; }
    .article-figure .article-figure-row { flex-wrap: wrap; }
}

/* ---------- Saatavuuskalenteri ---------- */
.rp-calendar { user-select: none; }
.rp-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.rp-cal-title { font-family: var(--ff-head); font-size: 1.15rem; color: var(--forest); font-weight: 600; }
.rp-cal-nav { border: 1px solid var(--line); background: var(--white); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; color: var(--forest); }
.rp-cal-nav:hover { background: var(--paper-2); }
.rp-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.rp-cal-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-bottom: .3rem; }
.rp-cal-cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 9px; font-size: .9rem; background: var(--paper-2); color: var(--ink); }
.rp-cal-cell.empty { background: transparent; }
.rp-cal-cell.free { background: #e7f0e6; color: #26543c; }
.rp-cal-cell.booked { background: #f3d9cf; color: #9a3b1c; text-decoration: line-through; }
.rp-cal-cell.past { opacity: .35; }
.rp-cal-cell.today { outline: 2px solid var(--amber); outline-offset: -2px; font-weight: 700; }
.rp-cal-legend { display: flex; gap: 1.1rem; margin-top: .9rem; font-size: .85rem; color: var(--muted); }
.rp-cal-legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.dot-free { background: #e7f0e6; border: 1px solid #bcd6bb; }
.dot-booked { background: #f3d9cf; border: 1px solid #e0b09e; }

/* ---------- Vapaat viikot (kalenteri.php) ---------- */
.weeks-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.weeks-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 .8rem; }
.weeks-table td { background: var(--white); padding: .7rem .8rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.weeks-table td:first-child { border-left: 1px solid var(--line); border-radius: 10px 0 0 10px; }
.weeks-table td:last-child { border-right: 1px solid var(--line); border-radius: 0 10px 10px 0; }
.status-pill { font-size: .8rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; }
.status-free { background: #e7f0e6; color: #26543c; }
.status-booked { background: #f3d9cf; color: #9a3b1c; }

/* ---------- Lomake ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.form-label { font-weight: 600; font-size: .9rem; color: var(--forest); }
.form-control, .form-select { border-radius: 10px; border-color: var(--line); padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--moss); box-shadow: 0 0 0 .2rem rgba(111,155,110,.2); }
.field-error { color: #b23a1c; font-size: .82rem; margin-top: .25rem; display: none; }
.form-alert { display: none; border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; font-weight: 500; }
.form-alert.ok { display: block; background: #e7f0e6; color: #26543c; }
.form-alert.err { display: block; background: #f7ddd3; color: #9a3b1c; }

/* ---------- Vinkit ---------- */
.tip-nav { position: sticky; top: 90px; }
.tip-nav a { display: block; padding: .5rem .8rem; border-radius: 8px; color: var(--ink); font-weight: 500; }
.tip-nav a:hover { background: var(--paper-2); color: var(--forest); }
.tip-article { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); scroll-margin-top: 90px; }
.tip-article h2 { display: flex; align-items: center; gap: .6rem; }
.tip-article h2 i { color: var(--amber); }
.tip-article ul { padding-left: 1.2rem; }
.tip-article li { margin-bottom: .4rem; }

/* ---------- Info-palkki / CTA ---------- */
.cta-band { background: linear-gradient(120deg, var(--forest), var(--pine)); color: #fff; border-radius: var(--radius-lg); padding: 3rem; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe7d8; max-width: 36rem; margin: .6rem auto 1.5rem; }

/* ---------- Placeholder-media ---------- */
.media-fallback { display: grid; place-items: center; height: 100%; color: var(--moss); font-size: 3rem; background: repeating-linear-gradient(45deg, #eef2e9, #eef2e9 12px, #e8eee2 12px, #e8eee2 24px); }

/* ---------- Yritys ---------- */
.value-item { display: flex; gap: 1rem; }
.value-item i { color: var(--amber); font-size: 1.5rem; margin-top: .2rem; }
.map-embed { border: 0; width: 100%; height: 340px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: #cfe0cc; padding: 3.5rem 0 1.5rem; margin-top: 3rem; }
.site-footer a { color: #cfe0cc; }
.site-footer a:hover { color: var(--amber); }
.footer-brand { display: flex; align-items: center; gap: .55rem; font-family: var(--ff-head); font-size: 1.4rem; color: #fff; margin-bottom: .7rem; }
.footer-brand .brand-text strong { color: var(--amber); }

/* ---------- Matkailuvaunun ikoni (Bootstrap Iconsissa ei ole caravania) ----------
   Räätälöity ääriviiva-caravan CSS-maskina; perii currentColor ja 1em-koon kuten
   fonttikuvakkeet, joten toimii kaikkialla missä .bi-caravan-luokkaa käytetään. */
.bi-caravan {
    display: inline-block; width: 1em; height: 1em; vertical-align: -.125em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15 V9 A3 3 0 0 1 7 6 H17 A3 3 0 0 1 20 9 V15'/%3E%3Cpath d='M4 15 H6.8'/%3E%3Cpath d='M11.2 15 H20'/%3E%3Ccircle cx='9' cy='15' r='2.2'/%3E%3Cpath d='M12.5 9 h3.5 v3.5 h-3.5 Z'/%3E%3Cpath d='M4 13 L1 15'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15 V9 A3 3 0 0 1 7 6 H17 A3 3 0 0 1 20 9 V15'/%3E%3Cpath d='M4 15 H6.8'/%3E%3Cpath d='M11.2 15 H20'/%3E%3Ccircle cx='9' cy='15' r='2.2'/%3E%3Cpath d='M12.5 9 h3.5 v3.5 h-3.5 Z'/%3E%3Cpath d='M4 13 L1 15'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bi-caravan::before { content: none; }
.footer-tagline { color: #a9c2a6; max-width: 22rem; }
.footer-heading { color: #fff; font-size: 1rem; margin-bottom: .9rem; font-family: var(--ff-body); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-links li, .footer-contact li { margin-bottom: .55rem; }
.footer-contact i { color: var(--amber); width: 1.2rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .85rem; color: #9fbb9c; }

@media (max-width: 991px) {
    .navbar .nav-link { padding: .6rem .3rem; }
    .navbar-nav { padding-top: .6rem; }
    .btn-accent { margin-top: .4rem; }
    .tip-nav { position: static; margin-bottom: 1.5rem; }
}
