/*
Theme Name: Rakiz Orthopedic
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A clean, trustworthy homepage theme for an orthopedic surgeon's practice (arthroscopy & arthroplasty). Deep maroon & amber color scheme, hero section, doctor bio, treatment services grid, stats bar, video and blog sections, and a chamber/address block.
Version: 1.4.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: rakiz-orthopedic
*/

/* ===================== Base / Reset ===================== */
:root {
  --pc-teal: #7a1128;
  --pc-teal-dark: #4d0a1a;
  --pc-orange: #c9932b;
  --pc-orange-dark: #a97a1f;
  --pc-bg-light: #f7ecec;
  --pc-text: #2b2020;
  --pc-muted: #7a6363;
  --pc-white: #ffffff;
  --pc-tint: #f0d6db;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--pc-text);
  line-height: 1.6;
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 70px 0; }
.section-tight { padding: 50px 0; }
.center { text-align: center; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pc-teal); color: #fff; padding: 12px 22px;
  border-radius: 6px; font-weight: 600; border: none; cursor: pointer;
}
.btn:hover { background: var(--pc-teal-dark); color: #fff; }
.btn-icon-phone { color: var(--pc-orange); flex-shrink: 0; }
.btn-orange { background: var(--pc-orange); }
.btn-orange:hover { background: var(--pc-orange-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--pc-teal); color: var(--pc-teal); }
.btn-outline:hover { background: var(--pc-teal); color: #fff; }
:focus-visible { outline: 3px solid var(--pc-orange); outline-offset: 2px; }

/* ===================== Header / Nav ===================== */
.site-header { padding: 18px 0; border-bottom: 1px solid #f0e2e2; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-branding img.custom-logo { max-height: 50px; width: auto; }
.site-title { font-size: 1.3rem; color: var(--pc-teal); margin: 0; }
.site-title a { color: var(--pc-teal); }
.site-description { font-size: .75rem; color: var(--pc-muted); margin: 0; }
.main-navigation ul { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.main-navigation a { font-weight: 500; color: var(--pc-text); }
.main-navigation > ul > li > a { text-transform: uppercase; font-size: .92rem; letter-spacing: .03em; }
.main-navigation a:hover { color: var(--pc-orange); }
.main-navigation li { position: relative; }
.main-navigation .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 240px;
	background: #fff;
	box-shadow: 0 10px 24px rgba(0,0,0,.12);
	border-radius: 6px;
	padding: 14px 0 8px;
	margin-top: 0;
	flex-direction: column;
	gap: 0;
	z-index: 20;
}
/* Invisible bridge above the dropdown so the mouse never leaves the
   hoverable area while moving from the parent link down into the
   sub-menu -- without this, the gap between them closes the menu
   before a click can register. */
.main-navigation .sub-menu::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 0;
	right: 0;
	height: 12px;
}
.main-navigation .sub-menu li { width: 100%; }
.main-navigation .sub-menu a { display: block; padding: 8px 18px; white-space: nowrap; }
.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu { display: flex; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--pc-teal); }

/* ===================== Hero ===================== */
.hero { background: linear-gradient(180deg,#fdfdfd,#f8efef); overflow: hidden; padding: 60px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
.eyebrow { color: var(--pc-orange); font-weight: 600; letter-spacing: .04em; margin-bottom: 6px; text-transform: uppercase; font-size: .82rem; }
.hero h1 { font-size: 2.5rem; line-height: 1.15; color: var(--pc-teal); margin-bottom: 6px; }
.hero h2 { font-size: 1.5rem; color: var(--pc-teal); margin-bottom: 18px; font-weight: 600; }
.hero p { color: var(--pc-muted); max-width: 460px; margin-bottom: 24px; }
.hero-img img { border-radius: 12px; }

/* ===================== Doctor intro ===================== */
.intro-grid { display: grid; grid-template-columns: 340px 1fr; gap: 50px; align-items: center; }
.intro-grid img { border-radius: 10px; }
.intro-grid h3 { font-size: 1.9rem; color: var(--pc-teal); margin: 4px 0 6px; }
.cred { color: var(--pc-muted); margin: 0 0 4px; }
.specialty-tag { color: var(--pc-orange); font-weight: 600; margin: 8px 0 4px; }
.intro-grid p.desc { margin: 14px 0 20px; max-width: 640px; }

/* ===================== Stats ===================== */
.stats { background: var(--pc-teal); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); text-align: center; }
.stats-grid .num { font-size: 2.6rem; font-weight: 700; }
.stats-grid .label { color: var(--pc-tint); margin-top: 4px; }

/* ===================== Personalised care ===================== */
.care-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.care-grid h3 { color: var(--pc-teal); font-size: 1.9rem; margin-bottom: 14px; }
.care-grid ul { padding-left: 18px; list-style: disc; color: var(--pc-text); }
.care-grid li { margin-bottom: 6px; }
.care-grid img { border-radius: 10px; }

/* ===================== Treatment services ===================== */
.services { background: var(--pc-bg-light); }
.services h2 { text-align: center; color: var(--pc-teal); font-size: 2rem; margin-bottom: 10px; }
.services > .container > p.intro-text { text-align: center; color: var(--pc-muted); max-width: 680px; margin: 0 auto 40px; }
.service-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.card img { width: 100%; height: 190px; object-fit: cover; }
.card-body { padding: 18px 20px 22px; text-align: center; }
.card-body h4 { color: var(--pc-teal); margin: 0 0 8px; font-size: 1.15rem; }
.card-body p { color: var(--pc-muted); font-size: .92rem; margin: 0; }

/* ===================== About page photo card ===================== */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 50px; align-items: start; }
.about-photo-card { position: sticky; top: 24px; }
.about-photo-frame { position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 16px 34px rgba(122,17,40,.18); border: 1px solid var(--pc-tint); }
.about-photo-frame img { width: 100%; height: auto; display: block; }
.about-photo-badge {
  position: absolute; left: 14px; bottom: 14px;
  background: var(--pc-teal); color: #fff; font-size: .78rem; font-weight: 600;
  padding: 7px 14px; border-radius: 30px; box-shadow: 0 6px 14px rgba(0,0,0,.2);
}
.about-photo-caption { text-align: center; margin-top: 16px; }
.about-photo-name { color: var(--pc-teal); font-weight: 700; font-size: 1.1rem; margin: 0 0 2px; }
.about-photo-role { color: var(--pc-muted); font-size: .85rem; margin: 0 0 14px; }
.about-photo-btn { width: 100%; justify-content: center; }
.about-content-wrap h1 { color: var(--pc-teal); }
.about-content h3 { color: var(--pc-teal); margin-top: 26px; }
.about-content ul { padding-left: 18px; list-style: disc; }
.about-content li { margin-bottom: 6px; }

/* ===================== CTA banner ===================== */
.cta { background: var(--pc-teal); color: #fff; }
.cta-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.cta h3 { font-size: 1.8rem; margin-bottom: 6px; }
.cta p { margin: 0; color: var(--pc-tint); }

/* ===================== Why choose ===================== */
.why-grid { display: grid; grid-template-columns: 380px 1fr; gap: 50px; align-items: center; }
.why-grid img { border-radius: 10px; }
.why-grid h3 { color: var(--pc-teal); font-size: 1.8rem; margin-bottom: 4px; }
.why-grid h4 { color: var(--pc-muted); font-weight: 500; margin-bottom: 14px; }
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: var(--pc-bg-light); border-radius: 8px; padding: 20px 24px; margin-top: 18px; }
.vm-grid h5 { color: var(--pc-teal); margin-bottom: 8px; }
.vm-grid ul { padding-left: 18px; list-style: disc; font-size: .93rem; }

/* ===================== Videos ===================== */
.video-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 26px; }
.video-thumb { position: relative; border-radius: 8px; overflow: hidden; }
.video-thumb img { width: 100%; height: 190px; object-fit: cover; }
.play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 54px; height: 54px; background: rgba(220,50,40,.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.play-icon::after { content: ""; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; margin-left: 3px; }

/* ===================== Blog section / archive / single ===================== */
.blogs { background: var(--pc-bg-light); }
.blogs h2 { text-align: center; color: var(--pc-teal); margin-bottom: 30px; }
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.blog-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.blog-card img { width: 100%; height: 180px; object-fit: cover; }
.blog-card .blog-body { padding: 16px 18px; }
.blog-card .blog-meta { color: var(--pc-muted); font-size: .82rem; margin: 6px 0 8px; }
.blog-card p { font-size: .9rem; margin: 0; }
.blog-card h3 { font-size: 1.05rem; color: var(--pc-teal); }

.single-post-content, .page-content-wrap { max-width: 780px; margin: 0 auto; }
.single-post-content h1, .page-content-wrap h1 { color: var(--pc-teal); font-size: 2rem; margin-bottom: 16px; }
.single-post-content .post-meta { color: var(--pc-muted); font-size: .9rem; margin-bottom: 24px; }
.single-post-content img, .page-content-wrap img { border-radius: 8px; margin: 20px 0; }

/* ---- Rich content typography (service pages, posts) ---- */
.page-content h2, .post-content h2 { color: var(--pc-teal); font-size: 1.4rem; margin: 34px 0 14px; }
.page-content h3, .post-content h3 { color: var(--pc-teal); font-size: 1.15rem; margin: 26px 0 10px; }
.page-content p, .post-content p { margin: 0 0 16px; color: var(--pc-text); }
.page-content ul, .post-content ul { list-style: disc; padding-left: 22px; margin: 0 0 18px; }
.page-content ol, .post-content ol { padding-left: 22px; margin: 0 0 18px; }
.page-content li, .post-content li { margin-bottom: 8px; }
.page-content strong, .post-content strong { color: var(--pc-teal); }
.page-content a, .post-content a { color: var(--pc-orange); text-decoration: underline; }

/* ---- Service overview page ---- */
.service-page-hero { background: var(--pc-bg-light); padding: 46px 0; text-align: center; }
.service-page-hero h1 { color: var(--pc-teal); font-size: 2.1rem; margin-bottom: 10px; }
.service-page-hero p { color: var(--pc-muted); max-width: 620px; margin: 0 auto; }
.service-grid .card { text-align: left; display: flex; flex-direction: column; }
.service-grid .card a.card-link { display: block; color: inherit; }
.card-body .btn-outline { margin-top: 14px; padding: 8px 16px; font-size: .85rem; }

/* ===================== Chamber ===================== */
.chamber-grid { display: grid; grid-template-columns: 380px 1fr; background: var(--pc-bg-light); border-radius: 10px; overflow: hidden; }
.chamber-grid img { height: 100%; object-fit: cover; }
.chamber-body { padding: 34px 40px; }
.chamber-body h3 { color: var(--pc-teal); margin-bottom: 16px; }
.chamber-body .hospital-name { color: var(--pc-teal); font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; }
.chamber-body h6 { color: var(--pc-teal); margin: 14px 0 4px; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.chamber-body p { margin: 0; font-size: .95rem; }

/* ===================== Footer ===================== */
.site-footer { background: var(--pc-teal-dark); color: var(--pc-tint); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h5 { color: #fff; margin-bottom: 14px; }
.footer-grid li { margin-bottom: 8px; font-size: .92rem; }
.footer-grid a { color: var(--pc-tint); }
.footer-grid a:hover { color: #fff; }
.footer-logo { display: inline-block; margin-bottom: 16px; }
.footer-logo img { width: 52px; height: 52px; display: block; }
.footer-brand-name { color: #fff; font-size: 1.05rem; font-weight: 700; letter-spacing: .3px; margin: 0 0 4px; }
.footer-brand-desc { color: var(--pc-tint); font-size: .85rem; margin: 0; }
.footer-bottom { text-align: center; padding-top: 30px; margin-top: 30px; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
.footer-credit a { color: var(--pc-orange); text-decoration: none; }
.footer-credit a:hover { text-decoration: underline; }

/* ===================== 404 ===================== */
.error-404 { text-align: center; padding: 100px 24px; }
.error-404 h1 { font-size: 5rem; color: var(--pc-teal); margin-bottom: 10px; }

/* ===================== Appointment Page ===================== */
.appointment-card {
  max-width: 780px; margin: 0 auto; background: #fff;
  border: 1px solid #f0e2e2; border-top: 3px solid var(--pc-orange);
  border-radius: 14px; padding: 46px 50px; box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.appointment-card h1 { color: var(--pc-teal); font-size: 1.9rem; margin-bottom: 10px; }
.appointment-sub { color: var(--pc-muted); margin-bottom: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 8px; color: var(--pc-text); }
.form-group .req { color: #d9534f; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #e6d8d8; border-radius: 8px;
  background: #faf3f3; font-family: inherit; font-size: .95rem; color: var(--pc-text);
}
.form-group textarea { resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--pc-teal); background: #fff; }
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--pc-teal), var(--pc-teal-dark));
  color: #fff; border: none; padding: 14px 28px; border-radius: 40px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  box-shadow: 0 8px 18px rgba(122,17,40,.35);
}
.btn-whatsapp:hover { filter: brightness(1.1); }
.appointment-note { text-align: center; color: var(--pc-muted); font-size: .85rem; margin-top: 18px; margin-bottom: 0; }

/* ===================== Blinking "Appointment" nav button ===================== */
@keyframes urocare-nav-cta-blink { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.main-navigation .nav-cta > a {
  background: var(--pc-orange); color: #fff; padding: 9px 18px; border-radius: 30px;
  animation: urocare-nav-cta-blink 1.4s ease-in-out infinite;
}
.main-navigation .nav-cta > a:hover { background: var(--pc-orange-dark); color: #fff; animation: none; }

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .hero-grid, .intro-grid, .care-grid, .why-grid, .chamber-grid, .about-grid { grid-template-columns: 1fr !important; }
  .about-photo-card { position: static; max-width: 280px; margin: 0 auto 30px; }
  .service-grid, .video-grid, .blog-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; }
  .stats-grid { grid-template-columns: 1fr !important; gap: 24px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 26px; }
  .main-navigation ul { display: none; }
  .menu-toggle { display: block; }
  .main-navigation.is-open > ul { display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: #fff; padding: 20px 24px; box-shadow: 0 8px 16px rgba(0,0,0,.08); z-index: 50; max-height: calc(100vh - 90px); overflow-y: auto; }
  .main-navigation.is-open > ul > li { width: 100%; }
  .main-navigation .sub-menu {
    display: none;
    position: static;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    padding: 4px 0 4px 16px;
    margin-top: 6px;
  }
  .main-navigation .sub-menu::before { display: none; }
  .main-navigation .sub-menu a { padding: 8px 0; text-transform: none; font-size: .88rem; color: var(--pc-muted); }
  .main-navigation .menu-item-has-children.submenu-open > .sub-menu { display: flex !important; }
  .main-navigation .menu-item-has-children > a { position: relative; display: block; padding-right: 26px; }
  .main-navigation .menu-item-has-children > a::after {
    content: "";
    position: absolute; right: 4px; top: 45%;
    width: 8px; height: 8px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
    transition: transform .2s ease;
  }
  .main-navigation .menu-item-has-children.submenu-open > a::after {
    transform: translateY(-25%) rotate(-135deg);
  }
}
@media (max-width: 560px) {
  .why-grid h3 { font-size: clamp(1.3rem, 6.5vw, 1.8rem); }
  .intro-grid h3 { font-size: clamp(1.3rem, 6.5vw, 1.9rem); }
  .service-grid, .video-grid, .footer-grid, .blog-grid { grid-template-columns: 1fr !important; }
  .hero h1 { font-size: clamp(1.3rem, 6.5vw, 1.9rem); }
  .hero h2 { font-size: clamp(0.72rem, 3.6vw, 1.05rem); font-weight: 500; color: var(--pc-muted); margin-bottom: 14px; }
  .chamber-body { padding: 26px; }
  .appointment-card { padding: 30px 22px; }
  .form-row { grid-template-columns: 1fr; }

  /* ---- Hero: short headline + button reads best centred when stacked ---- */
  .hero-grid { text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero .btn { margin-left: auto; margin-right: auto; }

  /* ---- CTA banner: stack instead of squeezing text + button side by side ---- */
  .cta-grid { flex-direction: column; text-align: center; }

  /* ---- Body copy, lists, footer & address blocks: keep left-aligned so
         paragraphs, bullet lists and the chamber/hours info stay easy to
         scan instead of zig-zagging down the middle of a narrow screen ---- */
  .intro-grid, .care-grid, .why-grid, .vm-grid,
  .chamber-body, .about-content, .about-content-wrap,
  .page-content, .post-content, .single-post-content,
  .page-content-wrap, .footer-grid {
    text-align: left;
  }
  .intro-grid p.desc, .care-grid > div > p, .why-grid p,
  .page-content p, .post-content p, .about-content p,
  .chamber-body p {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }
  .page-content ul, .post-content ul, .about-content ul,
  .care-grid ul, .vm-grid ul {
    text-align: left;
    list-style-position: outside;
    padding-left: 20px;
    margin: 0 0 16px;
  }
  .intro-grid .btn { margin-left: 0; margin-right: 0; }
}
