/*
Theme Name: Raj Academy
Author: Raj Academy
Description: Responsive WordPress theme for Raj Academy, an engineering and computer education coaching institute in Ambawadi, Ahmedabad. Includes a custom homepage, course pages, blog, enquiry form with lead storage, WhatsApp integration and local SEO schema.
Version: 1.0.0
Requires at least: 6.3
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: raj-academy
*/

:root {
	--navy: #172554;
	--navy-deep: #0f1a3d;
	--orange: #F28C28;
	--orange-dark: #d9741a;
	--white: #FFFFFF;
	--grey: #F1F5F9;
	--text: #334155;
	--line: #dde4ee;
	--f-head: 'League Spartan', 'Montserrat', system-ui, sans-serif;
	--f-sub: 'Montserrat', system-ui, sans-serif;
	--f-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--f-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--text);
	background: var(--white);
}
img, svg, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--orange-dark); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

h1, h2 { font-family: var(--f-head); font-weight: 700; color: var(--navy); margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.12; }
h3, h4 { font-family: var(--f-sub); font-weight: 600; color: var(--navy); margin: 0 0 .5em; line-height: 1.3; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; max-width: 68ch; }

.container { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

.icon { flex: none; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
	font-family: var(--f-sub); font-weight: 600; font-size: .95rem; line-height: 1.2;
	padding: .85rem 1.5rem; border-radius: 8px; border: 2px solid transparent;
	text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--orange); color: var(--navy); }
.btn--primary:hover { background: var(--orange-dark); color: var(--navy); }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--light { border-color: rgba(255, 255, 255, .55); color: #fff; background: transparent; }
.btn--light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn--sm { padding: .6rem 1.1rem; font-size: .875rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand__mark { width: 44px; height: 44px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--f-head); font-weight: 700; font-size: 1.6rem; color: var(--navy); }
.brand__sub { font-family: var(--f-sub); font-weight: 600; font-size: .72rem; color: var(--text); margin-top: .2rem; }
.custom-logo { max-height: 56px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 1.5rem; }
.primary-nav ul { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.primary-nav li a {
	font-family: var(--f-sub); font-weight: 600; font-size: .9rem; color: var(--navy);
	text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent;
}
.primary-nav li a:hover,
.primary-nav li.current-menu-item > a,
.primary-nav li.current-menu-ancestor > a,
.primary-nav li.current_page_item > a { border-bottom-color: var(--orange); color: var(--navy); }

.nav-toggle { display: none; align-items: center; justify-content: center; width: 46px; height: 46px; background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 22px; height: 2px; background: var(--navy); content: ''; position: relative; transition: transform .2s, opacity .2s; }
.nav-toggle__bars::before { position: absolute; top: -7px; }
.nav-toggle__bars::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.5rem; }
	.primary-nav.is-open { display: flex; }
	.primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.primary-nav li a { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); }
	.primary-nav .btn { margin-top: 1.1rem; }
}

/* Hero */
.hero {
	background-color: var(--navy);
	background-image:
		linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
	background-size: 36px 36px;
	color: #e4e9f5;
	padding: clamp(3rem, 8vw, 6rem) 0;
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { color: #fff; max-width: 14ch; }
.hero__lead { font-size: 1.125rem; max-width: 52ch; color: #dbe2f3; }
.hero__points { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: .55rem; font-size: .95rem; }
.hero__points li { display: flex; align-items: center; gap: .6rem; }
.hero__points .icon { color: var(--orange); }
.hero .btn-row { margin-top: 2rem; }

.hero__panel {
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 16px;
	padding: 1.5rem 1.5rem 1rem;
}
.hero__panel-title { font-family: var(--f-sub); font-weight: 600; font-size: .95rem; color: #fff; margin: 0 0 .75rem; }
.hero__problem { font-size: 1.05rem; color: #fff; margin: 0 0 .25rem; }
.hero__steps { margin: 0 0 .75rem; font-size: 1.05rem; color: #cfd8ee; line-height: 1.8; }
.hero__steps span { display: block; }
.hero__graph { display: block; width: 100%; height: auto; }
.hero__line { stroke-dasharray: 310; stroke-dashoffset: 310; animation: draw 1.4s ease-out .4s forwards; }
.hero__area { opacity: 0; animation: fillin .8s ease-out 1.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { opacity: 1; } }
@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero h1 { max-width: none; }
}

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--grey { background: var(--grey); }
.section--navy { background: var(--navy); color: #dbe2f3; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section__head { max-width: 62ch; margin-bottom: 2.25rem; }
.section__head p { margin-bottom: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.facts li { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.facts .icon { color: var(--navy); margin-top: .15rem; }
.facts strong { display: block; font-family: var(--f-sub); color: var(--navy); font-size: .98rem; }
.facts span { font-size: .93rem; }

/* Cards */
.grid { display: grid; gap: 1.25rem; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--usp { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
	display: flex; flex-direction: column; background: var(--white);
	border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem;
	transition: border-color .2s;
}
.card:hover { border-color: var(--orange); }
.card__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 10px; background: var(--navy); color: var(--orange); margin-bottom: 1rem; }
.card h3 { margin-bottom: .4rem; }
.card h3 a { text-decoration: none; }
.card p { font-size: .95rem; margin-bottom: 1rem; }
.card__link { margin-top: auto; font-family: var(--f-sub); font-weight: 600; font-size: .9rem; }

.usp { padding: 1.25rem 0; border-top: 3px solid var(--navy); }
.usp .icon { color: var(--orange-dark); margin-bottom: .6rem; }
.usp h3 { margin-bottom: .3rem; }
.usp p { font-size: .94rem; margin: 0; }

.subjects { margin-top: 3rem; }
.subjects h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.grid--tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: .35rem; padding: 1.25rem; background: var(--grey); border-radius: 12px; text-decoration: none; color: var(--text); }
.tile:hover { background: #e6ecf5; color: var(--text); }
.tile .icon { color: var(--navy); }
.tile strong { font-family: var(--f-sub); color: var(--navy); }
.tile span { font-size: .9rem; }

/* Benefits */
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.benefits li { display: flex; gap: .9rem; }
.benefits .icon { color: var(--orange); margin-top: .2rem; }
.benefits strong { display: block; color: #fff; font-family: var(--f-sub); }

/* Testimonials */
.quote { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; margin: 0; }
.quote p { font-size: 1.02rem; }
.quote footer { font-family: var(--f-sub); font-weight: 600; color: var(--navy); font-size: .9rem; }
.quote footer span { display: block; font-family: var(--f-body); font-weight: 400; color: var(--text); }
.admin-hint { padding: 1rem 1.25rem; border: 2px dashed var(--line); border-radius: 10px; font-size: .92rem; }

/* CTA band */
.cta { background: var(--navy); color: #dbe2f3; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.cta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.cta h2 { color: #fff; }
.cta .btn-row { margin-top: 1.25rem; }
.cta__form { background: var(--white); color: var(--text); border-radius: 14px; padding: 1.5rem; }
.cta__form h3 { margin-bottom: 1rem; }
@media (max-width: 800px) { .cta__grid { grid-template-columns: 1fr; } }

/* FAQ */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
	list-style: none; cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
	font-family: var(--f-sub); font-weight: 600; font-size: 1rem; color: var(--navy);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--orange-dark); transition: transform .2s; }
details[open] > summary::after { transform: translateY(-50%) rotate(45deg); }
details > p, details > div { padding-bottom: 1.1rem; margin-bottom: 0; }
.faq-list { max-width: 820px; }

/* Contact info cards */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.info { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.info .icon { color: var(--navy); margin-bottom: .6rem; }
.info h3 { margin-bottom: .35rem; }
.info p { margin: 0; font-size: .95rem; }
.info a { font-weight: 600; }

/* Forms */
.enquiry-form .field { margin: 0 0 1rem; }
.enquiry-form label { display: block; font-family: var(--f-sub); font-weight: 600; font-size: .85rem; color: var(--navy); margin-bottom: .35rem; }
.enquiry-form input[type="text"], .enquiry-form input[type="tel"], .enquiry-form select, .enquiry-form textarea {
	width: 100%; font: inherit; color: var(--text); background: #fff;
	border: 1px solid #b6c2d4; border-radius: 8px; padding: .75rem .9rem;
}
.enquiry-form textarea { min-height: 120px; resize: vertical; }
.enquiry-form input:focus, .enquiry-form select:focus, .enquiry-form textarea:focus { border-color: var(--navy); outline: 3px solid rgba(242, 140, 40, .45); outline-offset: 0; }
.field--hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-note { font-size: .82rem; margin: .85rem 0 0; }
.notice { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1.25rem; font-size: .95rem; }
.notice--ok { background: #e9f6ee; border: 1px solid #9fd3b2; color: #14532d; }
.notice--error { background: #fdecec; border: 1px solid #f1aaaa; color: #7f1d1d; }
.notice a { font-weight: 600; }

.contact-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-form-box { background: var(--grey); border-radius: 14px; padding: clamp(1.25rem, 3vw, 2rem); }
.contact-side { display: grid; gap: 1rem; }
.map { margin-top: 2.5rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }

/* Page header */
.page-head { background: var(--grey); padding: clamp(2.25rem, 5vw, 3.75rem) 0; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .35rem; }
.page-head p { margin: 0; max-width: 62ch; }
.crumbs { font-family: var(--f-sub); font-size: .82rem; margin-bottom: .9rem; }
.crumbs a { font-weight: 600; }

/* Entry content */
.entry { max-width: 760px; }
.entry h2 { font-size: 1.6rem; margin-top: 2rem; }
.entry h3 { font-size: 1.2rem; margin-top: 1.5rem; }
.entry ul, .entry ol { padding-left: 1.25rem; margin: 0 0 1.25em; max-width: 68ch; }
.entry li { margin-bottom: .4rem; }
.entry img { border-radius: 10px; }
.entry details p { max-width: none; }

/* Course page */
.course-layout { display: grid; grid-template-columns: 1fr 340px; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.course-main section { margin-bottom: 2.5rem; }
.course-main h2 { font-size: 1.6rem; }
.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.tick-list li { display: flex; gap: .7rem; max-width: 68ch; }
.tick-list .icon { color: var(--orange-dark); margin-top: .22rem; }
.course-aside { position: sticky; top: 100px; background: var(--grey); border-radius: 14px; padding: 1.5rem; }
.course-aside h2 { font-size: 1.35rem; }
.course-aside .btn-row { margin-top: 1rem; }
.course-aside .btn { width: 100%; }
.note { font-size: .9rem; padding: .9rem 1.1rem; background: var(--grey); border-radius: 10px; }
@media (max-width: 900px) { .course-layout { grid-template-columns: 1fr; } .course-aside { position: static; } }

/* Blog */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip { font-family: var(--f-sub); font-weight: 600; font-size: .85rem; padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--navy); background: #fff; }
.chip:hover, .chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; transition: border-color .2s; }
.post-card:hover { border-color: var(--orange); }
.post-card__media { display: block; aspect-ratio: 16 / 10; background: var(--navy); }
.post-card__media img, .post-card__media svg { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.post-card__body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-family: var(--f-sub); font-weight: 600; font-size: .78rem; color: var(--orange-dark); margin-bottom: .4rem; }
.post-card h3 { font-size: 1.1rem; }
.post-card h3 a { text-decoration: none; }
.post-card p { font-size: .93rem; margin-bottom: 1rem; }
.post-card .card__link { margin-top: auto; }
.grid--posts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post-hero-img { margin: 0 0 2rem; border-radius: 12px; overflow: hidden; }
.post-meta { font-family: var(--f-sub); font-size: .85rem; font-weight: 600; margin-bottom: .6rem; }
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.pagination .page-numbers { padding: .5rem .95rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-family: var(--f-sub); font-weight: 600; font-size: .9rem; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Footer */
.site-footer { background: var(--navy-deep); color: #c3cde4; padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--orange); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2rem; }
.footer-grid h2 { font-family: var(--f-sub); font-weight: 600; font-size: 1rem; letter-spacing: 0; color: #fff; margin-bottom: .9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-grid a { text-decoration: none; }
.footer-brand .brand__name, .footer-brand .brand__sub { color: #fff; }
.footer-brand p { margin-top: 1rem; font-size: .92rem; }
.footer-contact li { display: flex; gap: .65rem; }
.footer-contact .icon { color: var(--orange); margin-top: .25rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 2.5rem; padding-top: 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; font-size: .85rem; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.25rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.wa-float {
	position: fixed; right: 1rem; bottom: 1rem; z-index: 60; width: 54px; height: 54px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--orange); color: var(--navy); box-shadow: 0 4px 14px rgba(15, 26, 61, .35);
}
.wa-float:hover { background: var(--orange-dark); color: var(--navy); }

.not-found { text-align: left; padding: clamp(3rem, 8vw, 6rem) 0; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.hero__line { stroke-dashoffset: 0; }
	.hero__area { opacity: 1; }
}
