/*
Theme Name: Fiber Master
Theme URI: https://www.fibermaster.pk
Author: Hashmi Marketing
Author URI: https://www.fibermaster.pk
Description: A simple, minimalist black-and-gold theme for Fiber Master Pakistan -- FRP prefabricated structures, villas, gazebos and play systems. Built to auto-create its own pages on activation.
Version: 2.5.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: fiber-master
*/

/* ==========================================================================
   Fonts (bundled locally, OFL-licensed: Space Grotesk, IBM Plex Sans/Mono)
   ========================================================================== */
@font-face { font-family:'FM Display'; src:url('assets/fonts/SG-Regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'FM Display'; src:url('assets/fonts/SG-Medium.ttf') format('truetype'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'FM Display'; src:url('assets/fonts/SG-Bold.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'FM Body'; src:url('assets/fonts/IPS-Regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'FM Body'; src:url('assets/fonts/IPS-Medium.ttf') format('truetype'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'FM Body'; src:url('assets/fonts/IPS-SemiBold.ttf') format('truetype'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'FM Body'; src:url('assets/fonts/IPS-Bold.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'FM Mono'; src:url('assets/fonts/IBMPlexMono-Regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'FM Mono'; src:url('assets/fonts/IBMPlexMono-Medium.ttf') format('truetype'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'FM Mono'; src:url('assets/fonts/IBMPlexMono-SemiBold.ttf') format('truetype'); font-weight:600; font-style:normal; font-display:swap; }

/* ==========================================================================
   Reset + tokens
   ========================================================================== */
*, *::before, *::after { box-sizing:border-box; }
body { margin:0; padding:0; }
img { max-width:100%; height:auto; }

:root{
	--black:#0B0A08;
	--charcoal:#17140D;
	--gold:#C9A227;
	--gold-deep:#A9821D;
	--ivory:#F3ECDC;
	--warm-gray:#A79878;
	--warm-gray-dim:#7A6F58;
	--on-gold:#1A1508;
	--on-gold-dim:#4A3D17;
	--border-gold:rgba(201,162,39,0.22);
	--max:1280px;
}

html{ scroll-behavior:smooth; }
body{
	background:var(--black);
	color:var(--ivory);
	font-family:'FM Body', -apple-system, Helvetica, Arial, sans-serif;
	font-size:16px;
	line-height:1.5;
	background-image:
		repeating-linear-gradient(0deg, rgba(201,162,39,0.05) 0px, rgba(201,162,39,0.05) 1px, transparent 1px, transparent 40px),
		repeating-linear-gradient(90deg, rgba(201,162,39,0.05) 0px, rgba(201,162,39,0.05) 1px, transparent 1px, transparent 40px);
}
a{ color:inherit; text-decoration:none; }
.wrap{ max-width:var(--max); margin:0 auto; padding:0 24px; }
@media (min-width:900px){ .wrap{ padding:0 40px; } }
@media (min-width:1200px){ .wrap{ padding:0 80px; } }

.gold{ color:var(--gold); }
h1,h2,h3{ font-family:'FM Display', sans-serif; font-weight:700; color:var(--ivory); letter-spacing:-0.3px; }

/* Typographic defaults for real editable content -- anything typed in
   Gutenberg or Elementor flows through here, so it needs sensible spacing
   by default (the component-specific classes above/below override this
   where a tighter, custom layout is needed). */
.fm-content{ padding:56px 0; }
.fm-content > *:first-child{ margin-top:0; }
.fm-content h1, .fm-content h2, .fm-content h3, .fm-content h4{ margin:1.4em 0 0.6em 0; line-height:1.25; }
.fm-content h1{ font-size:38px; }
.fm-content h2{ font-size:30px; }
.fm-content h3{ font-size:22px; }
.fm-content p{ font-size:16px; line-height:1.75; color:var(--warm-gray); margin:0 0 1.2em 0; max-width:760px; }
.fm-content ul, .fm-content ol{ color:var(--warm-gray); font-size:16px; line-height:1.75; margin:0 0 1.2em 0; padding-left:1.3em; max-width:760px; }
.fm-content a:not(.btn){ color:inherit; }
.fm-content p a:not(.btn), .fm-content li a:not(.btn){ color:var(--gold); text-decoration:underline; }
.fm-content img{ border-radius:10px; }
.fm-content > .wp-block-shortcode,
.fm-content > .creds,
.fm-content > .hero-img-wrap,
.fm-content > .fm-cat-grid,
.fm-content > .fm-product-grid{ margin-top:2em; margin-bottom:2em; }
.eyebrow{ font-family:'FM Mono', monospace; font-size:12.5px; letter-spacing:2.5px; color:var(--gold); margin-bottom:20px; display:flex; align-items:center; gap:10px; text-transform:uppercase; }
.eyebrow .tick{ width:22px; height:1.5px; background:var(--gold); display:inline-block; }
.btn{ display:inline-block; font-family:'FM Body'; font-weight:600; font-size:15px; padding:15px 28px; border-radius:7px; cursor:pointer; border:1.5px solid transparent; }
.btn-solid{ background:var(--gold); color:var(--on-gold); }
.btn-outline{ background:transparent; color:var(--gold); border-color:var(--gold); }
.btn-row{ display:flex; flex-wrap:wrap; gap:16px; }

/* Lets a section ignore any parent max-width and stretch edge-to-edge --
   used by the gold credentials strip so it still looks right no matter
   what container Gutenberg/Elementor puts around the content. */
.fm-full-bleed{ width:100vw; position:relative; left:50%; right:50%; margin-left:-50vw; margin-right:-50vw; }

/* corner brackets signature device */
.brackets{ position:relative; }
.brackets::before, .brackets::after{ content:""; position:absolute; width:26px; height:26px; z-index:3; }
.brackets::before{ top:-10px; left:-10px; border-top:3px solid var(--gold); border-left:3px solid var(--gold); }
.brackets::after{ bottom:-10px; right:-10px; border-bottom:3px solid var(--gold); border-right:3px solid var(--gold); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{ background:var(--black); padding:26px 0; border-bottom:1px solid var(--border-gold); position:relative; z-index:20; }
.site-header .wrap{ display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.site-logo{ display:flex; align-items:center; gap:12px; }
.site-logo, .site-logo__text{ font-family:'FM Display'; font-weight:700; font-size:23px; color:var(--ivory); letter-spacing:0.5px; }
.site-logo span{ display:block; font-family:'FM Mono'; font-weight:400; font-size:10px; color:var(--gold); letter-spacing:3px; margin-top:2px; }
.site-logo .custom-logo-link{ display:block; line-height:0; }
.site-logo .custom-logo{ max-height:46px; width:auto; display:block; }

.primary-nav{ display:flex; align-items:center; gap:28px; }
.primary-nav ul{ display:flex; align-items:center; flex-wrap:wrap; list-style:none; margin:0; padding:0; }
.primary-nav ul li{ margin-right:28px; }
.primary-nav ul li:last-child{ margin-right:0; }
.primary-nav a{ font-family:'FM Body'; font-weight:500; font-size:14.5px; color:var(--warm-gray); white-space:nowrap; }
.primary-nav a:hover{ color:var(--gold); }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a{ color:var(--gold); }

.header-social{ display:flex; gap:14px; }
.header-social a{ width:30px; height:30px; border:1px solid var(--border-gold); border-radius:50%; display:flex; align-items:center; justify-content:center; font-family:'FM Mono'; font-size:11px; color:var(--warm-gray); }
.header-social a:hover{ color:var(--gold); border-color:var(--gold); }

.nav-toggle{ display:none; background:none; border:1px solid var(--border-gold); color:var(--ivory); border-radius:6px; padding:8px 12px; font-family:'FM Mono'; font-size:13px; }

@media (max-width:899px){
	.nav-toggle{ display:block; }
	.primary-nav{ display:none; width:100%; order:3; }
	.primary-nav.is-open{ display:block; }
	.primary-nav ul{ flex-direction:column; align-items:flex-start; gap:4px; padding:18px 0 6px 0; }
	.primary-nav ul li{ width:100%; padding:9px 0; border-bottom:1px solid var(--border-gold); }
	.header-social{ order:2; }
}

/* ==========================================================================
   Page header / hero -- one consistent pattern used on every page
   (Home, About, Contact, and all 10 category pages). Text stacks centered,
   with an optional full-width photo below via [fm_hero_photo]. Built this
   way (not one fixed two-column block) so every piece is an independent,
   re-orderable block in Gutenberg / Elementor.
   ========================================================================== */
.hero, .page-hero{ padding:64px 0 56px 0; border-bottom:1px solid var(--border-gold); text-align:center; }
.hero .wrap, .page-hero .wrap{ max-width:820px; }
.hero h1, .page-hero h1{ font-size:clamp(32px,5vw,54px); line-height:1.1; margin-bottom:22px; }
.hero .eyebrow, .page-hero .eyebrow{ justify-content:center; }
.hero-sub{ font-size:17.5px; line-height:1.65; color:var(--warm-gray); max-width:560px; margin:0 auto 30px auto; }
.hero-stats{ display:flex; flex-wrap:wrap; justify-content:center; gap:0; font-family:'FM Mono'; font-size:12.5px; color:var(--warm-gray); margin-top:26px; }
.hero-stats span{ padding-right:16px; margin-right:16px; border-right:1px solid var(--border-gold); }
.hero-stats span:last-child{ border-right:none; }
.hero-stats b{ color:var(--gold); }
.hero .btn-row, .page-hero .btn-row{ justify-content:center; }

.hero-img-wrap, .page-hero-photo-wrap{ max-width:900px; margin:44px auto 0 auto; position:relative; }
.hero-photo-frame{ width:100%; }
.hero-photo, .page-hero-photo{ width:100%; height:0; padding-bottom:56%; border-radius:14px; overflow:hidden; box-shadow:0 24px 55px -14px rgba(0,0,0,0.65); border:1px solid var(--border-gold); position:relative; }
.hero-photo img, .page-hero-photo img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.hero-tag{ position:absolute; left:20px; bottom:-18px; background:var(--charcoal); border:1px solid var(--border-gold); border-radius:7px; padding:10px 16px; box-shadow:0 8px 20px rgba(0,0,0,0.45); font-family:'FM Mono'; font-size:12px; color:var(--ivory); display:inline-flex; align-items:center; gap:10px; max-width:90%; text-align:left; }
.hero-tag .dot{ width:7px; height:7px; border-radius:50%; background:var(--gold); flex:none; }

/* Hero image carousel -- 3 slides auto-cycling, pure CSS, no JS. */
.hero-carousel{ background:var(--charcoal); }
.hero-carousel__slide{ opacity:0; animation: fm-carousel-fade 15s infinite; }
.hero-carousel__slide:first-child{ opacity:1; } /* visible fallback if animations are disabled */
@keyframes fm-carousel-fade{
	0%   { opacity:0; }
	3%   { opacity:1; }
	30%  { opacity:1; }
	36%  { opacity:0; }
	100% { opacity:0; }
}
.hero-carousel__dots{ position:absolute; right:16px; bottom:14px; z-index:4; display:flex; gap:8px; }
.hero-carousel__dot{
	width:22px; height:22px; border-radius:50%; background:rgba(11,10,8,0.55); border:1px solid var(--border-gold);
	color:var(--warm-gray); font-family:'FM Mono'; font-size:11px; display:flex; align-items:center; justify-content:center;
	animation: fm-carousel-dot 15s infinite;
}
@keyframes fm-carousel-dot{
	0%   { background:rgba(11,10,8,0.55); color:var(--warm-gray); }
	3%   { background:var(--gold); color:var(--on-gold); }
	30%  { background:var(--gold); color:var(--on-gold); }
	36%  { background:rgba(11,10,8,0.55); color:var(--warm-gray); }
	100% { background:rgba(11,10,8,0.55); color:var(--warm-gray); }
}

/* ==========================================================================
   Credentials strip (bold gold moment)
   ========================================================================== */
.creds{ background:var(--gold); padding:44px 0; position:relative; overflow:hidden; }
.creds-texture{ position:absolute; top:-60px; right:-80px; width:420px; max-width:50%; opacity:0.12; }
.creds .wrap{ display:flex; flex-wrap:wrap; gap:26px; position:relative; z-index:2; }
.cred{ flex:1 1 150px; padding:0 22px; border-right:1px solid rgba(0,0,0,0.17); }
.cred:last-child{ border-right:none; }
.cred .num{ font-family:'FM Display'; font-weight:700; font-size:25px; color:var(--on-gold); margin-bottom:5px; }
.cred .lbl{ font-family:'FM Body'; font-size:13px; color:var(--on-gold-dim); line-height:1.4; }

/* ==========================================================================
   Category grid (front page) + category archive pages
   ========================================================================== */
.section{ padding:70px 0; }
.section-head{ max-width:700px; margin:0 auto 40px auto; text-align:center; }
.section-head .eyebrow{ justify-content:center; }
.section-head h2{ font-size:clamp(26px,3.6vw,36px); line-height:1.25; }
.section-head p{ font-size:15.5px; color:var(--warm-gray); line-height:1.6; margin-top:14px; }

.fm-cat-grid{ display:flex; flex-wrap:wrap; gap:24px; }
.fm-cat-card{ display:block; width:100%; max-width:100%; flex:1 1 204px; background:var(--charcoal); border-radius:12px; overflow:hidden; border:1px solid var(--border-gold); box-shadow:0 14px 26px -12px rgba(0,0,0,0.55); text-decoration:none; }
.fm-cat-card__photo{ width:100%; height:150px; position:relative; }
.fm-cat-card__photo img{ width:100%; height:100%; object-fit:cover; }
.fm-cat-card__code{ position:absolute; top:10px; left:10px; background:var(--gold); color:var(--on-gold); font-family:'FM Mono'; font-weight:600; font-size:10.5px; padding:4px 9px; border-radius:5px; letter-spacing:0.5px; }
.fm-cat-card__body{ padding:16px 17px 19px 17px; }
.fm-cat-card__name{ font-family:'FM Display'; font-weight:500; font-size:16.5px; color:var(--ivory); margin-bottom:5px; line-height:1.25; }
.fm-cat-card__count{ font-family:'FM Body'; font-size:12.5px; color:var(--warm-gray); }
.fm-cat-card__count b{ color:var(--gold); font-weight:600; }

@media (min-width:600px){ .fm-cat-card{ flex-basis: calc(50% - 12px); } }
@media (min-width:900px){ .fm-cat-card{ flex-basis: calc(33.333% - 16px); } }
@media (min-width:1200px){ .fm-cat-card{ flex-basis: calc(20% - 20px); } }

/* Category archive page: product listing */
.fm-product-grid{ display:flex; flex-wrap:wrap; gap:18px; }
.fm-product-card{ flex:1 1 260px; background:var(--charcoal); border:1px solid var(--border-gold); border-radius:10px; overflow:hidden; }
@media (min-width:640px){ .fm-product-card{ flex-basis: calc(50% - 9px); } }
@media (min-width:1000px){ .fm-product-card{ flex-basis: calc(33.333% - 12px); } }
.fm-product-card__photo{ width:100%; height:170px; }
.fm-product-card__photo img{ width:100%; height:100%; object-fit:cover; display:block; }
.fm-product-card__body{ padding:18px 20px 20px 20px; }
.fm-product-card__code{ font-family:'FM Mono'; font-size:11px; color:var(--gold); letter-spacing:0.5px; margin-bottom:10px; }
.fm-product-card__name{ font-family:'FM Display'; font-weight:500; font-size:17px; color:var(--ivory); line-height:1.3; margin-bottom:6px; }
.fm-product-card__size{ font-family:'FM Mono'; font-size:12px; color:var(--warm-gray-dim); margin-bottom:10px; }
.fm-product-card__desc{ font-family:'FM Body'; font-size:13.5px; color:var(--warm-gray); line-height:1.55; }

.spec-note{ font-size:14px; color:var(--warm-gray-dim); border-top:1px solid var(--border-gold); margin-top:44px; padding-top:24px; max-width:760px; line-height:1.7; }

/* Projects grid */
.fm-project-grid{ display:flex; flex-wrap:wrap; gap:28px; }
.fm-project-card{ flex:1 1 100%; background:var(--charcoal); border:1px solid var(--border-gold); border-radius:12px; overflow:hidden; display:flex; flex-direction:column; }
@media (min-width:760px){ .fm-project-card{ flex-direction:row; } }
.fm-project-card__photo{ flex:0 0 auto; width:100%; height:220px; background:#0F0D09; }
@media (min-width:760px){ .fm-project-card__photo{ width:42%; height:auto; } }
.fm-project-card__photo img{ width:100%; height:100%; object-fit:cover; display:block; }
.fm-project-card__noimg{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:var(--warm-gray-dim); font-family:'FM Mono'; font-size:12px; letter-spacing:0.5px; }
.fm-project-card__body{ padding:28px 30px; flex:1; }
.fm-project-card__loc{ font-family:'FM Mono'; font-size:11.5px; letter-spacing:1px; text-transform:uppercase; color:var(--gold); margin-bottom:8px; }
.fm-project-card__name{ font-family:'FM Display'; font-weight:500; font-size:24px; color:var(--ivory); margin-bottom:12px; }
.fm-project-card__desc{ color:var(--warm-gray); font-size:15px; line-height:1.7; }
.fm-project-card__desc p{ margin:0 0 1em 0; }
.fm-project-card__link{ display:inline-block; margin-top:14px; font-family:'FM Body'; font-weight:600; font-size:14px; color:var(--gold); }
.fm-project-card__link:hover{ text-decoration:underline; }

/* ==========================================================================
   About page
   ========================================================================== */
.about-features{ display:flex; flex-wrap:wrap; gap:16px; margin-top:10px; list-style:none; padding:0; }
.about-features li{ flex:1 1 220px; background:var(--charcoal); border:1px solid var(--border-gold); border-radius:10px; padding:16px 18px; font-size:14px; color:var(--ivory); margin:0; }
.about-features li b{ color:var(--gold); display:block; font-family:'FM Mono'; font-size:11px; letter-spacing:1px; margin-bottom:6px; text-transform:uppercase; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid{ display:flex; gap:60px; flex-wrap:wrap; }
.contact-form{ flex:1 1 420px; max-width:560px; }
.contact-offices{ flex:1 1 300px; }
.field{ margin-bottom:20px; }
.field label{ display:block; font-family:'FM Mono'; font-size:11.5px; letter-spacing:1px; text-transform:uppercase; color:var(--gold); margin-bottom:8px; }
.field input, .field textarea{
	width:100%; background:var(--charcoal); border:1px solid var(--border-gold); border-radius:7px;
	padding:13px 15px; color:var(--ivory); font-family:'FM Body'; font-size:15px;
}
.field textarea{ min-height:130px; resize:vertical; }
.field input:focus, .field textarea:focus{ outline:2px solid var(--gold); outline-offset:1px; }
.form-notice{ padding:14px 18px; border-radius:7px; margin-bottom:22px; font-size:14px; }
.form-notice.success{ background:rgba(201,162,39,0.15); border:1px solid var(--gold); color:var(--gold); }
.form-notice.error{ background:rgba(201,80,80,0.12); border:1px solid #C05050; color:#E08080; }

.office-card{ border-top:1px solid var(--border-gold); padding:20px 0; }
.office-card:first-child{ border-top:none; padding-top:0; }
.office-card h4{ font-family:'FM Body'; font-weight:600; font-size:14px; color:var(--gold); letter-spacing:1px; text-transform:uppercase; margin-bottom:10px; }
.office-card p{ font-family:'FM Body'; font-size:14px; color:var(--warm-gray); line-height:1.7; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{ background:var(--black); padding:60px 0 0 0; margin-top:20px; border-top:1px solid var(--border-gold); }
.foot-top{ display:flex; gap:50px; flex-wrap:wrap; padding-bottom:44px; }
.foot-brand{ flex:1 1 260px; max-width:320px; }
.foot-brand .site-logo{ color:var(--ivory); }
.foot-desc{ font-size:14px; color:var(--warm-gray-dim); line-height:1.65; margin:16px 0 20px 0; }
.foot-social{ display:flex; gap:12px; }
.foot-social a{ font-family:'FM Mono'; font-size:12px; color:var(--gold); border:1px solid var(--border-gold); border-radius:6px; padding:7px 12px; }
.foot-office{ flex:1 1 160px; }
.foot-office h4{ font-family:'FM Body'; font-weight:600; font-size:13px; color:var(--gold); letter-spacing:1px; margin-bottom:12px; text-transform:uppercase; }
.foot-office p{ font-family:'FM Body'; font-size:13.5px; color:var(--warm-gray-dim); line-height:1.7; }
.foot-bottom{ border-top:1px solid var(--border-gold); padding:22px 0; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-family:'FM Mono'; font-size:12px; color:var(--warm-gray-dim); }
.foot-bottom a{ color:var(--warm-gray-dim); }
.foot-bottom a:hover{ color:var(--gold); }
.powered-by a{ color:var(--gold); }

/* ==========================================================================
   404
   ========================================================================== */
.error-404{ padding:110px 0; text-align:center; }
.error-404 h1{ font-size:64px; color:var(--gold); margin-bottom:18px; }

/* ==========================================================================
   Utility
   ========================================================================== */
.screen-reader-text{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); }
