/*
Theme Name: RIMH Redesign
Theme URI: https://rimh.in/
Author: Affan Hamid
Author URI: https://example.com
Description: A modern, mobile-first redesign for Rahate's IIT & Medical Home (RIMH), Nagpur. Navy & saffron palette, icon-led (no stock people photos), built to win parents' trust for IIT-JEE / NEET coaching. Content based on rimh.in.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coaching-institute
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  --navy:        #1a2e5a;
  --navy-dark:   #112042;
  --navy-light:  #24407a;
  --saffron:     #f5a623;
  --saffron-dark:#dd9112;
  --whatsapp:    #25d366;
  --whatsapp-dark:#1eb858;

  --ink:    #1a2233;
  --muted:  #5a6472;
  --line:   #e3e9f2;
  --bg:     #f4f7fb;
  --white:  #ffffff;

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 10px 30px rgba(26, 46, 90, 0.08);
  --shadow-lg: 0 18px 50px rgba(26, 46, 90, 0.16);
  --container: 1160px;
  --gap:       28px;

  --ff-head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --ff-body: "Open Sans", "Segoe UI", system-ui, sans-serif;
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--ff-head); color: var(--navy); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--navy-light); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--saffron-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.text-center { text-align: center; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--ff-head); font-weight: 600; font-size: 16px;
  padding: 15px 30px; border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  text-align: center; line-height: 1.1;
}
.btn:hover { transform: translateY(-2px); }
.btn svg, .btn .ico { width: 20px; height: 20px; flex: 0 0 auto; }

.btn-primary { background: var(--saffron); color: #2a1c00; border-color: var(--saffron); }
.btn-primary:hover { background: var(--saffron-dark); border-color: var(--saffron-dark); color: #2a1c00; }

.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.65); }
.btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-dark); color: var(--white); }

.btn-whatsapp { background: var(--whatsapp); color: var(--white); border-color: var(--whatsapp); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); color: var(--white); border-color: var(--whatsapp-dark); }

.btn-call { background: transparent; color: var(--white); border-color: rgba(255,255,255,.8); }
.btn-call:hover { background: var(--white); color: var(--saffron-dark); }

.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 17px 36px; font-size: 17px; }

/* ==========================================================================
   4. Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(26,46,90,.10); }
/* Offset the sticky header below the WordPress admin bar (logged-in users only).
   Desktop (>782px): admin bar is fixed at 32px. Mobile (<=782px): it is absolute and scrolls away, so top:0. */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo img { max-height: 48px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--ff-head); font-weight: 700; font-size: 20px; color: var(--navy); }
.brand-tag { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--saffron-dark); font-weight: 600; }

.main-nav ul { display: flex; align-items: center; gap: 6px; }
.main-nav ul a {
  display: block; padding: 10px 14px; font-family: var(--ff-head); font-weight: 500;
  font-size: 15px; color: var(--ink); border-radius: 8px;
}
.main-nav ul a:hover, .main-nav ul .current-menu-item > a { color: var(--navy); background: var(--bg); }
.header-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 10px; cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile-cta { display: none; }

/* ==========================================================================
   5. Section headings
   ========================================================================== */
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.eyebrow {
  font-family: var(--ff-head); font-weight: 600; font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--saffron-dark); display: block; margin-bottom: 10px;
}
.section-title { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; }
.section-sub { color: var(--muted); font-size: 17px; margin: 0; }
.on-dark .section-title, .on-dark .eyebrow ~ .section-title { color: var(--white); }
.on-dark .eyebrow { color: var(--saffron); }
.on-dark .section-sub { color: #c8d3e6; }

/* ==========================================================================
   6. Hero
   ========================================================================== */
.hero {
  position: relative; color: var(--white);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 96px 0 104px; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(245,166,35,.22), transparent 70%); border-radius: 50%;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; text-align: center; }
.hero-badge {
  display: inline-block; font-family: var(--ff-head); font-weight: 600; font-size: 13px;
  letter-spacing: 2px; text-transform: uppercase; color: #ffcf8a;
  background: rgba(245,166,35,.12); border: 1px solid rgba(245,166,35,.35);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { color: var(--white); font-size: clamp(32px, 5.2vw, 54px); margin: 0 0 18px; }
.hero .lead { font-size: clamp(16px, 2vw, 19px); color: #d8e1ee; margin: 0 auto 32px; max-width: 620px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   7. Trust bar (counters)
   ========================================================================== */
.trust-bar { background: var(--white); padding: 44px 0; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); text-align: center; }
.stat .stat-num {
  font-family: var(--ff-head); font-weight: 700; font-size: clamp(32px, 4vw, 44px);
  color: var(--navy); line-height: 1;
}
.stat .stat-num .suffix { color: var(--saffron); }
.stat .stat-label { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; }

/* ==========================================================================
   8. Cards (courses, generic)
   ========================================================================== */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(245,166,35,.14); color: var(--saffron-dark); margin-bottom: 20px;
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 21px; margin: 0 0 10px; }
.card p { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.card .card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  font-size: 12px; font-weight: 600; font-family: var(--ff-head);
  color: var(--navy); background: var(--bg); padding: 5px 12px; border-radius: 999px;
}
.card-link { font-family: var(--ff-head); font-weight: 600; color: var(--navy); font-size: 15px; }
.card-link:hover { color: var(--saffron-dark); }

/* ==========================================================================
   9. Toppers / Results (dark)
   ========================================================================== */
.section-dark { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); color: var(--white); }
.topper-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.topper-card {
  background: var(--white); border-radius: var(--radius); padding: 30px 26px; text-align: center;
  box-shadow: var(--shadow);
}
.topper-badge {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(245,166,35,.16); color: var(--saffron-dark);
}
.topper-badge svg { width: 26px; height: 26px; }
.topper-card h3 { font-size: 20px; margin: 0 0 4px; }
.topper-rank { color: var(--saffron-dark); font-family: var(--ff-head); font-weight: 600; font-size: 15px; margin: 0 0 6px; }
.topper-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ==========================================================================
   10. Testimonials
   ========================================================================== */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.testi-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; height: 100%; }
.stars { color: var(--saffron); letter-spacing: 2px; font-size: 18px; margin-bottom: 14px; }
.stars .empty { color: #d7ddea; }
.testi-quote { color: var(--ink); font-size: 15px; line-height: 1.75; margin: 0 0 22px; }
.testi-person { display: flex; align-items: center; gap: 14px; }
.avatar {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  background: var(--navy); color: var(--white); display: grid; place-items: center;
  font-family: var(--ff-head); font-weight: 700; font-size: 18px; letter-spacing: .5px;
}
.testi-person .name { font-family: var(--ff-head); font-weight: 600; color: var(--navy); font-size: 16px; }
.testi-person .role { color: var(--muted); font-size: 13px; }

/* ==========================================================================
   11. Enquiry (orange)
   ========================================================================== */
.enquiry { background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron-dark) 100%); color: #2a1c00; }
.enquiry-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.enquiry h2 { color: #2a1c00; font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 12px; }
.enquiry .enquiry-lead { color: #4a3408; font-size: 17px; margin: 0 0 22px; }
.enquiry-contacts { display: flex; flex-direction: column; gap: 10px; font-family: var(--ff-head); font-weight: 600; }
.enquiry-contacts a { color: #2a1c00; display: inline-flex; align-items: center; gap: 10px; }
.enquiry-contacts svg { width: 20px; height: 20px; }
.enquiry-card { background: var(--white); border-radius: var(--radius); padding: 32px 30px; box-shadow: var(--shadow-lg); text-align: center; }
.enquiry-card h3 { font-size: 23px; margin: 0 0 6px; }
.enquiry-card p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.enquiry-card .btn { margin-bottom: 12px; }
.enquiry-card .btn:last-child { margin-bottom: 0; }

/* ==========================================================================
   12. Page header (interior pages)
   ========================================================================== */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); color: var(--white);
  padding: 72px 0; text-align: center;
}
.page-hero h1 { color: var(--white); font-size: clamp(30px, 4.5vw, 46px); margin: 0 0 10px; }
.page-hero p { color: #d8e1ee; font-size: 18px; max-width: 640px; margin: 0 auto; }
.breadcrumb { font-size: 13px; color: #b9c5dc; margin-bottom: 14px; letter-spacing: .5px; }
.breadcrumb a { color: #ffcf8a; }

/* ==========================================================================
   13. Faculty
   ========================================================================== */
.faculty-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.faculty-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-align: center; }
.faculty-photo { aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--navy-light), var(--navy)); display: grid; place-items: center; }
.faculty-photo .avatar-lg { width: 92px; height: 92px; font-size: 30px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; font-family: var(--ff-head); font-weight: 700; border: 2px solid rgba(255,255,255,.3); }
.faculty-card .body { padding: 20px 18px 24px; }
.faculty-card h3 { font-size: 18px; margin: 0 0 2px; }
.faculty-role { color: var(--saffron-dark); font-family: var(--ff-head); font-weight: 600; font-size: 14px; margin: 0 0 8px; }
.faculty-card p { color: var(--muted); font-size: 13px; margin: 0; }

/* ==========================================================================
   14. Content / generic pages
   ========================================================================== */
.content-narrow { max-width: 760px; margin: 0 auto; }
.entry-content h2 { font-size: 28px; margin-top: 1.6em; }
.entry-content h3 { font-size: 22px; margin-top: 1.4em; }
.entry-content ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1rem; }
.entry-content ul li { margin-bottom: .4em; }
.value-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); margin-top: 8px; }
.value-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.value-card .card-icon { margin-bottom: 16px; }
.value-card h3 { font-size: 19px; }
.value-card p { color: var(--muted); font-size: 15px; margin: 0; }

/* ==========================================================================
   15. Footer
   ========================================================================== */
.site-footer { background: var(--navy-dark); color: #c8d3e6; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.site-footer h4 { color: var(--white); font-size: 16px; letter-spacing: .5px; margin: 0 0 16px; }
.site-footer p { font-size: 14px; color: #aeb9d1; }
.footer-brand .brand-name { color: var(--white); font-size: 22px; }
.footer-links a { display: block; color: #c8d3e6; font-size: 14px; padding: 5px 0; }
.footer-links a:hover { color: var(--saffron); }
.footer-contact li { display: flex; gap: 10px; font-size: 14px; margin-bottom: 10px; }
.footer-contact svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--saffron); margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; text-align: center; font-size: 13px; color: #92a0bd; }

/* Enquiry form */
.ci-form { margin-top: 6px; text-align: left; }
.ci-field { display: block; margin-bottom: 16px; }
.ci-field span { display: block; font-family: var(--ff-head); font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 6px; }
.ci-field input, .ci-field select, .ci-field textarea {
  width: 100%; font-family: var(--ff-body); font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ci-field input:focus, .ci-field select:focus, .ci-field textarea:focus {
  outline: 0; border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(245,166,35,.18);
}
.ci-field textarea { resize: vertical; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; background: var(--whatsapp);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37,211,102,.45);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; color: #fff; }

/* ==========================================================================
   16. Counter animation helper
   ========================================================================== */
.stat-num[data-count] { opacity: 0; transition: opacity .4s ease; }
.stat-num[data-count].counted { opacity: 1; }

/* ==========================================================================
   17. Responsive
   ========================================================================== */
@media (max-width: 992px) {
  .faculty-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid, .topper-grid, .testi-grid, .value-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .enquiry-grid { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 56px 0; }
}
@media (max-width: 840px) {
  .header-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--white);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .main-nav.is-open { max-height: 70vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; }
  .main-nav ul a { padding: 14px 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-mobile-cta { display: block; padding: 16px; }
}
@media (max-width: 760px) {
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 30px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .cards-grid, .topper-grid, .testi-grid, .value-grid { grid-template-columns: 1fr; gap: 18px; }
  .card, .value-card { padding: 26px 22px; }
  .card-icon { width: 52px; height: 52px; margin-bottom: 16px; }
  .card h3 { font-size: 20px; }
  .testi-card, .topper-card { padding: 24px 22px; }
  .page-hero { padding: 48px 0; }
  .hero { padding: 56px 0 64px; }
  .hero-badge { margin-bottom: 16px; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn { width: 100%; }
  .enquiry-grid { gap: 24px; }
  .enquiry-card { padding: 26px 22px; }
  /* tame the big inline top-margins on the "view all" buttons */
  .section .text-center[style] { margin-top: 28px !important; }
}
@media (max-width: 560px) {
  .faculty-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .faculty-photo { aspect-ratio: auto; height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
