/**
 * 360magazine Child – Frontend styles
 *
 * Self-hosted Fedra Sans + Fedra Serif A (@font-face).
 * theme.json also registers these for global styles; this file ensures
 * the frontend has explicit local URLs relative to this stylesheet.
 
 */
 /*
	Author: sher.chettri@gmail.com, Ambition4Clients
	Project: 360 Magazine Child Theme
*/

/* ==========================================================================
   @font-face – Fedra Sans (primary UI / body)
   Paths are relative to this file: assets/css/ → ../fonts/
   ========================================================================== */

@font-face {
	font-family: "Fedra Sans";
	src: url("../fonts/FedraSans.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Fedra Sans";
	src: url("../fonts/FedraSansItalic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Fedra Sans";
	src: url("../fonts/FedraSansMedium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Fedra Sans";
	src: url("../fonts/FedraSansDemi.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Fedra Sans";
	src: url("../fonts/FedraSansBold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   @font-face – Fedra Serif A (editorial / headings emphasis)
   ========================================================================== */

@font-face {
	font-family: "Fedra Serif A";
	src: url("../fonts/FedraSerifADemi.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Fedra Serif A";
	src: url("../fonts/FedraSerifAItalic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

/* ==========================================================================
   Base typography – use theme.json presets (single source of truth for stacks)
   Global Styles output --wp--preset--font-family--* from settings.typography.fontFamilies
   ========================================================================== */

body {
	font-family: var(--wp--preset--font-family--fedra-sans);
}

/* ==========================================================================
   Header: dropdown and hamburger
   ========================================================================== */

.site-header .header-dropdown {
	display: block;
	border-top: 1px solid var(--wp--preset--color--border, #e0e0dc);
	transition: opacity 0.2s ease, visibility 0.2s ease, max-height 0.3s ease;
}

.site-header .header-dropdown.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	max-height: 0;
	overflow: hidden;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.site-header .header-dropdown:not(.is-hidden) {
	max-height: 80vh;
	overflow-y: auto;
}

/* Hamburger button: visible on small screens when nav is in overlay */
.site-header .header-hamburger {
	display: none;
	min-width: 44px;
	min-height: 44px;
	padding: 0.5rem;
}

@media (max-width: 781px) {
	.site-header .header-hamburger {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
}

/* Focus and hover for hamburger */
.site-header .header-hamburger:hover,
.site-header .header-hamburger:focus-visible {
	opacity: 0.85;
}

.site-header .header-hamburger[aria-expanded="true"] {
	background-color: var(--wp--preset--color--base-soft, #f5f5f3);
}

/* ==========================================================================
   Header: search (optional full-width search container)
   ========================================================================== */

.site-header .wp-block-search {
	max-width: 12rem;
}

@media (max-width: 600px) {
	.site-header .wp-block-search {
		max-width: 100%;
	}
}

/* ==========================================================================
   Marquee / sources strip (optional scroll on small screens)
   ========================================================================== */

.header-marquee {
	border-top: 1px solid var(--wp--preset--color--border, #e0e0dc);
}

.header-marquee p {
	margin: 0.5rem 0;
	white-space: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

/* ==========================================================================
   Article: readable width
   ========================================================================== */

.single-post .wp-block-post-content > .alignwide,
.single-post .wp-block-post-content > .alignfull {
	max-width: none;
}

.single-post .wp-block-post-content > *:not(.alignwide):not(.alignfull) {
	max-width: 42rem;
	margin-left: auto;
	margin-right: auto;
}

/* ==========================================================================
   Archive: source cards grid
   ========================================================================== */

.mag360-sources-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.mag360-source-card {
	border: 1px solid var(--wp--preset--color--border, #e0e0dc);
	padding: 1.25rem;
}

.mag360-sources-pagination {
	text-align: center;
}

.mag360-sources-pagination .page-numbers {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	margin: 0 0.125rem;
}

/* ==========================================================================
   Buttons and links (accessibility)
   ========================================================================== */

a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent, #c84a38);
	outline-offset: 2px;
}

/* ==========================================================================
   WooCommerce: shop page
   ========================================================================== */

.page-woocommerce-shop .woocommerce-product-collection {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 600px) {
	.page-woocommerce-shop .woocommerce-product-collection {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 960px) {
	.page-woocommerce-shop .woocommerce-product-collection {
		grid-template-columns: repeat(3, 1fr);
	}
}
