/* Modern, accessible CSS design system for NYLM */

:root {
  /* Colors - curated HSL palette for high contrast and modern look */
  --primary-color: #0F766E;     /* Vibrant Teal */
  --primary-hover: #115E59;     /* Darker Teal for hover states */
  --text-dark: #1E293B;         /* Slate 800 - high contrast readability */
  --text-muted: #475569;        /* Slate 600 - subtext */
  --bg-main: #FFFFFF;           /* Pure white background */
  --bg-card: #FFFFFF;           /* Pure white for cards */
  --border-light: #E2E8F0;      /* Border gray */
  --accent-color: #0369A1;      /* Sky Blue for secondary accents */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.05);
  --shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --radius-lg: 12px;
  --radius-md: 8px;
  --max-width: 1000px;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 1.125rem; /* 18px body font for accessibility */
  -webkit-font-smoothing: antialiased;
}

/* Skip-to-content Link for Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  z-index: 100;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: bold;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 20px;
  outline: 3px solid #F59E0B; /* Amber outline for focus visibility */
}

/* Header & Logo styling */
.site-header {
  background-color: var(--bg-card);
  padding: 16px 24px;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 800;
  font-size: 1.5rem;
}

.logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.nav-link-home {
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: background-color 0.2s;
}

.nav-link-home:hover {
  background-color: #F1F5F9;
}

/* Main Container */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
  min-height: calc(100vh - 220px);
  box-sizing: border-box;
}

/* Breadcrumbs navigation */
.breadcrumbs {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: var(--text-muted);
}

/* Typography elements */
h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: 8px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 32px;
  margin-bottom: 12px;
}

.meta-subtext {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 24px;
}

/* Homepage Hero section */
.hero {
  text-align: center;
  margin-bottom: 40px;
  padding: 16px 0;
}

.hero h1 {
  font-size: 2.75rem;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Grid layout for categories */
.grid-container {
  display: grid;
  grid-template-columns: repeat(5, 160px); /* Fixed square widths on desktop */
  justify-content: center; /* Center cards if container space allows */
  gap: 20px;
  max-width: 880px; /* 5 columns * 160px + 4 gaps * 20px = 880px */
  width: 100%;
  margin: 24px auto 0 auto;
}

/* Category Card designs */
.card-category {
  background-color: #F3F4F6;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px 10px; /* Reduced to fit wrapped titles without stretching */
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center content vertically */
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  width: 160px; /* Force strict desktop square width */
  height: 160px; /* Force strict desktop square height */
  box-sizing: border-box;
}

.card-category:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-category:focus-visible {
  outline: 3px solid #F59E0B;
  outline-offset: 2px;
}

.category-icon-wrapper {
  width: 90px; /* Compact wrapper */
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.category-icon {
  width: 80px; /* Compact icon */
  height: 80px;
  object-fit: contain;
}

.card-category h3 {
  font-size: 1.1rem; /* Marginally smaller font for multi-line text */
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text-dark);
}

.card-category p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Category Page Content */
.category-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 12px;
}

.category-header-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.category-header h1 {
  font-size: 2.25rem;
  margin-bottom: 4px;
}

.category-description {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.program-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Program card inside list */
.program-item-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text-dark);
  display: block;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.program-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.program-item-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.program-item-card .agency-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.program-item-card p {
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.5;
}

/* Benefit Page (Program) layout */
.program-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 0 auto;
}

.program-section {
  margin-top: 28px;
  padding-top: 24px;
}

.program-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* List styles for Who it helps & What you need */
.section-content ul,
.section-content ol {
  list-style: none;
  margin-top: 12px;
  margin-bottom: 12px;
}

.section-content li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 1.1rem;
  line-height: 1.5;
}

.section-content li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.15rem;
}

.section-content p {
  margin-bottom: 12px;
  font-size: 1.1rem;
  line-height: 1.5;
}

.section-content strong {
  color: var(--text-dark);
  font-weight: 700;
}

/* Tables inside program sections */
.section-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 1rem;
  line-height: 1.4;
}

.section-content th,
.section-content td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.section-content th {
  background-color: #F1F5F9;
  color: var(--text-dark);
  font-weight: 700;
}

.section-content tr:nth-child(even) td {
  background-color: #F8FAFC;
}

.section-content table p {
  margin-bottom: 0;
  font-size: 1rem;
}

/* Action button area */
.action-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s, transform 0.1s;
  min-height: 64px;
}

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

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #F1F5F9;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: background-color 0.2s;
  min-height: 64px;
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: #E2E8F0;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 0;
}

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

/* Trust / footer note inside program content */
.trust-note {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Footer layout */
.site-footer {
  background-color: #1E293B; /* Deep Slate footer */
  color: #94A3B8;
  padding: 40px 24px;
  font-size: 0.95rem;
  text-align: center;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-logo {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  max-width: 300px; /* Symmetrical space base */
}

.footer-logo-img {
  max-width: 150px; /* Slightly larger presence */
  height: auto;
  object-fit: contain;
}

.footer-signup {
  flex: 2;
  text-align: center;
}

.footer-signup .signup-prompt {
  text-align: center;
}

.footer-signup .signup-form {
  justify-content: center;
  margin: 0 auto;
}

.footer-graphic {
  flex: 1; /* Symmetric flex alignment */
  margin: 0;
  max-width: 300px; /* Expanded desktop space constraint */
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.footer-graphic-img {
  width: 100%;
  height: auto;
  max-height: 240px; /* Increased graphic height size */
  object-fit: contain;
}

@media (max-width: 768px) {
  .footer-top-row {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }
  .footer-logo {
    justify-content: center;
    max-width: none;
    margin: 0 auto;
  }
  .footer-signup {
    width: 100%;
  }
  .footer-graphic {
    justify-content: center;
    max-width: 240px;
    margin: 0 auto;
  }
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: #CBD5E1;
  text-decoration: none;
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

.footer-text {
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  body {
    font-size: 1.05rem;
  }
  
  main {
    padding: 20px 16px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .program-content {
    padding: 24px 20px;
  }
  
  .grid-container {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile/tablet */
    gap: 16px;
    max-width: none;
  }
  
  .card-category {
    padding: 16px;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .category-icon-wrapper {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
  }
  .category-icon {
    width: 64px;
    height: 64px;
  }
  .card-category h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
  }
}

/* ChatGPT and Have a Question section styles */
.have-question-section {
  text-align: center;
  margin-top: 48px;
  padding-top: 36px;
  margin-bottom: 24px;
}

.have-question-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.chatgpt-cta-area {
  margin-bottom: 20px;
}

.btn-chatgpt {
  background-color: #000000;
  color: #ffffff;
  font-size: 1.15rem;
  padding: 12px 32px;
  min-height: 48px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: bold;
}

.btn-chatgpt:hover {
  background-color: #1f2937;
  color: #ffffff;
}

.signup-prompt {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.signup-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}

.signup-form input[type="email"] {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
}

.signup-form button {
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: bold;
}

@media (max-width: 768px) {
  .signup-form {
    flex-direction: column;
    width: 100%;
  }
}

/* Category Page Subcategory List Styles */
.program-list h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.program-list ul {
  list-style-type: disc;
  margin-left: 24px;
  margin-bottom: 24px;
  padding-left: 0;
}

.program-list li {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.program-list li a {
  color: #1D4ED8; /* Classic blue link color matching original */
  text-decoration: underline;
  font-weight: 500;
}

.program-list li a:hover {
  color: #1E40AF;
}

/* Footer Signup Styles */

.footer-signup .signup-prompt {
  font-size: 1rem;
  color: #9CA3AF;
  margin-bottom: 12px;
}

.footer-signup .signup-form {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  max-width: 440px;
  margin: 0;
}

.footer-signup .signup-form input[type="email"] {
  flex: 1;
  padding: 8px 16px;
  border: 1px solid #374151;
  background-color: #1F2937;
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.footer-signup .signup-form button {
  padding: 8px 20px;
  font-size: 0.95rem;
  font-weight: bold;
}

@media (max-width: 768px) {
  .footer-signup .signup-form {
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
  }
}
