/*
Theme Name: Phan Ai Thuy
Theme URI: https://example.com/phanthi
Author: Phan Ai Thuy
Author URI: https://example.com/
Description: A custom classic WordPress theme for the poetry author site "Phan Ái Thủy — Complete Poems". Converted 1:1 from the original static HTML build, with GSAP scroll animations, a 3D book showcase, a video trailer section and a book-sample reader modal. All content is editable through the Customizer and native custom post types — no page builder and no premium plugins required.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: phanthi
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready, blog, portfolio
*/

/* ---------------------------------------------------------------------------
   This file deliberately contains almost no design rules.

   The site's design lives untouched in:
     assets/css/card.css            (front page only)
     assets/css/check6.css          (main stylesheet)
     assets/css/preloader-text.css

   Only WordPress-specific corrections belong here. This stylesheet is enqueued
   LAST so these rules win without any edit to check6.css.
   --------------------------------------------------------------------------- */

/* --- WordPress admin bar vs. the fixed header ---------------------------- */
/* check6.css sets `.header { position: fixed; top: 0 }` and the preloader is a
   fixed full-screen overlay. For logged-in users the admin bar sits on top of
   both, so everything shifts down by its height. */
body.admin-bar .header {
	top: 32px;
}

body.admin-bar .loading-screen {
	top: 32px;
	height: calc(100% - 32px);
}

body.admin-bar .hero {
	min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .header {
		top: 46px;
	}

	body.admin-bar .loading-screen {
		top: 46px;
		height: calc(100% - 46px);
	}

	body.admin-bar .hero {
		min-height: calc(100vh - 46px);
	}
}

/* The admin bar is not fixed below 600px, so no offset is needed there. */
@media screen and (max-width: 600px) {
	body.admin-bar .header,
	body.admin-bar .loading-screen {
		top: 0;
	}

	body.admin-bar .loading-screen {
		height: 100%;
	}
}

/* --- Accessibility: skip link ------------------------------------------- */
.skip-link.screen-reader-text {
	background-color: #fff;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	color: #21759b;
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: 0.875rem;
	font-weight: 700;
	left: -9999em;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: -9999em;
}

.skip-link.screen-reader-text:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	left: 6px;
	top: 7px;
	width: auto;
	z-index: 100000;
}

body.admin-bar .skip-link.screen-reader-text:focus {
	top: 39px;
}

/* --- Accessibility: screen-reader-only text ------------------------------ */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* --- Accessibility: keep focus visible ---------------------------------- */
/* check6.css removes outlines in places; restore a visible focus ring for
   keyboard users without changing the mouse-driven appearance. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid #6BA8D6;
	outline-offset: 2px;
}

/* --- Anti-spam honeypot -------------------------------------------------- */
.phanthi-hp-field {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* --- Reviews: optional "show all at once" grid --------------------------- */
/* Off by default. The source shows one review at a time, because check6.css
   sets `.testimonial-card { min-width: 100% }` and check5.js translates the
   track. When the Customizer option is on, the controls are not rendered, so
   the slider JS bails and never applies a transform. */
.phanthi-reviews-grid {
	max-width: 1150px;
}

.phanthi-reviews-grid .testimonial-track {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: clamp(1.5rem, 3vw, 2rem);
	transform: none !important;
}

.phanthi-reviews-grid .testimonial-card {
	min-width: 0;
	opacity: 1;
	transform: none;
}

/* --- Blog-side templates ------------------------------------------------- */
/* index / archive / search / single / page / 404 have no counterpart in the
   original static site. `.hero` normally supplies the offset under the fixed
   header; these templates have no hero, so the wrapper supplies it. */
.phanthi-blog {
	padding-top: calc(var(--header-height, 80px) + clamp(2rem, 5vw, 4rem));
}

.phanthi-post-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: clamp(1.5rem, 3vw, 2.25rem);
	max-width: 1100px;
	margin: 0 auto;
}

.phanthi-post-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.75);
	border: 1px solid rgba(135, 206, 235, 0.35);
	box-shadow: var(--shadow-light, 0 5px 15px rgba(135, 206, 235, 0.2));
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.phanthi-post-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-medium, 0 10px 30px rgba(144, 238, 144, 0.25));
}

.phanthi-post-card-media img {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.phanthi-post-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.5rem;
}

.phanthi-post-card .card-title {
	margin: 0;
	font-family: var(--font-primary, 'Playfair Display', serif);
	font-size: 1.25rem;
	line-height: 1.35;
}

.phanthi-post-card .card-title a {
	color: inherit;
	text-decoration: none;
}

.phanthi-single .entry-content,
.phanthi-blog .entry-content {
	max-width: 46rem;
	margin: 0 auto;
}

.phanthi-post-thumb {
	max-width: 46rem;
	margin: 0 auto 2rem;
}

.phanthi-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	max-width: 46rem;
	margin: 2.5rem auto 0;
}

.phanthi-comments {
	max-width: 46rem;
	margin: 3rem auto 0;
}

.phanthi-comments .comment-list {
	list-style: none;
	margin: 0 0 2.5rem;
	padding: 0;
}

.phanthi-comments .comment-list ol.children {
	list-style: none;
	margin: 1rem 0 0 1.5rem;
	padding: 0;
}

.phanthi-searchform {
	max-width: 26rem;
	margin: 0 auto 2.5rem;
}

.phanthi-blog .pagination,
.phanthi-blog .navigation.pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 2.5rem;
}

.phanthi-blog .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.5rem;
	border-radius: 50px;
	text-decoration: none;
	color: var(--dark-gray, #4A4A4A);
	background: rgba(255, 255, 255, 0.8);
	border: 1px solid rgba(135, 206, 235, 0.35);
}

.phanthi-blog .page-numbers.current {
	background: linear-gradient(135deg, var(--accent-green, #90EE90), var(--accent-blue, #87CEEB));
	color: #fff;
	border-color: transparent;
}

/* --- WordPress core content classes ------------------------------------- */
/* Only used by single.php / archive.php / search.php / 404.php, which have no
   equivalent in the original static site. */
.alignleft {
	float: left;
	margin-right: 1.5rem;
	margin-bottom: 1rem;
}

.alignright {
	float: right;
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.alignwide,
.alignfull {
	max-width: 100%;
	height: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
	font-size: 0.875rem;
	font-style: italic;
	text-align: center;
}

.sticky,
.bypostauthor {
	display: block;
}

.entry-content img,
.wp-block-image img {
	max-width: 100%;
	height: auto;
}
