/*
Theme Name: R R Agency
Theme URI: https://example.invalid/rr-agency
Author: Prepared for R R Agency, Siliguri
Description: Lightweight block theme for R R Agency, a wholesale paper-lottery stockist at Bidhan Market Road, Siliguri. Informational and trade-enquiry website only: no ticket sales, no payments, no hosted results. On activation it creates the pages, menu and settings screen.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rr-agency
*/

/* ---------- Base ---------- */
:root {
	--rra-navy: #0f2a4a;
	--rra-navy-2: #16375e;
	--rra-red: #a3232b;
	--rra-gold: #b08a3e;
	--rra-gold-text: #7d5f1f;
	--rra-ink: #1b2430;
	--rra-muted: #4f5b69;
	--rra-line: #dfe3e8;
	--rra-paper: #f6f4ef;
	--rra-radius: 6px;
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
:where(a):focus-visible, :where(button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--rra-gold);
	outline-offset: 2px;
}

/* ---------- Header ---------- */
.rra-topbar { font-size: 0.8125rem; letter-spacing: 0.01em; }
.rra-topbar a { color: inherit; text-decoration: none; }
.rra-topbar a:hover { text-decoration: underline; }
.rra-header { border-bottom: 1px solid var(--rra-line); }
.rra-brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--rra-navy); }
.rra-brand svg { width: 46px; height: 46px; flex: none; }
.rra-brand__name { font-family: var(--wp--preset--font-family--heading); font-size: 1.35rem; font-weight: 700; line-height: 1.1; letter-spacing: 0.02em; }
.rra-brand__tag { display: block; font-family: var(--wp--preset--font-family--body); font-size: 0.72rem; font-weight: 500; color: var(--rra-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 3px; }
.rra-header .wp-block-navigation a { text-decoration: none; }
.rra-header .wp-block-navigation a:hover { color: var(--rra-red); }
.rra-header .wp-block-navigation .current-menu-item > a { color: var(--rra-red); }

/* ---------- Hero ---------- */
.rra-hero { position: relative; overflow: hidden; }
.rra-hero::after {
	content: ""; position: absolute; inset: auto -10% -1px -10%; height: 6px;
	background: linear-gradient(90deg, var(--rra-red) 0 50%, var(--rra-gold) 50% 100%);
}
.rra-hero__grid { background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px); background-size: 22px 22px; }
.rra-years { font-family: var(--wp--preset--font-family--heading); font-size: clamp(4.5rem, 14vw, 7.5rem); line-height: 0.9; color: var(--rra-gold); font-weight: 700; margin: 0; }
.rra-eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 700; }

/* ---------- Cards / sections ---------- */
.rra-card { border: 1px solid var(--rra-line); border-radius: var(--rra-radius); background: #fff; }
.rra-card--rule { border-top: 3px solid var(--rra-navy); }
.rra-card--warn { border-left: 4px solid var(--rra-red); background: #fff8f7; }
.rra-num { font-family: var(--wp--preset--font-family--heading); color: var(--rra-gold-text); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.1em; }
.rra-notice { border-left: 4px solid var(--rra-gold); background: var(--rra-paper); padding: 1rem 1.25rem; border-radius: 0 var(--rra-radius) var(--rra-radius) 0; }

/* Official links table */
.rra-links { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.rra-links th, .rra-links td { text-align: left; padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--rra-line); vertical-align: top; }
.rra-links th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rra-muted); }
.rra-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.15rem 0.45rem; border-radius: 3px; white-space: nowrap; }
.rra-badge--gov { background: #e6eef7; color: var(--rra-navy); }
.rra-badge--state { background: #f3ecdc; color: var(--rra-gold-text); }
.rra-badge--law { background: #eef0f2; color: var(--rra-ink); }
@media (max-width: 640px) {
	.rra-links thead { display: none; }
	.rra-links tr { display: block; border-bottom: 1px solid var(--rra-line); padding: 0.6rem 0; }
	.rra-links td { display: block; border: 0; padding: 0.2rem 0; }
}

/* Draw schedule */
.rra-draws { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.rra-draw { border: 1px solid var(--rra-line); border-radius: var(--rra-radius); padding: 1.1rem 1.2rem; background: #fff; }
.rra-draw__time { font-family: var(--wp--preset--font-family--heading); font-size: 1.9rem; color: var(--rra-navy); font-weight: 700; line-height: 1; }
.rra-draw__state { font-size: 0.85rem; color: var(--rra-muted); margin-top: 0.35rem; }
.rra-draw a { font-size: 0.9rem; font-weight: 600; }

/* FAQ */
.rra-faq details { border-bottom: 1px solid var(--rra-line); padding: 0.4rem 0; }
.rra-faq summary { cursor: pointer; font-weight: 600; padding: 0.75rem 2rem 0.75rem 0; list-style: none; position: relative; color: var(--rra-navy); }
.rra-faq summary::-webkit-details-marker { display: none; }
.rra-faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.6rem; font-size: 1.3rem; color: var(--rra-gold-text); }
.rra-faq details[open] summary::after { content: "–"; }
.rra-faq details > :not(summary) { margin: 0 0 1rem; color: var(--rra-ink); }

/* Contact card */
.rra-contact { list-style: none; margin: 0; padding: 0; }
.rra-contact li { display: flex; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rra-line); }
.rra-contact li:last-child { border-bottom: 0; }
.rra-contact__label { flex: 0 0 6.5rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rra-muted); padding-top: 0.15rem; }
.rra-contact a { font-weight: 600; }
.rra-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.rra-btn { display: inline-block; padding: 0.7rem 1.15rem; border-radius: var(--rra-radius); font-weight: 600; text-decoration: none; border: 2px solid var(--rra-navy); color: var(--rra-navy); background: #fff; line-height: 1.2; }
.rra-btn:hover { background: var(--rra-navy); color: #fff; }
.rra-btn--solid { background: var(--rra-navy); color: #fff; }
.rra-btn--solid:hover { background: var(--rra-navy-2); }
.rra-map iframe { width: 100%; min-height: 320px; border: 0; border-radius: var(--rra-radius); }
.rra-admin-flag { display: inline-block; background: #fff4d6; color: #6b4e00; border: 1px dashed #c99a1d; padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.85em; font-weight: 600; }

/* Enquiry form */
.rra-form { display: grid; gap: 1rem; }
.rra-form__row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .rra-form__row { grid-template-columns: 1fr 1fr; } }
.rra-field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; color: var(--rra-navy); }
.rra-field .rra-req { color: var(--rra-red); }
.rra-field .rra-hint { display: block; font-size: 0.8rem; color: var(--rra-muted); margin-top: 0.3rem; font-weight: 400; }
.rra-field input, .rra-field select, .rra-field textarea {
	width: 100%; box-sizing: border-box; padding: 0.75rem 0.8rem; font: inherit; font-size: 1rem;
	border: 1px solid #b9c1cb; border-radius: var(--rra-radius); background: #fff; color: var(--rra-ink);
}
.rra-field textarea { min-height: 140px; resize: vertical; }
.rra-field input:focus, .rra-field select:focus, .rra-field textarea:focus { border-color: var(--rra-navy); outline: 3px solid rgba(176,138,62,0.45); outline-offset: 0; }
.rra-check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; }
.rra-check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex: none; }
.rra-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.rra-form button { justify-self: start; cursor: pointer; font: inherit; font-weight: 700; padding: 0.85rem 1.6rem; border: 0; border-radius: var(--rra-radius); background: var(--rra-red); color: #fff; }
.rra-form button:hover { background: #861c23; }
.rra-alert { padding: 1rem 1.2rem; border-radius: var(--rra-radius); margin-bottom: 1.25rem; font-weight: 500; }
.rra-alert--ok { background: #e9f5ec; border: 1px solid #9ccfa9; color: #1d5a2c; }
.rra-alert--err { background: #fdecec; border: 1px solid #e6a3a3; color: #7a1d1d; }
.rra-alert ul { margin: 0.4rem 0 0 1.1rem; }

/* Card grids (layout lives here, not inline, so WordPress never strips it) */
.rra-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; margin: 1.5rem 0 0; }
.rra-grid--sm { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 2rem 0; }
.rra-grid--xs { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
a.rra-card--link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.rra-card--link:hover { border-color: var(--rra-gold); box-shadow: 0 2px 10px rgba(15,42,74,.08); }
a.rra-card--link h3 { color: var(--rra-navy); }

.rra-chain { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .5rem; }

/* Leadership portrait */
.rra-portrait { margin: 0; max-width: 420px; }
.rra-portrait img { display: block; width: 100%; height: auto; border-radius: var(--rra-radius); box-shadow: 0 10px 30px rgba(15,42,74,.18); }
.rra-portrait figcaption { margin-top: .85rem; padding-left: .85rem; border-left: 3px solid var(--rra-gold); line-height: 1.35; }
.rra-portrait figcaption strong { display: block; font-family: var(--wp--preset--font-family--heading); font-size: 1.15rem; color: var(--rra-navy); }
.rra-portrait figcaption span { display: block; font-size: .85rem; color: var(--rra-muted); margin-top: .2rem; }
.rra-portrait--small { max-width: 340px; }
.rra-founders { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.rra-founders li { border: 1px solid var(--rra-line); border-left: 3px solid var(--rra-navy); border-radius: var(--rra-radius); padding: .55rem .9rem; font-weight: 600; color: var(--rra-navy); background: #fff; }
@media (max-width: 781px) { .rra-portrait { margin: 0 auto; } }
.rra-on-dark .rra-portrait figcaption strong { color: #fff; }
.rra-on-dark .rra-portrait figcaption span { color: #c9d2de; }
.rra-on-dark .rra-portrait img { box-shadow: 0 10px 30px rgba(0,0,0,.35); }

/* Areas served */
.rra-areas { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem; }
.rra-areas li { border: 1px solid var(--rra-line); border-left: 3px solid var(--rra-gold); border-radius: var(--rra-radius); padding: 0.7rem 0.9rem; background: #fff; font-weight: 600; color: var(--rra-navy); }

/* Bengali text */
:lang(bn) { line-height: 1.8; }
:lang(bn) h1, :lang(bn) h2, :lang(bn) h3 { font-family: 'Noto Serif Bengali', 'Noto Sans Bengali', var(--wp--preset--font-family--body); line-height: 1.35; }

/* Social links */
.rra-social { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-top: 1rem; }
.rra-social__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rra-muted); }
.rra-social ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.rra-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rra-line); color: var(--rra-navy); background: #fff; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.rra-social a:hover, .rra-social a:focus-visible { background: var(--rra-navy); border-color: var(--rra-navy); color: #fff; }
.rra-footer .rra-social__label { color: #b9c4d2; }
.rra-footer .rra-social a { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.rra-footer .rra-social a:hover, .rra-footer .rra-social a:focus-visible { background: #fff; color: var(--rra-navy); border-color: #fff; }
@media (prefers-reduced-motion: reduce) { .rra-social a { transition: none; } }

/* Footer */
.rra-footer a { color: #fff; }
.rra-footer .rra-contact li { border-color: rgba(255,255,255,0.14); }
.rra-footer .rra-contact__label { color: #b9c4d2; }
.rra-footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.92rem; }
.rra-footer-links a { text-decoration: none; color: #e4e9f0; }
.rra-footer-links a:hover { text-decoration: underline; color: #fff; }
.rra-footer__legal { font-size: 0.8rem; line-height: 1.6; color: #b9c4d2; }
.rra-footer__fraud { background: rgba(163,35,43,0.22); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--rra-radius); padding: 0.9rem 1.1rem; font-size: 0.9rem; }

/* Print */
@media print {
	.rra-topbar, .wp-block-navigation, .rra-form, .rra-actions { display: none !important; }
}
