/*
Theme Name: Serendib
Theme URI: https://lrdevstudio.com/serendib
Author: LR Dev Studio
Author URI: https://lrdevstudio.com
Description: Serendib is an ultra-lightweight, block-based (FSE) WordPress theme for Sri Lanka travel blogs and expert travel resources. Soft pastel palette of warm sand, tropical green and gentle ocean blue, elegant long-read typography, clean itinerary layouts and seamless photo integration. Built for speed on mobile networks. No page builder, zero external requests.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: serendib
Tags: full-site-editing, block-styles, blog, travel, editor-style, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks, accessibility-ready
*/

/* =========================================================
   Serendib — supplementary styles
   Most styling lives in theme.json (palette, type, spacing).
   This file covers component-level polish that theme.json
   can't express: the itinerary timeline, card hovers,
   image treatments and reading refinements.
   ========================================================= */

:root {
	--sd-radius: 14px;
	--sd-radius-lg: 22px;
	--sd-transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Base reading rhythm ---- */
body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.entry-content p,
.wp-block-post-content p {
	max-width: 68ch;
}

/* First-paragraph drop cap on single posts, used sparingly */
.single .wp-block-post-content > p:first-of-type:first-letter {
	font-family: var(--wp--preset--font-family--display);
	font-size: 3.4em;
	line-height: 0.82;
	font-weight: 600;
	float: left;
	margin: 0.06em 0.12em 0 0;
	color: var(--wp--preset--color--ocean-deep);
}

/* ---- Links: quiet underline that grows on hover ---- */
.wp-block-post-content a,
.entry-content a {
	background-image: linear-gradient(var(--wp--preset--color--ocean), var(--wp--preset--color--ocean));
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 100% 1px;
	transition: background-size var(--sd-transition);
	text-decoration: none;
}
.wp-block-post-content a:hover,
.entry-content a:hover {
	background-size: 100% 0.42em;
	color: var(--wp--preset--color--ink);
}

/* ---- Buttons: gentle lift ---- */
.wp-element-button,
.wp-block-button__link {
	transition: transform var(--sd-transition), background-color var(--sd-transition), box-shadow var(--sd-transition);
	box-shadow: 0 6px 16px rgba(78, 107, 74, 0.18);
}
.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(46, 42, 36, 0.18);
}
.wp-block-button.is-style-outline .wp-block-button__link {
	box-shadow: none;
	border: 1.5px solid var(--wp--preset--color--green-deep);
	color: var(--wp--preset--color--green-deep);
	background: transparent;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--green-deep);
	color: var(--wp--preset--color--base);
}

/* ---- Images: soft rounded corners + subtle hover on cards ---- */
.wp-block-image img,
.wp-block-post-featured-image img {
	border-radius: var(--sd-radius);
}
.wp-block-post-featured-image {
	overflow: hidden;
	border-radius: var(--sd-radius);
}
figure.wp-block-image figcaption {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
	margin-top: 0.6rem;
}

/* =========================================================
   Cards (destinations / guides query loop)
   Add the "Travel Card" block style to a Group/Post-Template item.
   ========================================================= */
.is-style-travel-card {
	background: var(--wp--preset--color--base);
	border: 1px solid rgba(203, 177, 139, 0.35);
	border-radius: var(--sd-radius-lg);
	overflow: hidden;
	transition: transform var(--sd-transition), box-shadow var(--sd-transition);
	box-shadow: var(--wp--preset--shadow--soft);
	height: 100%;
}
.is-style-travel-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--lift);
}
.is-style-travel-card .wp-block-post-featured-image,
.is-style-travel-card .wp-block-image,
.is-style-travel-card img {
	border-radius: 0;
}
.is-style-travel-card .wp-block-post-featured-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
	transition: transform 500ms ease;
}
.is-style-travel-card:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

/* Eyebrow label (category / kicker) */
.sd-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ocean-deep);
}

/* =========================================================
   Itinerary timeline — the signature element
   Markup: a Group with class "sd-itinerary" wrapping
   per-day Groups with class "sd-day". Each sd-day starts
   with an H3 (the day title).
   ========================================================= */
.sd-itinerary {
	position: relative;
	padding-left: 2.25rem;
	border-left: 2px solid var(--wp--preset--color--sand-deep);
	margin-block: var(--wp--preset--spacing--40);
}
.sd-day {
	position: relative;
	padding-bottom: var(--wp--preset--spacing--40);
}
.sd-day:last-child {
	padding-bottom: 0;
}
.sd-day::before {
	content: "";
	position: absolute;
	left: calc(-2.25rem - 8px);
	top: 0.35em;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--wp--preset--color--ocean);
	border: 3px solid var(--wp--preset--color--base);
	box-shadow: 0 0 0 2px var(--wp--preset--color--ocean);
}
.sd-day > h3:first-child,
.sd-day > .wp-block-heading:first-child {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--green-deep);
}

/* =========================================================
   Header
   ========================================================= */
.wp-block-template-part .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	letter-spacing: -0.01em;
	text-decoration: none;
}
.wp-block-navigation a {
	font-size: 0.95rem;
}
.wp-block-navigation a:hover {
	color: var(--wp--preset--color--ocean-deep);
}
.sd-sticky-header {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: saturate(140%) blur(8px);
	background: rgba(251, 248, 242, 0.82);
	border-bottom: 1px solid rgba(203, 177, 139, 0.3);
}

/* =========================================================
   Post meta row
   ========================================================= */
.sd-meta {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
}
.sd-meta .wp-block-post-date,
.sd-meta .wp-block-post-terms {
	color: var(--wp--preset--color--ink-soft);
}

/* =========================================================
   Forms (search, comments) — soft inputs
   ========================================================= */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
textarea,
select {
	background: var(--wp--preset--color--base);
	border: 1px solid rgba(203, 177, 139, 0.6);
	border-radius: 10px;
	padding: 0.7rem 0.9rem;
	font-family: var(--wp--preset--font-family--body);
	color: var(--wp--preset--color--ink);
	transition: border-color var(--sd-transition), box-shadow var(--sd-transition);
}
input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--wp--preset--color--ocean);
	box-shadow: 0 0 0 3px rgba(141, 192, 196, 0.3);
}

/* =========================================================
   Accessibility & motion
   ========================================================= */
:where(a, button, input, .wp-block-button__link):focus-visible {
	outline: 2px solid var(--wp--preset--color--ocean-deep);
	outline-offset: 3px;
	border-radius: 4px;
}
.skip-link {
	position: absolute;
	left: -9999px;
}
.skip-link:focus {
	left: 1rem;
	top: 1rem;
	z-index: 1000;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
	padding: 0.6rem 1rem;
	border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* =========================================================
   Small screens
   ========================================================= */
@media (max-width: 600px) {
	.single .wp-block-post-content > p:first-of-type:first-letter {
		font-size: 2.8em;
	}
	.sd-itinerary {
		padding-left: 1.6rem;
	}
	.sd-day::before {
		left: calc(-1.6rem - 8px);
	}
}
