/* Connecticut Caring Companions - Main Stylesheet */

/* ========================================
   CSS VARIABLES & RESET
   ======================================== */
:root {
  --primary: #1a5490;
  --secondary: #4a90e2;
  --accent: #FFD700;
  --error: #d93025;
  --text: #333333;
  --text-light: #64748b;
  --border: #d0d0d0;
  --bg-gray: #f8fafc;
  --bg-slate: #0f172a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 6rem 0;
}

.text-center {
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #0d3a6f;
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--primary);
}

.btn-accent:hover {
  transform: scale(1.05);
}

.btn-white {
  background: #fff;
  color: var(--primary);
}

.btn-white:hover {
  background: #f8fafc;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.top-bar {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 0;
  font-size: 0.75rem;
}

.top-bar-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  transition: color 0.2s;
}

.top-bar-phone:hover {
  color: var(--secondary);
}

.main-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: var(--primary);
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  font-family: serif;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
}

.logo-subtitle {
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-light);
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  display: none;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu-link {
  display: block;
  padding: 0.75rem;
  font-weight: 700;
  color: var(--text);
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.mobile-menu-link:hover {
  background: var(--bg-gray);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  min-width: 20rem;
  padding: 0.75rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-light);
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: var(--bg-gray);
  color: var(--primary);
}

.dropdown-icon {
  background: var(--bg-gray);
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.dropdown-item:hover .dropdown-icon {
  background: var(--primary);
  color: #fff;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--bg-slate);
  color: #94a3b8;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: #94a3b8;
  transition: color 0.2s;
  font-size: 0.875rem;
}

.footer-link:hover {
  color: var(--secondary);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
}

.disclaimer {
  max-width: 48rem;
  margin: 1rem auto 0;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.5;
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-container {
  max-width: 650px;
  margin: 0 auto;
  padding: 2rem;
  background: #fff;
  border-radius: 0.75rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.required {
  color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  font-family: inherit;
  transition: all 0.2s;
  background: #fff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231a5490'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.125rem;
  padding-right: 3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-gray);
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.checkbox-item:hover {
  background: #fff;
  border-color: var(--primary);
}

.checkbox-item input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
}

.file-input-wrapper {
  position: relative;
  width: 100%;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px dashed var(--border);
  border-radius: 0.5rem;
  background: var(--bg-gray);
  cursor: pointer;
  transition: all 0.2s;
}

.file-input-label:hover {
  border-color: var(--primary);
  background: #fff;
}

.file-input-label.has-file {
  border-style: solid;
  border-color: var(--primary);
  background: #fff;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.form-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.form-submit:hover:not(:disabled) {
  background: #0d3a6f;
  transform: translateY(-1px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-success {
  text-align: center;
  padding: 3rem 1rem;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #fff;
  font-size: 2rem;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  background: var(--primary);
  color: #fff;
  padding: 5rem 0 8rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(to left, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.125rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  max-width: 40rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ========================================
   SERVICES GRID
   ======================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.3s;
}

.service-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.service-icon {
  width: 4rem;
  height: 4rem;
  background: var(--bg-gray);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-card:hover .service-icon {
  background: rgba(26, 84, 144, 0.1);
}

.service-card h3 {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-link {
  color: var(--secondary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.service-link:hover {
  text-decoration: underline;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .hero h1 {
    font-size: 3.75rem;
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: 3rem 0;
  }
  
  .hero {
    padding: 3rem 0 5rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   CITY/COUNTY PAGE UTILITIES
   ======================================== */
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.section-intro {
  background: var(--bg-gray);
  padding: 3rem;
  border-radius: 1.5rem;
  margin-bottom: 3rem;
}

.section-card {
  background: #fff;
  padding: 2.5rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 3rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-item {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.feature-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.city-link {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  margin: 0.25rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.city-link:hover {
  transform: translateY(-2px);
  background: var(--primary);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.city-card {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 1.25rem;
  border-radius: 0.75rem;
  text-align: center;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s;
  display: block;
}

.city-card:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-4px);
}

.testimonial-box {
  background: linear-gradient(135deg, var(--primary) 0%, #0d3a6f 100%);
  color: #fff;
  padding: 3rem;
  border-radius: 1.5rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.testimonial-quote {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 4rem;
  opacity: 0.1;
}

@media (max-width: 768px) {
  .section-intro,
  .section-card,
  .testimonial-box {
    padding: 2rem;
  }
  
  .city-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}
