/*
Theme Name: Alan Gael Media Arts
Theme URI: https://alangael.com
Author: Built for Alan H. Gael
Author URI: https://alangael.com
Description: A clean, lightweight, dependency-free photography & media portfolio theme. Reproduces the cream-and-accent look of the original site on a modern, maintainable foundation: standard WordPress APIs, no bundled libraries, PHP 8.x native, accessible and responsive.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 7.0
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: agma
Tags: portfolio, photography, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, translation-ready, threaded-comments, accessibility-ready
*/

/* ==========================================================================
   Design tokens
   Every color and the type scale lives here. Change the palette in one place.
   ========================================================================== */
:root {
	--accent:        #42a1cd;
	--accent-dark:   #2f86ab;
	--accent-hover:  #3a97c4;
	--bg:            #ffffff; /* page canvas (white, matching the customized site) */
	--surface:       #ffffff;
	--border:        #e7e7e4;
	--rule:          #d9d9d4; /* hairline dividers */
	--footer-bg:     #f4f4f2;
	--footer-text:   #555555;
	--header-text:   #ffffff;
	--title-blue:    #3f74b8; /* thin wordmark fallback, close to the logo blue */
	--text:          #404040;
	--muted:         #777777;

	--font-display: "Lato", "Helvetica Neue", Arial, sans-serif;
	--font-body:    "Open Sans", "Helvetica Neue", Arial, sans-serif;

	--container: 1160px;
	--gap:       28px;
	--radius:    4px;
	--shadow:    0 2px 10px rgba(0, 0, 0, 0.06);
	--shadow-lift: 0 10px 26px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	color: #2c2c2c;
	line-height: 1.2;
	margin: 0 0 0.5em;
	font-weight: 700;
}

p { margin: 0 0 1.3em; }

blockquote {
	margin: 1.5em 0;
	padding: 0.4em 1.2em;
	border-left: 3px solid var(--accent);
	color: var(--muted);
	font-style: italic;
}

hr { border: 0; height: 1px; background: var(--border); margin: 2em 0; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 22px;
}

.site-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 48px;
	align-items: start;
	padding: 44px 0 64px;
}

@media (max-width: 880px) {
	.site-layout { grid-template-columns: 1fr; gap: 40px; }
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: #fff;
	color: var(--accent-dark);
	padding: 12px 20px;
	z-index: 1000;
	border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* Visible focus everywhere (accessibility floor) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

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

/* ==========================================================================
   Header / masthead — clean white header that showcases the logo
   ========================================================================== */
.site-header {
	background: var(--bg);
	color: var(--text);
}

.masthead {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 4px;
	padding: 40px 0 28px;
}

.custom-logo-link { display: inline-block; max-width: 100%; }
.custom-logo { max-height: 230px; width: auto; height: auto; max-width: 100%; }

/* Text fallback (used only when no logo is set): thin, wide, blue wordmark. */
.site-title {
	font-family: var(--font-display);
	font-size: clamp(30px, 6vw, 64px);
	font-weight: 300;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0;
	line-height: 1.1;
}
.site-title a { color: var(--title-blue); }
.site-title a:hover, .site-title a:focus { text-decoration: none; opacity: 0.85; }

.site-description {
	font-family: var(--font-display);
	font-weight: 300;
	font-size: clamp(15px, 2.4vw, 26px);
	letter-spacing: 0.04em;
	margin: 6px 0 0;
	color: var(--title-blue);
}

/* ==========================================================================
   Navigation — light, understated, hairline-bordered
   ========================================================================== */
.main-navigation {
	background: var(--bg);
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}
.main-navigation .container {
	display: flex;
	align-items: center;
	justify-content: center;
}

.nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--rule);
	color: var(--accent-dark);
	font: 600 14px/1 var(--font-body);
	padding: 12px 16px;
	margin: 10px 0;
	cursor: pointer;
	border-radius: var(--radius);
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.main-navigation li { position: relative; }

.main-navigation a {
	display: block;
	color: var(--accent-dark);
	padding: 14px 18px;
	font-family: var(--font-display);
	font-weight: 400;
	letter-spacing: 0.03em;
	transition: color 0.2s ease;
}
.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
	color: var(--accent);
	text-decoration: none;
}

/* Sub-menus */
.main-navigation ul ul {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--bg);
	border: 1px solid var(--rule);
	box-shadow: var(--shadow);
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	z-index: 50;
}
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.main-navigation ul ul a { padding: 12px 18px; text-align: left; }
.main-navigation ul ul ul { top: 0; left: 100%; }

@media (max-width: 880px) {
	.main-navigation .container { justify-content: flex-start; flex-wrap: wrap; }
	.nav-toggle { display: inline-block; }
	.main-navigation ul { display: none; flex-direction: column; width: 100%; }
	.main-navigation.is-open ul { display: flex; }
	.main-navigation ul ul {
		position: static;
		opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0;
		padding-left: 16px;
	}
}

/* ==========================================================================
   Front-page content (welcome) — flat, left-aligned, no box
   ========================================================================== */
.page-intro {
	margin-bottom: 36px;
}
.page-intro > h1:first-child,
.page-intro .entry-content > h1:first-child { margin-top: 0; }

/* Headings authored inside page/post content. The original site uses lower-level
   headings (e.g. h4) as centered, uppercase section labels above each photo. */
.entry-content h1,
.page-intro h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 400; margin: 0 0 0.5em; }
.entry-content h2 { font-size: 28px; font-weight: 400; }
.entry-content h3,
.entry-content h4 {
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 400;
	color: var(--muted);
	margin: 1.8em 0 0.9em;
}
.entry-content h4 { font-size: 17px; }
.entry-content h3 { font-size: 20px; }
.entry-content h3 a,
.entry-content h4 a { color: var(--muted); }
.entry-content h3 a:hover,
.entry-content h4 a:hover { color: var(--accent-dark); text-decoration: none; }

/* ==========================================================================
   Post grid (gallery cards)
   ========================================================================== */
.section-eyebrow {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 13px;
	font-weight: 700;
	color: var(--accent-dark);
	margin: 8px 0 18px;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--gap);
}
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	display: flex;
	flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.card-thumb { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: #ece9df; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-thumb img { transform: scale(1.05); }

.card-body { padding: 20px 22px 24px; }
.card-title { font-size: 21px; margin: 0 0 8px; }
.card-title a { color: #2c2c2c; }
.card-title a:hover { color: var(--accent-dark); text-decoration: none; }
.card-meta { font-size: 13px; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.card-excerpt { color: var(--muted); font-size: 15.5px; margin: 0; }

/* ==========================================================================
   Single post / page — flat, no box
   ========================================================================== */
.entry {
	margin-bottom: 40px;
	padding-bottom: 8px;
}

.entry-header { margin-bottom: 22px; }
.entry-title { font-size: clamp(26px, 4vw, 38px); font-weight: 400; margin: 0 0 10px; }
.entry-meta { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.entry-featured { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; }

.entry-content { font-size: 17.5px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content img { border-radius: var(--radius); margin: 1.4em auto; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }

.entry-footer { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.entry-footer a { color: var(--accent-dark); }

/* Post navigation */
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-bottom: var(--gap); }
.post-nav a {
	border: 1px solid var(--border);
	border-radius: var(--radius); padding: 14px 18px; flex: 1;
}
.post-nav a:hover { text-decoration: none; border-color: var(--accent); }
.post-nav .nav-next { text-align: right; }
.post-nav small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }

/* Pagination */
.pagination {
	display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
	margin-top: 36px;
}
.pagination .page-numbers {
	display: inline-block; padding: 10px 15px; background: var(--surface);
	border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
}
.pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination a.page-numbers:hover { border-color: var(--accent); text-decoration: none; }

/* ==========================================================================
   Sidebar widgets
   ========================================================================== */
.sidebar .widget {
	margin-bottom: 40px;
}
.widget-title {
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 400;
	color: #444;
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--accent);
	text-transform: none;
	letter-spacing: 0;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
	position: relative;
	padding: 8px 0 8px 18px;
	border-bottom: 1px solid var(--rule);
}
.sidebar li:last-child { border-bottom: 0; }
.sidebar li::before {
	content: "\203A"; /* › */
	position: absolute;
	left: 0;
	color: var(--accent);
	font-weight: 700;
}
.sidebar a { color: var(--text); }
.sidebar a:hover { color: var(--accent-dark); }

/* Search widget: gray input, hidden submit button (as on the original site). */
.sidebar .search-form { display: block; }
.sidebar .search-field {
	width: 100%; padding: 14px 14px; border: 1px solid var(--rule);
	border-radius: 2px; font: inherit; background: #eeeeee; color: var(--text);
}
.sidebar .search-submit,
.sidebar .wp-block-search__button { display: none; }
.sidebar li.recentcomments,
.sidebar .widget_recent_comments li { padding-left: 18px; }

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area { border-top: 1px solid var(--rule); padding: 28px 0 0; margin-top: 8px; }
.comments-title, .comment-reply-title { font-size: 22px; margin-top: 0; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin-left: 28px; padding: 0; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--border); }
.comment-author { font-weight: 700; font-family: var(--font-display); }
.comment-metadata { font-size: 13px; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%; padding: 11px 12px; border: 1px solid var(--border);
	border-radius: var(--radius); font: inherit; background: #fdfdfb; margin-top: 6px;
}
.comment-form p { margin-bottom: 14px; }
.form-submit .submit, .wp-block-button__link, button.submit {
	border: 0; background: var(--accent); color: #fff; padding: 12px 24px;
	border-radius: var(--radius); cursor: pointer; font: 700 15px var(--font-display);
}
.form-submit .submit:hover { background: var(--accent-dark); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	background: var(--footer-bg);
	color: var(--footer-text);
	border-top: 1px solid var(--border);
}
.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 36px;
	padding: 44px 0 30px;
}
.footer-widgets .widget-title { color: var(--footer-text); border-bottom-color: #ddd; }
.footer-widgets a { color: var(--footer-text); }
.footer-widgets a:hover { color: var(--accent-dark); }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets li { padding: 5px 0; }

.site-credit {
	text-align: center;
	padding: 20px 0;
	border-top: 1px solid #ddd;
	font-size: 13.5px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ==========================================================================
   WordPress alignment + caption utilities
   ========================================================================== */
.alignleft  { float: left;  margin: 0.4em 1.5em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { text-align: center; color: var(--muted); font-size: 14px; }
.sticky .card { border-color: var(--accent); }
.bypostauthor { display: block; }

embed, iframe, object { max-width: 100%; }

.no-results { border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
