/*
Theme Name: Offer Base
Theme URI: https://10msoffer.com/
Author: Rahat
Description: A lightweight, full-width classic theme for Elementor-built sites. It draws no header or footer of its own, so header, footer and footer-navigation plugins (hooked to wp_body_open / wp_footer) provide them. Comments and category sections are switched off.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: offer-base
*/

/* ==========================================================================
   1. DESIGN TOKENS  — change the look of the whole site from here
   ========================================================================== */

/* Agdasima Bold (self-hosted, SIL OFL). Only the 700 weight is used. */
@font-face {
	font-family: "Agdasima";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/agdasima-latin-ext-700.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Agdasima";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/agdasima-latin-700.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched local fallback for Agdasima (condensed) to prevent H1 font-swap CLS.
   Restricted to Latin ranges so Bengali characters fall through at full size. */
@font-face {
	font-family: "Agdasima Fallback";
	font-style: normal;
	font-weight: 700;
	src: local("Arial Bold"), local("Arial"), local("Roboto Bold"), local("Roboto"), local("Helvetica Neue Bold"), local("Helvetica Neue"), local("Noto Sans Bold"), local("Noto Sans");
	size-adjust: 68.93%;
	ascent-override: 144.64%;
	descent-override: 29.04%;
	line-gap-override: 0%;
	unicode-range: U+0000-02BA, U+02BB-02C5, U+02C6-02CC, U+02CE-02D7, U+02DA, U+02DC, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2000-206F, U+20A0-20AB, U+20AC, U+20AD-20C0, U+2113, U+2122, U+2191, U+2193, U+2212, U+2215, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD;
}

:root {
	/* Colours */
	--offer-bg: #f3f0e7;          /* website background */
	--offer-text: #000000;        /* body text */
	--offer-heading: #000000;     /* H2 – H6 */
	--offer-h1: #A62B0C;          /* H1 */
	--offer-link: #A62B0C;
	--offer-link-hover: #f97e4d;

	/* Typography – desktop & tablet */
	--offer-font-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Nirmala UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
	--offer-font-heading: var(--offer-font-base);   /* "Default Family" */
	--offer-font-h1: "Agdasima", "Agdasima Fallback", var(--offer-font-base);

	--offer-fs-base: 16px;
	--offer-fw-base: 400;
	--offer-lh-base: 1.65;
	--offer-lh-heading: 1.3;

	--offer-fs-h1: 60px;
	--offer-fs-h2: 30px;
	--offer-fs-h3: 25px;
	--offer-fs-h4: 22px;
	--offer-fs-h5: 20px;
	--offer-fs-h6: 16px;
	--offer-fw-heading: 700;

	/* Layout */
	--offer-gutter: clamp(16px, 4vw, 48px);  /* side space for non-Elementor content only */
	--offer-scroll-offset: 96px;             /* keeps #anchors clear of the floating header */

	/* Legacy Blocksy palette – Elementor "Global Colors" saved from the Blocksy
	   theme point at these variables, so they are kept with their old values. */
	--theme-palette-color-1: #ff6310;
	--theme-palette-color-2: #fd7c47;
	--theme-palette-color-3: #687279;
	--theme-palette-color-4: #111518;
	--theme-palette-color-5: #e9ebec;
	--theme-palette-color-6: #f4f5f6;
	--theme-palette-color-7: #ffffff;
	--theme-palette-color-8: #ffffff;
}

/* Mobile (Elementor mobile breakpoint) */
@media (max-width: 767px) {
	:root {
		--offer-fs-h1: 30px;
		--offer-fs-h2: 22px;
		--offer-fs-h3: 20px;
		--offer-fs-h4: 18px;
		--offer-fs-h5: 15px;
		--offer-fs-h6: 15px;
	}
}

/* ==========================================================================
   2. BASE
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: var(--offer-scroll-offset);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background-color: var(--offer-bg);
	color: var(--offer-text);
	font-family: var(--offer-font-base);
	font-size: var(--offer-fs-base);
	font-weight: var(--offer-fw-base);
	line-height: var(--offer-lh-base);
	overflow-x: hidden;
	overflow-x: clip;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
video,
svg,
canvas {
	max-width: 100%;
	height: auto;
}

iframe {
	max-width: 100%;
}

/* Headings. Plain element selectors (specificity 0,0,1) so that Elementor
   widgets, plugins and custom classes always win when they set their own values. */
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	font-family: var(--offer-font-heading);
	font-weight: var(--offer-fw-heading);
	line-height: var(--offer-lh-heading);
	color: var(--offer-heading);
}
h1 { font-family: var(--offer-font-h1); font-size: var(--offer-fs-h1); color: var(--offer-h1); }
h2 { font-size: var(--offer-fs-h2); }
h3 { font-size: var(--offer-fs-h3); }
h4 { font-size: var(--offer-fs-h4); }
h5 { font-size: var(--offer-fs-h5); }
h6 { font-size: var(--offer-fs-h6); }

p { margin: 0 0 1em; }

/* Links. :where() keeps specificity at zero so plugin/Elementor link styles are never overridden. */
:where(a) {
	color: var(--offer-link);
	text-decoration: none;
	transition: color .2s ease;
}
:where(a:hover, a:focus-visible) {
	color: var(--offer-link-hover);
}
:where(.entry-content a:hover, .entry-content a:focus-visible) {
	text-decoration: underline;
	text-underline-offset: .15em;
}

/* Lists: neutral everywhere (plugins rely on this), bulleted only in written content.
   Both rules use :where() so Elementor widgets and plugins can still restyle their own lists. */
:where(ul) { margin: 0; padding: 0; }
:where(.entry-content) :where(ul, ol) { margin: 0 0 1em; padding-inline-start: 1.5em; }
:where(.entry-content) :where(ul) { list-style: disc; }

blockquote {
	margin: 0 0 1em;
	padding: .25em 0 .25em 1em;
	border-inline-start: 4px solid var(--offer-link);
}

hr {
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, .15);
	margin: 2em 0;
}

/* Tables: full-width on desktop, horizontally scrollable inside wrapper on mobile
   with zero JS and zero CLS. */
.offer-table-wrap,
.wp-block-table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 0 1em;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1em;
}
.offer-table-wrap > table,
.wp-block-table > table {
	margin: 0;
}
:where(th, td) {
	padding: .6em .8em;
	border: 1px solid rgba(0, 0, 0, .15);
	text-align: start;
	vertical-align: top;
}
:where(th) {
	background-color: rgba(0, 0, 0, .04);
	font-weight: 700;
}

@media (max-width: 767px) {
	:where(.offer-table-wrap, .wp-block-table) table {
		font-size: .875rem;
		line-height: 1.45;
	}
	:where(.offer-table-wrap, .wp-block-table) :where(th, td) {
		padding: .45em .6em;
		overflow-wrap: normal;
		word-break: normal;
	}
	:where(.offer-table-wrap, .wp-block-table) :where(th:first-child, td:first-child) {
		min-width: 140px;
		overflow-wrap: break-word;
	}
	/* Fallback for any bare table rendered outside the_content filter. */
	:where(.entry-content table):not(.offer-table-wrap table):not(.wp-block-table table) {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* Accessibility helpers */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
	left: 12px;
	top: 12px;
	z-index: 100000;
	padding: 10px 16px;
	background: #fff;
	color: var(--offer-link);
	font-weight: 700;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

/* ==========================================================================
   3. LAYOUT — the content area is always full width
   ========================================================================== */

.site,
.site-main,
.entry,
.entry-content {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

/* Elementor pages: zero outer spacing — Elementor containers control their own. */
.entry--elementor .entry-content {
	padding: 0;
}

/* Pages/posts written in the normal editor: full width, with a small side gutter
   so text does not touch the screen edge. Full-width blocks still go edge to edge. */
.entry--plain {
	padding-block: clamp(24px, 4vw, 56px);
}
.entry--plain .entry-header,
.entry--plain .entry-thumb,
.entry--plain .entry-content,
.entry-nav,
.listing {
	padding-inline: var(--offer-gutter);
}
.entry--plain .entry-content .alignfull {
	width: auto;
	max-width: none;
	margin-inline: calc(var(--offer-gutter) * -1);
}
.entry--plain .entry-content::after {
	content: "";
	display: table;
	clear: both;
}
.entry--plain .entry-header { margin-bottom: 1em; }
.entry--plain .entry-title { margin-bottom: .25em; }
.entry-meta { font-size: .875em; color: rgba(0, 0, 0, .65); }
.entry-thumb { margin-bottom: 1.5em; }
.entry-thumb img { display: block; width: 100%; height: auto; border-radius: 12px; }

/* Previous / next post */
.entry-nav { padding-block: 0 clamp(24px, 4vw, 56px); }
.entry-nav .nav-links { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.entry-nav .nav-links > div { max-width: 48%; }
.entry-nav .nav-subtitle { display: block; font-size: .8125em; opacity: .65; }
.entry-nav .nav-title { font-weight: 700; }

/* ==========================================================================
   4. LISTINGS (blog index, archives, search) & 404
   ========================================================================== */

.listing { padding-block: clamp(24px, 4vw, 56px); }
.archive-header { margin-bottom: 1.5em; }
.archive-title { margin-bottom: .25em; }
.archive-description { max-width: 60ch; }

.posts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}
@media (max-width: 1024px) { .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .posts-grid { grid-template-columns: 1fr; gap: 16px; } }

.card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px -12px rgba(0, 0, 0, .12);
}
.card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: rgba(0, 0, 0, .05); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { margin: 0; font-size: var(--offer-fs-h4); }
.card-title a { color: var(--offer-heading); }
.card-title a:hover { color: var(--offer-link-hover); }
.card .entry-meta { margin: 0; }
.card-excerpt { margin: 0; }
.card-excerpt p { margin: 0; }

.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
	min-width: 40px;
	padding: 8px 14px;
	text-align: center;
	border-radius: 999px;
	background: #fff;
	color: var(--offer-heading);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.pagination a.page-numbers:hover { color: var(--offer-link-hover); }
.pagination .page-numbers.current { background: var(--offer-link); color: #fff; }

/* Search form + buttons used by the theme's own templates */
.search-form { display: flex; gap: 8px; max-width: 520px; margin-block: 1em; }
.search-form label { flex: 1; }
.search-form .search-field {
	width: 100%;
	padding: 10px 16px;
	font: inherit;
	color: var(--offer-text);
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 999px;
}
.search-form .search-field:focus { outline: 2px solid var(--offer-link); outline-offset: 1px; }
.search-form .search-submit,
.offer-button,
.wp-element-button {
	padding: 10px 22px;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--offer-link);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: background-color .2s ease;
}
.search-form .search-submit:hover,
.offer-button:hover,
.wp-element-button:hover {
	color: #fff;
	background: var(--offer-link-hover);
	text-decoration: none;
}

.error-404 { text-align: center; padding-block: clamp(48px, 10vw, 120px); }
.error-404 .search-form { margin-inline: auto; }

/* Core block basics */
.wp-caption, figure { max-width: 100%; margin: 0 0 1em; }
.wp-caption-text, figcaption { font-size: .875em; opacity: .75; }
.alignleft  { float: left;  margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
