/*
Theme Name: Volcanic Caves Funchal
Theme URI: https://volcanicfunchalcaves.com
Author: Inacio
Author URI: https://tuktukrides.pt
Description: A fast, SEO-focused guide theme for the volcanic caves, lava pools and grottos of Funchal and Madeira. Built-in homepage sections, FAQ, schema markup, booking buttons and WhatsApp contact, all editable in Appearance > Customize.
Version: 1.1.1
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: volcanic-caves
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready, blog
*/

:root {
	--basalt: #16130f;
	--basalt-2: #221d18;
	--ash: #3a332c;
	--stone: #8a8075;
	--sand: #efe8dd;
	--paper: #faf7f2;
	--ink: #1d1a16;
	--lava: #e2531c;
	--lava-dark: #b83d0f;
	--ember: #f3a23a;
	--sea: #1f5d6b;
	--radius: 14px;
	--wrap: 1160px;
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-display: Georgia, "Times New Roman", "Iowan Old Style", serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--ink);
	background: var(--paper);
}

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

a { color: var(--lava-dark); text-underline-offset: 3px; }
a:hover { color: var(--lava); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	line-height: 1.2;
	margin: 0 0 .6em;
	font-weight: 700;
	letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto;
	top: 8px; left: 8px; z-index: 1000;
	background: #fff; padding: 10px 16px; border-radius: 8px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(22, 19, 15, .94);
	backdrop-filter: blur(8px);
	color: var(--sand);
	border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; min-height: 66px;
}
.site-branding a { color: var(--sand); text-decoration: none; }
.site-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin: 0; }
.site-title span { color: var(--ember); }
.custom-logo { max-height: 46px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; align-items: center; }
.main-nav a { color: var(--sand); text-decoration: none; font-size: .95rem; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--ember); }
.main-nav ul ul { display: none; }

.nav-toggle {
	display: none; background: none; border: 1px solid rgba(255,255,255,.2);
	color: var(--sand); border-radius: 8px; padding: 8px 12px; font-size: .95rem; cursor: pointer;
}

.header-cta { white-space: nowrap; }

@media (max-width: 860px) {
	.nav-toggle { display: inline-block; }
	.header-cta { display: none; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 66px;
		background: var(--basalt); padding: 12px 20px 20px;
		border-bottom: 1px solid rgba(255,255,255,.08);
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-block; padding: 13px 24px; border-radius: 999px;
	font-weight: 600; text-decoration: none; font-size: 1rem; line-height: 1.2;
	transition: transform .15s ease, background .15s ease;
	border: 2px solid transparent; cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-lava { background: var(--lava); color: #fff; }
.btn-lava:hover { background: var(--lava-dark); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-small { padding: 9px 18px; font-size: .9rem; }

/* ---------- Hero ---------- */
.hero {
	position: relative; color: #fff; overflow: hidden;
	background:
		radial-gradient(ellipse at 75% 110%, rgba(226,83,28,.55), transparent 55%),
		radial-gradient(ellipse at 10% -10%, rgba(31,93,107,.55), transparent 50%),
		linear-gradient(160deg, #221d18 0%, #0e0c0a 100%);
	padding: clamp(70px, 12vw, 140px) 0 clamp(60px, 10vw, 120px);
}
.hero.has-image { background-size: cover; background-position: center; }
.hero.has-image::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(14,12,10,.35) 0%, rgba(14,12,10,.82) 100%);
}
.hero .wrap { position: relative; }
.hero-eyebrow {
	display: inline-block; text-transform: uppercase; letter-spacing: .14em;
	font-size: .8rem; color: var(--ember); margin-bottom: 14px; font-weight: 600;
}
.hero h1 { max-width: 820px; }
.hero-lead { font-size: 1.2rem; max-width: 640px; color: rgba(255,255,255,.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-facts {
	display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px;
	font-size: .92rem; color: rgba(255,255,255,.75); list-style: none; padding: 0;
}
.hero-facts li::before { content: "◆ "; color: var(--lava); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-dark { background: var(--basalt); color: var(--sand); }
.section-dark a { color: var(--ember); }
.section-sand { background: var(--sand); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.kicker {
	text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
	color: var(--lava); font-weight: 700; margin-bottom: 8px; display: block;
}

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
	background: #fff; border-radius: var(--radius); padding: 28px;
	box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(22,19,15,.06);
	display: flex; flex-direction: column;
}
.section-dark .card { background: var(--basalt-2); box-shadow: none; border: 1px solid var(--ash); }
.card .tag {
	display: inline-block; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em;
	font-weight: 700; color: var(--sea); margin-bottom: 10px;
}
.section-dark .card .tag { color: var(--ember); }
.card ul { padding-left: 1.1em; margin: 0 0 1em; }
.card .card-foot { margin-top: auto; }

.place-icon {
	width: 52px; height: 52px; border-radius: 12px; margin-bottom: 16px;
	background: linear-gradient(135deg, var(--lava), var(--ember));
	display: grid; place-items: center; color: #fff;
}

.info-list, .card .info-list { list-style: none; padding: 0; margin: 0 0 1em; }
.info-list li { padding: 8px 0; border-bottom: 1px dashed rgba(0,0,0,.12); display: grid; grid-template-columns: 76px 1fr; gap: 10px; font-size: .95rem; line-height: 1.45; }
.section-dark .info-list li { border-color: rgba(255,255,255,.1); }
.info-list strong { font-weight: 600; }

.notice {
	font-size: .9rem; color: var(--stone); border-left: 3px solid var(--ember);
	padding: 4px 0 4px 14px; margin-top: 24px;
}

/* ---------- Tour band ---------- */
.tour-band {
	background: linear-gradient(120deg, var(--lava-dark), var(--lava) 60%, var(--ember));
	color: #fff; border-radius: 22px; padding: clamp(30px, 5vw, 56px);
	display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr; align-items: center;
}
.tour-band h2 { color: #fff; }
.tour-band ul { margin: 0; padding-left: 1.1em; }
.tour-band .btn-light { background: #fff; color: var(--lava-dark); }
.tour-band .btn-light:hover { background: var(--sand); }
@media (max-width: 760px) { .tour-band { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
	counter-increment: step; position: relative; padding: 0 0 22px 56px;
}
.steps li::before {
	content: counter(step); position: absolute; left: 0; top: -2px;
	width: 38px; height: 38px; border-radius: 50%;
	background: var(--basalt); color: var(--ember); font-weight: 700;
	display: grid; place-items: center;
}

/* ---------- FAQ ---------- */
.faq details {
	background: #fff; border-radius: 12px; margin-bottom: 12px;
	border: 1px solid rgba(0,0,0,.07);
}
.faq summary {
	cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none;
	display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--lava); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq .faq-answer { padding: 0 22px 18px; }

/* ---------- Map ---------- */
.map-embed {
	border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10;
	background: var(--ash); border: 1px solid rgba(0,0,0,.08);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.map-placeholder {
	height: 100%; display: grid; place-items: center; text-align: center;
	color: var(--sand); padding: 24px;
}

/* ---------- Posts ---------- */
.post-card {
	background: #fff; border-radius: var(--radius); overflow: hidden;
	box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(22,19,15,.06);
	display: flex; flex-direction: column;
}
.post-card .thumb { aspect-ratio: 16 / 10; background: var(--ash); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .thumb-fallback {
	width: 100%; height: 100%;
	background: radial-gradient(circle at 70% 120%, var(--lava), transparent 60%), linear-gradient(160deg, var(--basalt-2), #0e0c0a);
}
.post-card .body { padding: 22px; }
.post-card h3 a, .post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover, .post-card h2 a:hover { color: var(--lava-dark); }
.meta { font-size: .85rem; color: var(--stone); margin-bottom: 8px; }

.page-header {
	background: var(--basalt); color: var(--sand);
	padding: clamp(44px, 7vw, 80px) 0 clamp(36px, 5vw, 56px);
}
.page-header h1 { color: #fff; margin-bottom: .3em; }
.breadcrumbs { font-size: .85rem; color: var(--stone); margin-bottom: 14px; }
.breadcrumbs a { color: var(--ember); text-decoration: none; }

.entry-content { padding: 48px 0 64px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: 10px; }
.entry-content blockquote {
	margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--lava);
	font-family: var(--font-display); font-size: 1.15rem;
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.entry-content th, .entry-content td { border-bottom: 1px solid rgba(0,0,0,.1); padding: 10px; text-align: left; }
.featured-image { margin-top: -30px; }
.featured-image img { border-radius: var(--radius); width: 100%; }

.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); max-width: none; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--stone); text-align: center; margin-top: 6px; }

.pagination { display: flex; gap: 8px; justify-content: center; padding: 30px 0 60px; flex-wrap: wrap; }
.pagination .page-numbers {
	padding: 8px 14px; border-radius: 8px; background: #fff; text-decoration: none;
	border: 1px solid rgba(0,0,0,.08);
}
.pagination .current { background: var(--lava); color: #fff; border-color: var(--lava); }

.inline-cta {
	background: var(--sand); border-radius: var(--radius); padding: 26px; margin: 40px 0 0;
	display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.inline-cta p { margin: 0; font-weight: 600; }

/* ---------- Comments ---------- */
.comments-area { padding-bottom: 60px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { background: #fff; border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea, .search-form input[type="search"] {
	width: 100%; padding: 12px; border-radius: 10px; border: 1px solid rgba(0,0,0,.18); font: inherit; background: #fff;
}
.comment-form .submit, .search-form button { background: var(--lava); color: #fff; border: 0; padding: 12px 22px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.search-form { display: flex; gap: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: #0e0c0a; color: var(--stone); padding: 56px 0 28px; font-size: .95rem; }
.site-footer a { color: var(--sand); text-decoration: none; }
.site-footer a:hover { color: var(--ember); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr; margin-bottom: 36px; }
.site-footer h3 { color: var(--sand); font-size: 1.05rem; font-family: var(--font-body); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp float ---------- */
.wa-float {
	position: fixed; right: 18px; bottom: 18px; z-index: 60;
	width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff;
	display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.wa-float:hover { color: #fff; transform: scale(1.05); }

.widget { margin-bottom: 28px; }

/* ---------- Pricing ---------- */
.price-grid { align-items: stretch; }
.price-card { position: relative; }
.section-dark .price-card.is-popular { border: 2px solid var(--lava); background: #2a221b; }
.price-card .badge {
	position: absolute; top: -13px; left: 28px;
	background: var(--lava); color: #fff; font-size: .75rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .08em; padding: 4px 12px; border-radius: 999px;
}
.price { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; }
.price .amount { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: #fff; line-height: 1; }
.price .per { color: var(--stone); font-size: .9rem; }
.per-person { color: var(--ember); font-size: .9rem; margin-bottom: 18px; }
.checks { list-style: none; padding: 0 !important; margin: 0 0 24px; }
.checks li { padding: 6px 0 6px 26px; position: relative; font-size: .95rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--lava); font-weight: 700; }
.btn-outline { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-outline:hover { border-color: var(--lava); color: #fff; }
.btn-block { display: block; text-align: center; width: 100%; }
.price-notes {
	display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
	margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--ash); font-size: .95rem;
}
.price-notes p { margin: 0; color: var(--stone); }
.section-dark .btn-lava, .section-dark .btn-outline, .section-dark .btn-ghost { color: #fff; }

/* ---------- Photo hero ---------- */
.hero.has-image {
	min-height: min(88vh, 780px);
	display: flex; align-items: flex-end;
	background: #0e0c0a;
}
.hero-img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: cover; object-position: center 40%; z-index: 0;
	filter: brightness(1.25) contrast(1.05);
}
.hero.has-image::before {
	z-index: 1;
	background:
		linear-gradient(90deg, rgba(14,12,10,.72) 0%, rgba(14,12,10,.3) 50%, rgba(14,12,10,0) 100%),
		linear-gradient(180deg, rgba(14,12,10,0) 40%, rgba(14,12,10,.55) 100%);
}
.hero.has-image .wrap { z-index: 2; width: 100%; }
.hero h1 { text-shadow: 0 2px 24px rgba(0,0,0,.35); }
@media (max-width: 760px) {
	.hero.has-image { min-height: 92vh; }
	.hero-img { object-position: 55% center; }
	.hero.has-image::before {
		background: linear-gradient(180deg, rgba(14,12,10,0) 0%, rgba(14,12,10,.45) 40%, rgba(14,12,10,.88) 100%);
	}
}

/* ---------- Photos in sections ---------- */
.split { display: grid; gap: 48px; grid-template-columns: 1.1fr .9fr; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.photo { margin: 0; border-radius: 18px; overflow: hidden; background: var(--ash); box-shadow: 0 18px 40px rgba(22,19,15,.18); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-tall { aspect-ratio: 4 / 5; }
.photo-wide { aspect-ratio: 3 / 2; margin-bottom: 20px; }
@media (max-width: 860px) { .photo-tall { aspect-ratio: 4 / 3; } }

/* ---------- Floating booking button ---------- */
.book-float {
	position: fixed; z-index: 61; right: 88px; bottom: 22px;
	display: inline-flex; align-items: baseline; gap: 8px;
	background: var(--lava); color: #fff; text-decoration: none;
	padding: 15px 24px; border-radius: 999px; font-weight: 700;
	box-shadow: 0 10px 28px rgba(184,61,15,.45);
	opacity: 0; transform: translateY(20px); pointer-events: none;
	transition: opacity .25s ease, transform .25s ease, background .15s ease;
}
.book-float.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.book-float:hover { background: var(--lava-dark); color: #fff; }
.book-float-sub { font-weight: 500; font-size: .85rem; opacity: .85; }
.no-js .book-float { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 760px) {
	.book-float { left: 16px; right: 86px; bottom: 18px; justify-content: center; padding: 16px 18px; }
	.wa-float { bottom: 18px; right: 16px; }
	.site-footer { padding-bottom: 100px; }
}
@media (prefers-reduced-motion: reduce) { .book-float { transition: none; } }

/* ---------- Video ---------- */
.split-media { grid-template-columns: .8fr 1.2fr; }
.video-frame {
	position: relative; margin: 0; border-radius: 22px; overflow: hidden;
	aspect-ratio: 3 / 4; max-width: 440px; width: 100%; justify-self: center;
	background: #000; box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.vc-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-badge {
	position: absolute; left: 14px; bottom: 14px;
	background: rgba(14,12,10,.75); color: #fff; font-size: .8rem; font-weight: 600;
	padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(4px);
}
.video-badge::before { content: "● "; color: var(--lava); }
@media (max-width: 860px) {
	.split-media { grid-template-columns: 1fr; }
	.video-frame { max-width: 360px; }
}

/* ---------- Cruise ---------- */
.cruise-band {
	display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
	background: #fff; border-radius: 22px; padding: clamp(26px, 4vw, 44px);
	box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(22,19,15,.06);
}
.cruise-icon {
	width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center;
	background: var(--sea); color: #fff;
}
.cruise-text h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cruise-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cruise-points li { padding-left: 24px; position: relative; }
.cruise-points li::before { content: "✓"; position: absolute; left: 0; color: var(--lava); font-weight: 700; }
.cruise-cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.text-link { font-size: .9rem; font-weight: 600; }
@media (max-width: 900px) { .cruise-band { grid-template-columns: 1fr; } }

/* ---------- Driver ---------- */
.driver { display: grid; grid-template-columns: 260px 1fr; gap: 44px; align-items: center; max-width: 960px; }
.driver-photo {
	margin: 0; width: 260px; height: 260px; border-radius: 50%; overflow: hidden;
	box-shadow: 0 0 0 8px var(--sand), 0 18px 40px rgba(22,19,15,.18);
}
.driver-photo img { width: 100%; height: 100%; object-fit: cover; }
.driver-photo.is-empty {
	display: grid; place-items: center;
	background: linear-gradient(135deg, var(--lava), var(--ember));
	color: #fff; font-family: var(--font-display); font-size: 6rem; font-weight: 700;
}
.driver-sign { font-family: var(--font-display); font-style: italic; color: var(--stone); }
@media (max-width: 760px) {
	.driver { grid-template-columns: 1fr; gap: 24px; }
	.driver-photo { width: 180px; height: 180px; }
	.driver-photo.is-empty { font-size: 4rem; }
}

/* ---------- Reviews & rating ---------- */
.rating-badge {
	display: inline-flex; align-items: center; gap: 10px; margin-top: 8px;
	background: rgba(255,255,255,.06); border: 1px solid var(--ash);
	padding: 8px 14px; border-radius: 999px; font-size: .9rem; text-decoration: none; color: inherit;
}
.section-sand .rating-badge { background: #fff; border-color: rgba(0,0,0,.08); }
.stars {
	--rating: 5; letter-spacing: 2px; font-size: 1.05rem;
	background: linear-gradient(90deg, var(--ember) calc(var(--rating) / 5 * 100%), rgba(138,128,117,.4) 0);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.review blockquote { margin: 0 0 14px; font-family: var(--font-display); font-size: 1.08rem; line-height: 1.55; }
.review blockquote p::before { content: "“"; color: var(--lava); }
.review blockquote p::after { content: "”"; color: var(--lava); }
.review figcaption { margin-top: auto; font-size: .9rem; color: var(--stone); }
.reviews-more { margin-top: 24px; font-weight: 600; }
