/*
Theme Name: StudyAbroad Gazette
Theme URI: https://studyabroad.ac/
Author: LSLIT
Author URI: https://lslit.com/
Description: A newspaper-style theme for StudyAbroad.ac — masthead, front-page columns, funded-studentship grid with deadline badges, and a mentorship advert box.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: studyabroad-gazette
*/

:root {
	--paper: #F6F2E8;
	--paper-2: #ECE6D8;
	--paper-3: #E4DED0;
	--ink: #141414;
	--muted: #555048;
	--rule: #C9C2B2;
	--accent: #9B1C1C;
	--serif: 'Source Serif 4', Georgia, serif;
	--display: 'Playfair Display', Georgia, serif;
	--sans: 'Libre Franklin', 'Helvetica Neue', sans-serif;
	--masthead: var(--display);
}

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 17px;
	line-height: 1.55;
}

a { color: var(--ink); text-decoration: none; }
a:hover, a:focus { color: var(--accent); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.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; z-index: 1000;
	background: var(--ink); color: var(--paper); padding: 10px 16px; top: 8px; left: 8px;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }

/* Small caps labels */
.kicker, .label {
	margin: 0;
	font-family: var(--sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.kicker, .kicker a { color: var(--accent); }
.meta { margin: 0; font-family: var(--sans); font-size: 13px; color: var(--muted); }

/* Top strip */
.topbar {
	display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
	padding: 12px 0; border-bottom: 1px solid var(--ink);
	font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
}
.social { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }

/* Masthead */
.masthead { text-align: center; padding: 28px 0 20px; }
.masthead .publisher { letter-spacing: 0.16em; color: var(--muted); }
.site-title {
	margin: 10px 0 8px;
	font-family: var(--masthead);
	font-size: clamp(52px, 10vw, 120px);
	font-weight: 900;
	line-height: 0.95;
	letter-spacing: -0.01em;
}
.site-title a:hover { color: var(--ink); text-decoration: none; }
.site-description { margin: 0; font-style: italic; font-size: 19px; }
.custom-logo-link img { margin: 0 auto 10px; max-height: 90px; width: auto; }

/* Sections nav */
.double-rule { border-top: 4px double var(--ink); }
.single-rule { border-top: 1px solid var(--ink); }
.sections ul {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px;
	margin: 0; padding: 12px 0; list-style: none;
	font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.sections a { display: inline-block; padding: 8px 0; }
.sections .menu-highlight > a, .sections .current-menu-item > a { color: var(--accent); }
.sections .sub-menu { display: none; }

/* Ticker */
.ticker {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
	padding: 12px 0; border-bottom: 1px solid var(--ink);
}
.ticker .badge {
	background: var(--accent); color: #fff; padding: 4px 10px;
	font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.ticker a { font-weight: 600; }

/* Front page top stories */
.top-stories { display: flex; flex-wrap: wrap; gap: 32px; padding: 28px 0 32px; border-bottom: 1px solid var(--ink); }
.lead { flex: 3 1 520px; min-width: 0; }
.lead .thumb, .lead .thumb-placeholder { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--paper-3); }
.lead .kicker { margin-top: 16px; margin-bottom: 6px; }
.lead h2 {
	margin: 0; font-family: var(--display); font-weight: 900; line-height: 1.08;
	font-size: clamp(30px, 4vw, 46px);
}
.lead .standfirst { margin: 14px 0 0; font-size: 19px; line-height: 1.5; }
.lead .meta { margin-top: 14px; }

.col { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: 18px; border-left: 1px solid var(--rule); padding-left: 28px; }
.story { display: flex; flex-direction: column; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.story:last-child { border-bottom: 0; padding-bottom: 0; }
.story h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.18; font-size: 24px; }
.story p.excerpt { margin: 0; font-size: 16px; }
.col.guides .story h3 { font-size: 20px; }
.col-heading {
	margin: 0; padding-bottom: 8px; border-bottom: 2px solid var(--ink);
	font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}

@media (max-width: 860px) {
	.col { border-left: 0; padding-left: 0; border-top: 2px solid var(--ink); padding-top: 18px; }
}

/* Section header */
.section { padding: 32px 0; border-bottom: 1px solid var(--ink); }
.section-head {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px;
	border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 24px;
}
.section-head h2 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 900; }
.more-link-label { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 0; }

/* Studentship grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--rule); padding-top: 14px; }
.card h3 { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.2; }

.deadline {
	display: inline-block; align-self: flex-start;
	font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
	padding: 3px 8px; border: 1px solid var(--ink);
}
.deadline.closed { background: var(--ink); color: var(--paper); }

/* Mentorship + sidebar */
.lower { display: flex; flex-wrap: wrap; gap: 32px; padding: 32px 0 48px; }
.advert {
	flex: 2 1 520px; min-width: 0; border: 4px double var(--ink); padding: 28px;
	display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: center;
}
.advert .kicker { letter-spacing: 0.16em; }
.advert h2 { margin: 0; font-family: var(--display); font-weight: 900; line-height: 1.1; font-size: clamp(28px, 3.6vw, 40px); }
.advert p { margin: 0; max-width: 560px; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
.btn {
	display: inline-block; font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
	text-transform: uppercase; padding: 14px 22px; border: 2px solid var(--ink); min-height: 44px;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover, .btn-solid:focus { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }
.btn-outline:hover, .btn-outline:focus { background: var(--ink); color: var(--paper); text-decoration: none; }

.side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.newsletter { background: var(--paper-2); padding: 20px; }
.newsletter h2 { margin: 0 0 10px; font-family: var(--display); font-size: 22px; font-weight: 700; }
.newsletter input[type="email"], .newsletter input[type="text"] {
	width: 100%; font: 16px var(--serif); padding: 12px; border: 1px solid var(--ink); background: #fff; color: var(--ink);
}
.newsletter button, .newsletter input[type="submit"] {
	width: 100%; margin-top: 10px; font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
	text-transform: uppercase; padding: 14px; border: 0; background: var(--accent); color: #fff; cursor: pointer;
}
.archive-list ul {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px;
	margin: 10px 0 0; padding: 0; list-style: none; font-size: 16px;
}
.archive-list a { display: inline-block; padding: 4px 0; }

/* Archive / index listing */
.page-head { padding: 28px 0 8px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.page-head h1 { margin: 0; font-family: var(--display); font-size: clamp(32px, 5vw, 52px); font-weight: 900; line-height: 1.1; }
.page-head .archive-description { margin-top: 8px; color: var(--muted); }
.listing { display: flex; flex-direction: column; }
.listing-item {
	display: flex; flex-wrap: wrap; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--rule);
}
.listing-item .thumb { flex: 0 0 240px; aspect-ratio: 3 / 2; object-fit: cover; }
.listing-item .body { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.listing-item h2 { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.15; }
.listing-item p.excerpt { margin: 0; }

.pagination { padding: 28px 0 48px; font-family: var(--sans); font-weight: 700; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-block; min-width: 44px; padding: 10px 12px; text-align: center; border: 1px solid var(--ink); }
.pagination .current { background: var(--ink); color: var(--paper); }

/* Single article */
.article { max-width: 760px; margin: 0 auto; padding: 36px 0 48px; }
.article-header { text-align: center; border-bottom: 1px solid var(--ink); padding-bottom: 20px; margin-bottom: 24px; }
.article-header h1 { margin: 10px 0 14px; font-family: var(--display); font-weight: 900; line-height: 1.08; font-size: clamp(32px, 5vw, 54px); }
.article-header .standfirst { font-size: 20px; font-style: italic; margin: 0 0 14px; }
.article-header .deadline { align-self: center; margin-top: 10px; }
.article .featured { margin: 0 0 24px; }
.article .featured figcaption { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 6px; }
.entry-content { font-size: 19px; line-height: 1.65; }
.entry-content > p:first-of-type::first-letter {
	float: left; font-family: var(--display); font-weight: 900; font-size: 4.2em; line-height: 0.85;
	padding: 6px 10px 0 0; color: var(--accent);
}
.entry-content h2, .entry-content h3 { font-family: var(--display); line-height: 1.2; margin: 1.6em 0 0.5em; }
.entry-content a { color: var(--accent); text-decoration: underline; }
.entry-content blockquote {
	margin: 1.5em 0; padding: 0.4em 0 0.4em 1em; border-left: 3px solid var(--ink);
	font-family: var(--display); font-size: 1.2em; font-style: italic;
}
.entry-content table { border-collapse: collapse; width: 100%; font-size: 16px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; }
.entry-content img { margin: 1em auto; }
.article-footer { margin-top: 32px; padding-top: 16px; border-top: 4px double var(--ink); display: flex; flex-wrap: wrap; gap: 8px; }
.article-footer a.tag {
	font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
	padding: 6px 10px; border: 1px solid var(--ink);
}
.related { border-top: 2px solid var(--ink); padding-top: 24px; }

/* Comments */
.comments-area { max-width: 760px; margin: 0 auto 48px; }
.comments-area textarea, .comments-area input[type="text"], .comments-area input[type="email"], .comments-area input[type="url"] {
	width: 100%; font: 16px var(--serif); padding: 10px; border: 1px solid var(--ink); background: #fff;
}
.comments-area input[type="submit"] {
	font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
	padding: 12px 20px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer;
}

/* Footer */
.site-footer { background: var(--ink); color: #E9E4D8; padding: 40px 0 28px; }
.site-footer a { color: #E9E4D8; }
.site-footer a:hover { color: #fff; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.footer-about { flex: 2 1 360px; min-width: 0; }
.footer-about .footer-title { margin: 0 0 10px; font-family: var(--masthead); font-size: 40px; font-weight: 900; line-height: 1; color: var(--paper); }
.footer-about p { margin: 0; font-size: 16px; max-width: 460px; }
.footer-links { flex: 1 1 200px; }
.footer-links ul { margin: 0; padding: 0; list-style: none; font-family: var(--sans); font-size: 14px; }
.footer-links a { display: inline-block; padding: 6px 0; }
.copyright { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid #4A4640; font-family: var(--sans); font-size: 13px; color: #BDB6A8; }

/* Search form */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; font: 16px var(--serif); padding: 10px; border: 1px solid var(--ink); }
.search-form button { font-family: var(--sans); font-weight: 700; text-transform: uppercase; padding: 10px 16px; border: 0; background: var(--ink); color: var(--paper); }

/* WordPress core alignment classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, .wp-element-caption { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.sticky {}
.bypostauthor {}
