* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: #fff;
}

/* ==========================================================================
   HERO SECTION (BASE LAYER / DESKTOP)
   ========================================================================== */
.neuro-rehab-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;

    background: url("../images/main-rehab-neuro.png")
                center center/cover no-repeat;

    display: flex;
    align-items: flex-start;   /* changed from center */

    overflow: hidden;          /* prevent overflow */

    padding: 20px 0 60px;     /* top and bottom breathing space */
}

.neuro-rehab-overlay {
  position: absolute;
  inset: 0;
 background: linear-gradient( 
	 90deg, 
	 rgba(24, 64, 128, 0.84) 0%, 
	 rgba(42, 90, 168, 0.72) 25%, 
	 rgba(72, 124, 204, 0.52) 45%, 
	 rgba(120, 165, 228, 0.24) 70%, 
	 rgba(255, 255, 255, 0) 100% 
 );
}

.neuro-rehab-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 140px; /* Aligned to clear fixed desktop menus cleanly */
  padding-right: 40px;
  padding-bottom: 60px;
  padding-left: 40px;
}
.neuro-rehab-card {
    width: 100%;
    max-width: 820px;

    background: #fff;

    padding: 28px;

    border-radius: 10px;

    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.breadcrumb {
  color: #ffffff;
  font-size: 13px;
  margin-bottom: 25px;
}

.breadcrumb span {
  margin: 0 8px;
  color: #d1d1d1;
}

.neuro-rehab-hero h1 {
  color: #fff;
  font-size: 45px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.neuro-rehab-tagline {
  color: #ffc400;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.neuro-rehab-card {
  width: 820px;
  background: #ffffff;
  padding: 28px;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.neuro-rehab-card h3 {
  color: #0b3ea9;
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 15px;
  font-weight: 700;
}

.neuro-rehab-card p {
  color: #555;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 18px;
}

.neuro-rehab-card h4 {
  color: #222;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 700;
  margin-bottom: 22px;
}

.btn {
  display: inline-block;
  background: #0047ff;
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 600;
  transition: 0.3s;
}

.btn:hover {
  background: #0038d1;
}

/* ==========================================================================
   NEURO SERVICES CORE GRID LAYOUTS
   ========================================================================== */
.neuro-services {
  max-width: 1400px;
  margin: 90px auto;
  padding: 0 40px;
}

.section-header {
  margin-bottom: 50px;
}

.section-header span {
  display: block;
  color: #1e4ed8;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.section-header h2 {
  font-size: 35px;
  line-height: 1.1;
  font-weight: 700;
  color: #111827;
  max-width: 700px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: #f5f8ff;
  border: 1px solid #edf1f7;
  padding: 30px;
  transition: 0.3s;

  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.icon-box {
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.icon-box i {
  font-size: 40px;
  color: #2148d8;
}

.service-card h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  margin-bottom: 15px;
}

.service-card p {
  font-size: 14px;
  color: #5b6474;
  line-height: 1.9;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-card a {
  text-decoration: none;
  color: #2148d8;
  font-size: 14px;
  font-weight: 600;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  transition: 0.3s;
}

.service-card a:hover {
  color: #0f3ea9;
}

.service-card a i {
  margin-left: 8px;
}

/* ==========================================================================
   CALL TO ACTION INTERACTION BOX
   ========================================================================== */
.cta-box {
  margin-top: 40px;
  background: #f3f7ff;
  padding: 45px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.cta-content h2 {
  font-size: 38px;
  color: #111827;
  margin-bottom: 12px;
}

.cta-content p {
  color: #667085;
  line-height: 1.8;
  max-width: 550px;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 260px;
}

.btn-primary {
  background: #0d3ea9;
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding: 15px;
  border-radius: 4px;
  font-weight: 600;
}

.btn-outline {
  border: 1px solid #0f43d9;
  color: #0f43d9;
  text-decoration: none;
  text-align: center;
  padding: 15px;
  border-radius: 4px;
  font-weight: 600;
}

/* ==========================================================================
   MEDIA QUERY: RESPONSIVE RESPONDERS (1400px - 1200px Laptop Viewports)
   ========================================================================== */
@media screen and (max-width: 1400px) {
  .neuro-rehab-content {
    padding: 0 60px;
    padding-top: 140px;
  }

  .neuro-services {
    max-width: 1200px;
  }
}

@media screen and (max-width: 1200px) {
  .neuro-rehab-content {
    padding: 0 40px;
    padding-top: 140px;
  }

  .neuro-rehab-hero h1 {
    font-size: 42px;
  }

  .neuro-rehab-card {
    width: 100%;
    max-width: 450px;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   MEDIA QUERY: TABLETS (Down to 992px)
   ========================================================================== */
@media screen and (max-width: 992px) {
  .neuro-rehab-hero {
    min-height: 750px;
    background-position: center;
  }

  .neuro-rehab-content {
    padding: 0 30px;
    padding-top: 150px;
  }

  .neuro-rehab-hero h1 {
    font-size: 38px;
  }

  .neuro-rehab-tagline {
    font-size: 16px;
  }

  .neuro-rehab-card {
    width: 100%;
    max-width: 450px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .section-header h2 {
    font-size: 32px;
  }

  .cta-box {
    flex-direction: column;
    text-align: center;
    padding: 40px 30px;
  }

  .cta-buttons {
    width: 100%;
    max-width: 320px;
  }
}

/* ==========================================================================
   MEDIA QUERY: MOBILE LARGE (Down to 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
  .neuro-rehab-hero {
    min-height: auto;
    background-position: 65% center;
    display: block; 
  }

  /* FIXED LAYOUT DEFENSE: Safe, non-overlapping padding alignment beneath fixed bars */
  .neuro-rehab-content {
    padding-top: 150px !important; 
    padding-right: 20px !important;
    padding-bottom: 40px !important;
    padding-left: 20px !important;
  }

  .breadcrumb {
    font-size: 12px;
    margin-bottom: 15px;
  }

  .neuro-rehab-hero h1 {
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 12px;
  }

  .neuro-rehab-tagline {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .neuro-rehab-card {
    width: 100%;
    max-width: 100%;
    padding: 24px; /* Reduced slightly on mobile for compactness */
  }

  .neuro-rehab-card h3 {
    font-size: 19px;
    margin-bottom: 12px;
  }

  .neuro-rehab-card p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
  }

  .neuro-rehab-card h4 {
    font-size: 15px;
    margin-bottom: 18px;
  }

  .btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
  }

  .neuro-services {
    margin: 60px auto;
    padding: 0 15px;
  }

  .section-header {
    text-align: center;
    margin-bottom: 35px;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .service-card {
    padding: 24px;
  }

  .icon-box {
    width: 65px;
    height: 65px;
    margin-bottom: 18px;
  }

  .icon-box i {
    font-size: 34px;
  }

  .service-card h3 {
    font-size: 20px;
  }

  .cta-box {
    padding: 30px 20px;
    margin-top: 30px;
  }

  .cta-content h2 {
    font-size: 28px;
  }

  .cta-content p {
    font-size: 14px;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
  }
}

/* ==========================================================================
   MEDIA QUERY: SMALL MOBILE (Down to 480px)
   ========================================================================== */
@media screen and (max-width: 480px) {
  .neuro-rehab-hero {
    min-height: auto;
  }

  .neuro-rehab-content {
    padding-top: 145px !important; 
    padding-right: 15px !important;
    padding-left: 15px !important;
  }

  .neuro-rehab-hero h1 {
    font-size: 26px;
  }

  .neuro-rehab-tagline {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .neuro-rehab-card {
    padding: 18px;
  }

  .neuro-rehab-card h3 {
    font-size: 18px;
  }

  .neuro-rehab-card p {
    font-size: 13px;
    line-height: 1.6;
  }

  .neuro-rehab-card h4 {
    font-size: 14px;
    line-height: 1.5;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .service-card {
    padding: 20px;
  }

  .service-card h3 {
    font-size: 18px;
  }

  .service-card p {
    font-size: 13px;
  }

  .cta-content h2 {
    font-size: 24px;
  }
}

/* ==========================================================================
   MEDIA QUERY: EXTRA SMALL DEVICES (Down to 360px and smaller)
   ========================================================================== */
@media screen and (max-width: 360px) {
  .neuro-rehab-content {
    padding-top: 140px !important; 
  }

  .neuro-rehab-hero h1 {
    font-size: 22px;
  }

  .neuro-rehab-card {
    padding: 15px;
  }

  .service-card {
    padding: 18px;
  }

  .cta-content h2 {
    font-size: 22px;
  }
}