/*
Theme Name: CBI Theme Final (Stable)
Description: The final, stable child theme for Centralborirak Inter.
Author: Your AI Assistant
Template: generatepress
Version: 8.4.0 (Full-width footer + mobile CTA)
*/

/* ================================================================
   1) GLOBAL TOKENS
   ================================================================ */
:root {
  --brand-blue: #1a3a6e;
  --brand-red: #c41e24;
  --text-dark: #2c3e50;
  --text-light: #5f6c7b;
  --background-light: #f4f7fc;
  --white: #ffffff;
  --border-color: #e9eef5;
}

/* Base */
body {
  font-family: 'Sarabun', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text-dark);
  line-height: 1.8;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Containers */
.section-container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.section-block { padding: 100px 0; }
.section-title { text-align: center; font-size: 2.8rem; font-weight: 800; color: var(--brand-blue); margin-bottom: 15px; line-height: 1.3; }
.section-subtitle { text-align: center; font-size: 1.15rem; color: var(--text-light); max-width: 700px; margin: 0 auto 60px; }

/* ================================================================
   2) BUTTONS
   ================================================================ */
.cbi-button { display: inline-block; padding: 14px 32px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 1rem; transition: all .3s ease; border: 2px solid transparent; box-shadow: 0 4px 20px rgba(0,0,0,.1); letter-spacing: .5px; }
.cbi-button-primary { background: var(--brand-red); color: var(--white); }
.cbi-button-primary:hover { background: #a0181d; color: var(--white); transform: translateY(-4px); box-shadow: 0 8px 25px rgba(196,24,36,.3); }
.cbi-button-secondary { background: var(--white); color: var(--brand-blue); border-color: var(--border-color); }
.cbi-button-secondary:hover { background: var(--brand-blue); color: var(--white); border-color: var(--brand-blue); transform: translateY(-4px); box-shadow: 0 8px 25px rgba(26,58,110,.2); }

/* ================================================================
   3) HEADER/NAV (GeneratePress aware) + INLINE MOBILE CTA
   ================================================================ */
.site-header { background: var(--white); border-bottom: 1px solid var(--border-color); }
.site-logo a img { max-height: 60px; }
.main-navigation .main-nav ul { align-items: center; }
.main-navigation .main-nav > ul > li > a { font-weight: 700; color: var(--text-dark); transition: color .25s ease; }
.main-navigation .main-nav > ul > li > a:hover,
.main-navigation .main-nav > ul > li.current-menu-item > a { color: var(--brand-red); }
.main-navigation .main-nav > ul > li.cta-button > a { background: var(--brand-red); color: #fff !important; padding: 8px 18px; font-size: .9rem; border-radius: 6px; margin-left: 15px; box-shadow: 0 4px 15px rgba(0,0,0,.1); }
.main-navigation .main-nav > ul > li.cta-button > a:hover { background: #a0181d; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(196,24,36,.3); }

/* Inline CTA that we inject via functions.php */
.site-header .inside-header { position: relative; }
.cbi-cta-inline-mobile { position: absolute; right: 96px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; z-index: 3; }
.cbi-cta-inline-mobile .cbi-button { padding: 8px 12px; border-radius: 8px; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.10); }
.cbi-cta-line { background: #06C755; border-color: #06C755; color: #fff; }
.cbi-cta-line:hover { background: #05a84a; border-color: #05a84a; color: #fff; }
.cbi-cta-call { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
/* hide on desktop */
@media (min-width: 992px){ .cbi-cta-inline-mobile{ display:none } }
@media (max-width: 360px){ .cbi-cta-inline-mobile{ right:80px } }
/* when mobile menu is opened (body.nav-open set by JS) */
body.nav-open .cbi-cta-inline-mobile{ display:none }

/* ================================================================
   4) COMPONENTS
   ================================================================ */
.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: 12px; line-height: 1.6; }
.checklist li::before { content: '✔'; position: absolute; left: 0; top: 2px; color: var(--brand-red); font-weight: bold; }

.qualifications-list { list-style: none; padding: 0; margin: 0; }
.qualifications-list li { padding: 12px 0; border-bottom: 1px solid #dce8ff; font-size: 1rem; }
.qualifications-list li:last-child { border-bottom: none; }
.qualifications-list li strong { color: var(--text-dark); }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ================================================================
   5) SECTION PATTERNS
   ================================================================ */
.hero-section { position: relative; width: 100%; min-height: 320px; padding: 120px 20px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; background-size: cover; background-position: center 40% !important; }
.hero-section::before { content: ""; position: absolute; inset: 0; background: linear-gradient(45deg, rgba(26,58,110,.9), rgba(26,58,110,.75)); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 850px; }
.hero-content h1 { font-size: 3.2rem; font-weight: 800; margin-bottom: 12px; line-height: 1.2; text-shadow: 0 3px 10px rgba(0,0,0,.6); }
.hero-content .sub-headline { font-size: 1.2rem; max-width: 720px; margin: 0 auto 28px; opacity: .95; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.hero-cta-buttons { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; }

.features-section { background: var(--white); padding: 60px 0; border-bottom: 1px solid var(--border-color); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-item { text-align: center; padding: 20px; position: relative; }
.feature-item:not(:last-child)::after { content: ''; position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 1px; height: 60px; background: var(--border-color); }
.feature-item h3 { font-size: 1.2rem; color: var(--brand-blue); margin-bottom: 10px; }
.feature-item p { font-size: .95rem; color: var(--text-light); line-height: 1.7; }

.why-choose-us { background: var(--background-light); }
.wcu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.wcu-card { background: var(--white); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.08); overflow: hidden; transition: all .3s ease; padding: 40px 30px; text-align: center; display: flex; flex-direction: column; justify-content: center; height: 100%; }
.wcu-card:hover { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(233,238,245,.9); border-color: var(--white); }
.wcu-card h3 { font-size: 1.5rem; color: var(--brand-blue); margin-bottom: 15px; }

.course-image-section { padding-top: 100px !important; padding-bottom: 100px !important; }
.ci-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.ci-text-content { background: var(--white); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.08); overflow: hidden; transition: all .3s ease; padding: 40px; height: 100%; }
.ci-text-content h2 { font-size: 2.5rem; color: var(--brand-blue); margin-bottom: 20px; line-height: 1.3; }
.ci-text-content .checklist { margin: 30px 0; }
.ci-text-content .checklist li { font-weight: 700; }
.ci-image-content img { width: 100%; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.1); }

.hospital-network-section { background: var(--background-light); }
.logo-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 40px; }
.logo-item img { max-height: 70px; width: auto; opacity: .8; transition: all .3s ease; }
.logo-item img:hover { opacity: 1; }

.testimonial-section { background: var(--brand-blue); color: var(--white); position: relative; overflow: hidden; }
.testimonial-section::before { content: '“'; position: absolute; top: -20px; left: 10px; font-size: 12rem; color: rgba(255,255,255,.08); line-height: 1; z-index: 1; }
.testimonial-box { max-width: 800px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.testimonial-author-image { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin-bottom: 25px; border: 4px solid var(--white); box-shadow: 0 5px 20px rgba(0,0,0,.2); }
.testimonial-quote { font-size: 1.4rem; font-weight: 400; line-height: 1.7; margin-bottom: 25px; font-style: italic; }
.testimonial-author { font-weight: 700; font-size: 1.1rem; }
.testimonial-author span { display: block; font-weight: 400; opacity: .8; font-size: .9rem; }

.final-cta-section { background: var(--white); }
.final-cta-buttons { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; }
.final-cta-buttons .cbi-button { width: auto; margin: 5px 10px; }

/* ================================================================
   6) RESPONSIVE
   ================================================================ */
@media (max-width: 992px) {
  .site-header .inside-header { display: flex; align-items: center; justify-content: space-between; }
  .site-logo { order: 1; margin: 0; }
  .main-navigation { order: 2; }
  .main-navigation .main-nav > ul > li.cta-button { display: block !important; margin: 15px 0; }
  .main-navigation .main-nav > ul > li.cta-button > a { display: block; width: 100%; text-align: center; margin: 0; padding: 12px 20px; box-sizing: border-box; }

  .features-grid { grid-template-columns: 1fr 1fr; }
  .wcu-grid { grid-template-columns: 1fr 1fr; }
  .ci-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 768px) {
  .main-navigation .main-nav > ul { justify-content: flex-start; margin: 0; padding-left: 0; }
  .main-navigation .main-nav > ul > li { width: 100%; text-align: center; }
}

@media (max-width: 576px) {
  .section-block { padding: 80px 0; }
  .section-title { font-size: 2.1rem; }
  .hero-content h1 { font-size: 2.2rem; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-item::after { display: none; }
}

/* ================================================================
   7) LAYOUT OVERRIDES + FULL‑WIDTH FOOTER
   ================================================================ */
.site-header .inside-header,
.site-content .grid-container,
.section-container { max-width: 100% !important; }

/* Full-width outer containers */
.footer-widgets-container-v2,
.site-info { max-width: 100% !important; }

/* Inner content width + padding for footer blocks */
.footer-widgets-container-v2 .footer-grid,
.site-info .inside-site-info { max-width: 1280px !important; margin-left: auto !important; margin-right: auto !important; padding-left: 40px; padding-right: 40px; }

/* Footer visuals */
.site-footer-v2 { background: var(--brand-blue); color: rgba(255,255,255,.7); padding-top: 80px; }
.site-footer-v2 .footer-grid { display: grid; grid-template-columns: 1fr !important; gap: 24px !important; }
.footer-widget-1 .custom-logo { max-width: 120px; margin-bottom: 20px; }
.footer-widget-area p { font-size: .95rem; }
.footer-widget-title { font-size: 1.1rem; color: var(--white); font-weight: 700; margin-bottom: 14px; }
.footer-widget-area .menu { list-style: none; padding: 0; margin: 0; }
.footer-widget-area .menu li { margin-bottom: 8px; }
.footer-widget-area .menu a { color: rgba(255,255,255,.7); text-decoration: none; transition: color .3s ease; }
.footer-widget-area .menu a:hover { color: var(--white); }
.site-info { background: var(--brand-blue) !important; text-align: center; margin-top: 60px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .9rem; color: var(--white) !important; }
.footer-qr-code { max-width: 120px; height: auto; margin: 0 auto; border-radius: 8px; display: block; }

/* Desktop footer grid */
@media (min-width: 1200px) {
  .site-footer-v2 .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr !important; gap: 48px !important; align-items: start; }
  .site-footer-v2 .footer-grid .footer-widget-area { padding-left: 24px; }
  .site-footer-v2 .footer-grid .footer-widget-area:not(:first-child) { border-left: 1px solid rgba(255,255,255,0.12); }
  .site-footer-v2 .footer-widget-1 { text-align: left; }
  .site-footer-v2 .footer-widget-1 .custom-logo { max-width: 140px; margin-bottom: 16px; }
  .site-footer-v2 .footer-widget-4 .footer-qr-code { margin: 12px 0 0 0; max-width: 140px; }
  .site-footer-v2 .footer-widget-title { font-size: 1.15rem; margin-bottom: 16px; }
  .site-footer-v2 .footer-widget-area p { font-size: 1rem; line-height: 1.8; }
  .site-footer-v2 .menu li { margin-bottom: 10px; }
  .site-footer-v2 .menu a { position: relative; text-decoration: none; }
  .site-footer-v2 .menu a:hover { color: #fff; }
  .site-footer-v2 .menu a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: rgba(255,255,255,0.7); transition: width .25s ease; }
  .site-footer-v2 .menu a:hover::after { width: 100%; }
}

/* Footer social icons hover */
.site-footer-v2 .social-links img { filter: grayscale(20%); transition: transform .2s ease, filter .2s ease; }
.site-footer-v2 .social-links a:hover img { transform: translateY(-2px); filter: none; }

/* Bottom bar width alignment */
.site-info .inside-site-info { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
