/*
Theme Name: I Love Journeys
Theme URI: https://www.ilovejourneys.com/
Author: Spletni partner d.o.o.
Author URI: https://www.spletnipartner.si/
Description: Custom travel magazine theme for ilovejourneys.com. Destinations menu from categories, NextCellent Gallery, Contact Form 7 and kk Star Ratings styling.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ilovejourneys
*/

:root {
	--ink: #1c2a2e;
	--ink-soft: #4d5b5f;
	--paper: #fbf8f2;
	--sand: #f1e8d8;
	--line: #e3d8c4;
	--accent: #c4502f;
	--accent-dark: #9e3b1f;
	--sea: #24646a;
	--radius: 14px;
	--wrap: 1180px;
	--narrow: 740px;
	--serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--shadow: 0 1px 2px rgb(28 42 46 / .06), 0 8px 24px -12px rgb(28 42 46 / .18);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; font-variation-settings: 'SOFT' 50; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 1rem; left: 1rem; z-index: 100; width: auto; height: auto; clip: auto; padding: .6rem 1rem; background: var(--ink); color: #fff; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap.narrow { max-width: var(--narrow); }
.wrap.wide { max-width: var(--wrap); }
.icon { flex: none; }

.button, button[type=submit], input[type=submit], .wpcf7-submit {
	display: inline-flex; align-items: center; gap: .5em; border: 0; border-radius: 999px; padding: .75em 1.4em;
	background: var(--accent); color: #fff; font: 600 .95rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s;
}
.button:hover, button[type=submit]:hover, input[type=submit]:hover { background: var(--accent-dark); color: #fff; }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=tel], input[type=password], textarea, select {
	width: 100%; padding: .75em 1em; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit;
}
textarea { min-height: 9em; }

.eyebrow { margin: 0 0 .5rem; font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sea); }
.eyebrow a { color: inherit; text-decoration: none; }
.place { display: inline-flex; flex-wrap: wrap; gap: .1em; font: 600 .78rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--sea); }
.place a { color: inherit; text-decoration: none; }
.place a:hover { color: var(--accent); }
.meta { color: var(--ink-soft); font-size: .85rem; }
.section-title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: 1.25rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(251 248 242 / .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .45rem; font: 700 1.4rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { color: var(--accent); font-size: 1.1em; }
.custom-logo { max-height: 56px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.menu { display: flex; align-items: center; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.menu > li > a, .mega-toggle { display: block; white-space: nowrap; padding: .6rem .7rem; border: 0; background: none; color: var(--ink); font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; border-radius: 8px; }
.menu > li > a:hover, .mega-toggle:hover, .has-mega.is-open .mega-toggle { color: var(--accent); }
.mega-toggle::after { content: ''; display: inline-block; width: .4em; height: .4em; margin-left: .45em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.2em) rotate(45deg); transition: transform .2s; }
.has-mega.is-open .mega-toggle::after { transform: translateY(0) rotate(-135deg); }
.menu .sub-menu { display: none; position: absolute; min-width: 220px; margin: 0; padding: .5rem; list-style: none; background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.menu li { position: relative; }
.menu > li.has-mega { position: static; }
.menu li:hover > .sub-menu, .menu li:focus-within > .sub-menu { display: block; }
.menu .sub-menu a { display: block; padding: .45rem .7rem; color: var(--ink); text-decoration: none; border-radius: 6px; }
.menu .sub-menu a:hover { background: var(--sand); }
.mega { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgb(28 42 46 / .25); }
.has-mega.is-open .mega { display: block; }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.5rem 2rem; padding-block: 2rem; max-height: calc(100vh - 120px); overflow: auto; }
.mega-head { display: block; margin-bottom: .5rem; font: 600 1.1rem/1.2 var(--serif); color: var(--ink); text-decoration: none; }
.mega-col ul { margin: 0; padding: 0; list-style: none; }
.mega-col.is-wide { grid-column: span 2; }
.mega-col.is-wide ul { columns: 2; column-gap: 1.5rem; }
.mega-col li a { display: block; padding: .18rem 0; color: var(--ink-soft); font-size: .92rem; text-decoration: none; }
.mega-col a:hover { color: var(--accent); }
.nav-search { position: relative; display: flex; align-items: center; }
.nav-search input { position: absolute; right: 0; width: 0; padding: .55em 2.6em .55em 0; border: 0; border-radius: 999px; background: var(--sand); font-size: .92rem; opacity: 0; visibility: hidden; transition: width .25s, opacity .2s, padding .25s; }
.nav-search.is-open input { width: 260px; padding-left: 1em; opacity: 1; visibility: visible; }
.nav-search button { position: relative; z-index: 1; padding: .5rem; background: none; color: var(--ink); border-radius: 50%; }
.nav-search button:hover { background: var(--sand); color: var(--accent); }
.nav-toggle { display: none; margin-left: auto; padding: .5rem; border: 0; background: none; color: var(--ink); cursor: pointer; }

@media (max-width: 1240px) {
	.site-header { background: var(--paper); backdrop-filter: none; }
	.nav-toggle { display: inline-flex; }
	.site-nav { display: none; position: fixed; inset: 72px 0 0; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1.25rem; background: var(--paper); overflow: auto; }
	.admin-bar .site-nav { top: 118px; }
	.site-nav.is-open { display: flex; }
	.nav-open { overflow: hidden; }
	.menu { flex-direction: column; align-items: stretch; }
	.menu > li > a, .mega-toggle { width: 100%; padding: .9rem 0; text-align: left; font-size: 1.1rem; white-space: normal; border-bottom: 1px solid var(--line); border-radius: 0; }
	.mega { position: static; box-shadow: none; border: 0; background: none; }
	.mega .wrap { width: 100%; }
	.mega-grid { grid-template-columns: 1fr 1fr; padding-block: 1rem; max-height: none; }
	.menu .sub-menu { display: block; position: static; box-shadow: none; padding: 0 0 0 1rem; background: none; }
	.nav-search input, .nav-search.is-open input { position: static; width: 100%; padding: .7em 2.8em .7em 1em; opacity: 1; visibility: visible; }
	.nav-search button { position: absolute; right: 6px; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Hero */
.hero { position: relative; display: grid; min-height: min(78vh, 680px); color: #fff; isolation: isolate; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media { z-index: -1; }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(20 30 33 / .05) 30%, rgb(20 30 33 / .78)); }
.hero-body { align-self: end; padding-block: 4rem 3.5rem; }
.hero .eyebrow, .hero .place { color: #f6d9b8; }
.hero-title { max-width: 18ch; font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4.4rem); font-weight: 600; margin-top: .5rem; }
.hero-title a { color: #fff; text-decoration: none; }
.hero-excerpt { max-width: 58ch; font-size: 1.1rem; color: rgb(255 255 255 / .88); margin-bottom: 1.5rem; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-block: 1.75rem; }
.chips-label { display: inline-flex; align-items: center; gap: .35rem; margin-right: .5rem; font-weight: 600; color: var(--sea); }
.chip { padding: .45rem .95rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: .9rem; font-weight: 500; text-decoration: none; transition: border-color .2s, color .2s; }
.chip span { color: var(--ink-soft); font-size: .8em; margin-left: .2em; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Listing */
.listing { padding-block: 2rem 4rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 2.25rem 1.75rem; }
.card { display: flex; flex-direction: column; }
.card-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--sand); margin-bottom: 1rem; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.04); }
.card-title { font-size: 1.35rem; margin: .45rem 0 .5rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { margin: 0 0 .6rem; color: var(--ink-soft); font-size: .97rem; }

.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.page-numbers { display: grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .6rem; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; }
.page-numbers.current { background: var(--ink); color: #fff; }
a.page-numbers:hover { background: var(--sand); }

/* Archive header */
.archive-hero { padding-block: 3.5rem 1rem; background: linear-gradient(var(--sand), var(--paper)); }
.page-title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
.archive-desc { max-width: 62ch; color: var(--ink-soft); }
.archive-hero .chips { padding-block: 1rem 0; }
.page-header { margin-bottom: 2rem; }
.search-form { display: flex; gap: .5rem; max-width: 520px; margin-top: 1.25rem; }

/* Single */
.entry-hero { padding-block: 3rem 2rem; text-align: center; }
.entry-hero.has-image { position: relative; display: grid; min-height: min(72vh, 620px); padding: 0; color: #fff; isolation: isolate; }
.entry-hero-media, .entry-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.entry-hero-media { z-index: -1; }
.entry-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(20 30 33 / 0) 35%, rgb(20 30 33 / .8)); }
.entry-hero-body { align-self: end; padding-block: 3rem; }
.entry-hero.has-image .place { color: #f6d9b8; }
.entry-title { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.8rem); margin: .6rem 0; }
.entry-byline { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.entry-hero.has-image .entry-byline, .entry-hero.has-image .meta { color: rgb(255 255 255 / .85); }

.entry-content { padding-block: 2.5rem 1rem; font-size: 1.125rem; line-height: 1.75; }
.entry-content > * { margin-block: 0 1.25em; }
.entry-content h2 { font-size: 1.85rem; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.45rem; margin-top: 1.6em; }
.entry-content h4 { font-size: 1.2rem; margin-top: 1.4em; }
.entry-content [style*="justify"] { text-align: left !important; }
.entry-content blockquote { margin-inline: 0; padding: .25rem 0 .25rem 1.5rem; border-left: 3px solid var(--accent); font: italic 1.3rem/1.5 var(--serif); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .35em; }
.entry-content img { border-radius: 10px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { padding: .6rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content iframe { width: 100%; border: 0; border-radius: 10px; }
.entry-content iframe[src*="youtube"], .entry-content iframe[src*="vimeo"] { aspect-ratio: 16 / 9; height: auto; }

/* Legacy content: captions + alignments from the classic editor */
.wp-caption { max-width: 100% !important; width: auto !important; }
.wp-caption img { margin-inline: auto; }
.wp-caption-text, figcaption { margin-top: .5rem; color: var(--ink-soft); font-size: .88rem; line-height: 1.45; text-align: center; }
.aligncenter, .wp-caption.aligncenter { display: block; margin-inline: auto; }
.alignleft, .alignright { margin-bottom: 1rem; }
@media (min-width: 700px) {
	.alignleft { float: left; max-width: 50%; margin: .3rem 1.75rem 1rem 0; }
	.alignright { float: right; max-width: 50%; margin: .3rem 0 1rem 1.75rem; }
}
.entry-content::after { content: ''; display: table; clear: both; }

/* NextCellent Gallery */
.ngg-galleryoverview { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin: 2rem 0 !important; overflow: visible !important; }
.ngg-gallery-thumbnail-box { float: none !important; width: auto !important; margin: 0 !important; }
.ngg-gallery-thumbnail { margin: 0 !important; border: 0 !important; padding: 0 !important; text-align: left !important; }
.ngg-gallery-thumbnail a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--sand); }
.ngg-gallery-thumbnail img { width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; border: 0 !important; object-fit: cover; border-radius: 0 !important; transition: transform .4s; }
.ngg-gallery-thumbnail a:hover img { transform: scale(1.06); }
.ngg-clear { display: none; }
.ngg-navigation { grid-column: 1 / -1; display: flex; justify-content: center; gap: .3rem; }
.ngg-navigation a, .ngg-navigation span { padding: .3rem .7rem; border-radius: 6px; text-decoration: none; }
.ngg-navigation span.current { background: var(--ink); color: #fff; }
.ngg-slideshow, .ngg-imagebrowser { margin-inline: auto; }

/* kk Star Ratings + Contact Form 7 */
.kk-star-ratings { justify-content: center; margin: 2rem auto !important; }
.kk-star-ratings.rgt { float: none; margin: auto; }
.wpcf7 { margin-top: 1.5rem; padding: 1.75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.wpcf7 p { margin: 0 0 1rem; }
.wpcf7 label { font-weight: 600; font-size: .95rem; }
.wpcf7-not-valid-tip { font-size: .85rem; }
.wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; border-radius: 8px; }

/* Entry footer */
.entry-footer { padding-bottom: 2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 2rem; }
.tags a { padding: .3rem .75rem; border-radius: 999px; background: var(--sand); color: var(--ink); font-size: .85rem; text-decoration: none; }
.tags a:hover { background: var(--accent); color: #fff; }
.author-box { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; margin-bottom: 2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.author-box img { border-radius: 50%; }
.author-box p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.author-box .author-name { font: 600 1.1rem/1.3 var(--serif); color: var(--ink); margin-bottom: .2rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.post-navigation a { display: block; color: var(--ink); text-decoration: none; font: 600 1.05rem/1.35 var(--serif); }
.post-navigation a:hover { color: var(--accent); }
.post-navigation .nav-next { text-align: right; }
.nav-label { display: block; margin-bottom: .3rem; font: 600 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--sea); }
.related { padding-block: 3rem; border-top: 1px solid var(--line); }

/* Comments */
.comments { padding-block: 2rem 4rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: 1.5rem; border-left: 2px solid var(--line); }
.comment-body { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .82rem; margin: .2rem 0 .6rem; }
.comment-metadata a { color: var(--ink-soft); text-decoration: none; }
.comment-content p { margin: 0 0 .6rem; }
.reply a { font-size: .85rem; font-weight: 600; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-weight: 600; font-size: .92rem; }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: baseline; }
.comment-form-cookies-consent label { font-weight: 400; }

/* Footer */
.site-footer { margin-top: 2rem; background: var(--ink); color: rgb(255 255 255 / .78); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 2fr 1fr; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.site-footer .brand { color: #fff; }
.site-footer a { color: rgb(255 255 255 / .78); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-title { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #f6d9b8; margin-bottom: 1rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.footer-dest ul { columns: 2; column-gap: 2rem; }
.site-footer li { margin-bottom: .45rem; }
.social { display: flex; gap: .5rem; margin-top: 1.25rem !important; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(255 255 255 / .08); transition: background .2s; }
.social a:hover { background: var(--accent); }
.footer-widgets { grid-column: 1 / -1; }
.footer-bottom { padding-block: 1.25rem; border-top: 1px solid rgb(255 255 255 / .1); font-size: .85rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
