/* ========================================
   CareVision Medical Solutions – Final CSS
   High Contrast • Professional • Consistent on All Devices
======================================== */

:root {
  --primary: #005B99;     /* Deep professional blue – excellent contrast */
  --primary-light: #0077CC;
  --green: #008844;       /* Rich accessible green */
  --orange: #E65100;      /* Strong accessible orange */
  --teal: #00796B;        /* Deep teal for accents */
  --dark: #0D1A2B;        /* Very dark navy (almost black) */
  --light-bg: #F8FBFF;    /* Clean off-white background */
  --text: #1A2A44;        /* Deep navy text – maximum readability */
  --text-light: #2D3B55;  /* For secondary text */
  --radius: 16px;
  --shadow: 0 12px 35px rgba(0, 80, 150, 0.14);
  --transition: 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.75;
  color: var(--text);
  background: var(--light-bg);
  -webkit-font-smoothing: antialiased;
}

/* === Layout === */
.container {
  max-width: 1940px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* ======================================== HEADER ======================================== */
header {
  background: #FFFFFF;
  border-bottom: 1px solid rgba(0, 91, 153, 0.15);
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  z-index: 3000;
  padding: 0.7rem 0;
  backdrop-filter: blur(12px);
  transition: transform var(--transition), background 0.4s;
  box-shadow: 0 4px 20px rgba(0, 80, 150, 0.08);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 32px rgba(0, 80, 150, 0.15);
}

header.hide-on-scroll {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1940px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* === LOGO === */
.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.logo img {
  height: clamp(38px, 4.6vw, 60px);
  width: auto;
  transition: transform var(--transition);
}

.logo img:hover {
  transform: scale(1.09);
}

.logo-text {
  font-size: clamp(0.82rem, 1.1vw, 1.02rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

/* Mobile logo */
@media (max-width: 768px) {
  .logo img { height: clamp(34px, 4.2vw, 50px); }
}

/* ======================================== NAVIGATION ======================================== */
nav ul {
  display: flex;
  gap: 2.4rem;
  list-style: none;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 0.6rem 0;
  position: relative;
  transition: color var(--transition);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3.5px;
  background: var(--green);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

nav a:hover, nav a.active {
  color: var(--green);
}

nav a:hover::after, nav a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.9rem;
  color: var(--primary);
  cursor: pointer;
  padding: 8px;
}

/* Mobile Nav */
@media (max-width: 768px) {
  .menu-toggle { display: block; z-index: 4000; }

  nav ul {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    flex-direction: column;
    padding: 1.8rem 0;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    border-top: 1px solid #e2e8f0;
  }

  nav ul.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  nav a {
    color: var(--text);
    font-size: 1.15rem;
    padding: 1rem 0;
  }

  nav a:hover, nav a.active {
    color: var(--green);
  }
}

/* ======================================== HERO ======================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #005B99 0%, #00796B 100%),
              url('https://images.unsplash.com/photo-1551608201-97d0c575f9b9?auto=format&fit=crop&w=1600&q=80') center/cover;
  color: white;
  text-align: center;
  padding: 10rem 1.5rem 9rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 800;
  background: linear-gradient(90deg, #FFFFFF, #CCF2FF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.2rem;
  line-height: 1.15;
}

.hero p {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.38rem;
  opacity: 0.96;
  font-weight: 400;
}

@media (max-width: 768px) {
  .hero { padding: 7rem 1.5rem 6.5rem; }
}

/* ======================================== MAIN CONTENT ======================================== */
main { padding: 5rem 1.5rem; }

.section-card {
  background: #FFFFFF;
  border-radius: var(--radius);
  padding: 3rem;
  margin-bottom: 3.2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 91, 153, 0.14);
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.section-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 7px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--teal));
  border-radius: var(--radius) 0 0 var(--radius);
}

.section-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 24px 50px rgba(0, 80, 150, 0.22);
}

.mission-box {
  background: linear-gradient(135deg, #E3F2FD 0%, #E8F5E8 100%);
  border-left: 8px solid var(--green);
  border-radius: var(--radius);
  padding: 2.8rem;
  margin: 3rem 0;
  font-size: 1.15rem;
  color: var(--text);
}

/* ======================================== BUTTONS ======================================== */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 1rem 2.4rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 6px 20px rgba(0, 91, 153, 0.3);
}

.btn:hover {
  background: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(0, 91, 153, 0.4);
}

.btn-green {
  background: var(--green);
}

.btn-green:hover {
  background: #00A651;
  box-shadow: 0 14px 35px rgba(0, 135, 68, 0.4);
}

/* ======================================== FORMS ======================================== */
form {
  max-width: 680px;
  margin: 3.5rem auto;
  display: grid;
  gap: 1.4rem;
}

input, textarea {
  width: 100%;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid #D0E0F5;
  background: #FFFFFF;
  font-size: 1rem;
  transition: var(--transition);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 5px rgba(0, 91, 153, 0.18);
}

/* ======================================== FOOTER ======================================== */
footer {
  background: var(--dark);
  color: #B0BEC5;
  text-align: center;
  padding: 4rem 1.5rem;
  margin-top: 6rem;
}

footer a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ======================================== SCROLL TO TOP ======================================== */
#scrollTop {
  position: fixed;
  bottom: 2.2rem;
  right: 2.2rem;
  background: var(--orange);
  color: white;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: 0 10px 30px rgba(230, 81, 0, 0.35);
  z-index: 5000;
  cursor: pointer;
}

#scrollTop.show {
  opacity: 1;
  visibility: visible;
}

#scrollTop:hover {
  transform: scale(1.15);
  background: #FF6D00;
}