/* ============================================================================
   NHS Forms - Main Site Stylesheet
   ============================================================================ */

:root {
  /* NHS Blue */
  --primary: #0066cc;
  --primary-dark: #004a99;
  --primary-light: #e6f0ff;

  /* Grays */
  --bg: #ffffff;
  --fg: #222222;
  --gray-light: #f5f5f5;
  --gray-medium: #cccccc;
  --gray-dark: #666666;

  /* Status colors */
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   Global Styles
   ============================================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  line-height: 1.6;
  color: var(--fg);
  background-color: var(--bg);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ============================================================================
   Header
   ============================================================================ */

.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: var(--spacing-xl) 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nhs-logo {
  background: white;
  color: var(--primary);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-weight: 800;
  letter-spacing: 1px;
}

.brand {
  font-weight: 300;
  letter-spacing: 2px;
}

.tagline {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.95;
  margin-top: var(--spacing-sm);
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero {
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
  padding: var(--spacing-2xl) 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary-dark);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--gray-dark);
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: white;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.btn-disabled {
  background-color: var(--gray-light);
  color: var(--gray-dark);
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-disabled:hover {
  background-color: var(--gray-light);
  box-shadow: none;
  transform: none;
}

.btn-large {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1.1rem;
}

/* ============================================================================
   Boards Section
   ============================================================================ */

.boards-section {
  padding: var(--spacing-2xl) 0;
  background-color: var(--gray-light);
}

.boards-section h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-dark);
  margin-bottom: var(--spacing-xl);
  font-size: 1.1rem;
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.board-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

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

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.board-header h3 {
  font-size: 1.3rem;
  color: var(--primary);
  flex: 1;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-live {
  background-color: #d4edda;
  color: #155724;
}

.badge-coming {
  background-color: #fff3cd;
  color: #856404;
}

.board-description {
  color: var(--gray-dark);
  flex-grow: 1;
}

.board-features {
  list-style: none;
  padding: 0;
}

.board-features li {
  padding: 0.25rem 0;
  color: var(--gray-dark);
  font-size: 0.95rem;
}

/* ============================================================================
   Admin Section
   ============================================================================ */

.admin-section {
  padding: var(--spacing-2xl) 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.admin-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
  justify-items: center;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .admin-content {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.admin-section h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.admin-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.admin-section > .container > .admin-content > .admin-text > p {
  font-size: 1.05rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.95;
  text-align: center;
  max-width: 600px;
}

.admin-roles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  justify-content: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .admin-roles {
    grid-template-columns: 1fr;
  }
}

.role-card {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  backdrop-filter: blur(10px);
}

.role-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-sm);
  color: white;
}

.role-card p {
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
  opacity: 0.9;
}

.role-card ul {
  list-style: none;
  font-size: 0.9rem;
  padding: 0;
}

.role-card li {
  padding: 0.3rem 0;
  opacity: 0.85;
}

.role-card li:before {
  content: "✓ ";
  font-weight: bold;
  margin-right: 0.5rem;
  color: #00ff00;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  align-items: flex-end;
}

@media (max-width: 768px) {
  .admin-actions {
    align-items: stretch;
  }
}

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

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

.admin-hint {
  text-align: center;
  opacity: 0.85;
  font-size: 0.9rem;
}

/* ============================================================================
   About Section
   ============================================================================ */

.about-section {
  padding: var(--spacing-2xl) 0;
}

.about-section h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.about-card {
  text-align: center;
  padding: var(--spacing-lg);
}

.about-card h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: var(--spacing-md);
}

.about-card p {
  color: var(--gray-dark);
  line-height: 1.8;
}

/* ============================================================================
   FAQ Section
   ============================================================================ */

.faq-section {
  padding: var(--spacing-2xl) 0;
  background-color: var(--gray-light);
}

.faq-section h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.faq-item {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  color: var(--primary);
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

.faq-item p {
  color: var(--gray-dark);
  line-height: 1.8;
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer {
  background-color: #1a1a1a;
  color: white;
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-2xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
  margin-bottom: var(--spacing-md);
  color: var(--primary-light);
}

.footer-section p {
  color: var(--gray-medium);
  font-size: 0.95rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: var(--gray-medium);
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--gray-dark);
  padding-top: var(--spacing-lg);
  text-align: center;
  color: var(--gray-medium);
  font-size: 0.9rem;
}

.compliance-notice {
  margin-top: var(--spacing-md);
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
  .hero h2 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .logo {
    font-size: 1.5rem;
    gap: var(--spacing-sm);
  }
}

/* ============================================================================
   Features Section Styles
   ============================================================================ */

.features-section {
  background-color: var(--gray-light);
  padding: var(--spacing-2xl) 0;
}

.features-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
  color: var(--primary);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-dark);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-2xl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  perspective: 1000px;
}

/* Flip Card Styles */
.flip-card {
  background-color: transparent;
  width: 100%;
  height: 380px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease;
}

.flip-card-front {
  background-color: white;
  color: black;
  text-align: center;
}

.flip-card-back {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
  transform: rotateY(180deg);
}

.flip-card:hover .flip-card-front,
.flip-card:hover .flip-card-back {
  box-shadow: var(--shadow-lg);
}

.flip-card-front .feature-image {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gray-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
}

.flip-card-front h3 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-sm);
  color: var(--primary);
}

.flip-card-front p {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.4;
  margin-bottom: 0;
}

.flip-card-back h3 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-md);
  color: white;
  text-transform: uppercase;
  font-size: 1.2rem;
}

.flip-card-back .feature-list {
  list-style: none;
  font-size: 0.95rem;
  text-align: left;
  width: 100%;
  margin: 0;
  padding: 0;
}

.flip-card-back .feature-list li {
  padding: 0.5rem 0;
  color: white;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.flip-card-back .feature-list li:before {
  content: "✓ ";
  color: #00ff00;
  font-weight: bold;
  margin-right: 0.75rem;
  font-size: 1.1rem;
}

.feature-card {
  background-color: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-image {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gray-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-sm);
  color: var(--primary);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--gray-dark);
  line-height: 1.5;
  margin-bottom: var(--spacing-sm);
}

.feature-list {
  list-style: none;
  font-size: 0.9rem;
  text-align: left;
}

.feature-list li {
  padding: 0.25rem 0;
  color: var(--gray-dark);
}

.feature-list li:before {
  content: "✓ ";
  color: var(--success);
  font-weight: bold;
  margin-right: 0.5rem;
}

/* ============================================================================
   Form Mockups - Feature Card Visualizations
   ============================================================================ */

/* Mockup 1: Form Fields */
.form-mockup-1 {
  width: 80%;
  max-width: 100px;
}

.form-field {
  height: 10px;
  background-color: var(--gray-medium);
  border-radius: 2px;
  margin: 8px 0;
  animation: shimmer 1.5s infinite;
}

.form-button {
  height: 12px;
  background-color: var(--primary);
  border-radius: 2px;
  margin-top: 12px;
  animation: pulse 2s infinite;
}

/* Mockup 2: Dashboard Bars */
.form-mockup-2 {
  width: 90%;
  max-width: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 4px;
  height: 100%;
}

.chart-bar {
  width: 12px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 2px;
  animation: chartGrow 0.8s ease-out;
}

.chart-bar:nth-child(1) {
  height: 35%;
  animation-delay: 0.1s;
}

.chart-bar:nth-child(2) {
  height: 65%;
  animation-delay: 0.2s;
}

.chart-bar:nth-child(3) {
  height: 45%;
  animation-delay: 0.3s;
}

.chart-bar:nth-child(4) {
  height: 80%;
  animation-delay: 0.4s;
}

/* Mockup 3: Security Lock */
.form-mockup-3 {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary);
}

/* Mockup 4: Board Indicators */
.form-mockup-4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.board-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--primary);
  background-color: var(--primary-light);
}

/* ============================================================================
   Animations
   ============================================================================ */

@keyframes shimmer {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes chartGrow {
  from {
    height: 0;
  }
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 1200px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .flip-card {
    height: 350px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .tagline {
    font-size: 0.9rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .flip-card {
    height: 300px;
  }

  .boards-section h2,
  .admin-section h2,
  .about-section h2,
  .faq-section h2,
  .features-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .hero {
    padding: var(--spacing-lg) 0;
  }

  .boards-section,
  .admin-section,
  .about-section,
  .faq-section,
  .features-section {
    padding: var(--spacing-lg) 0;
  }

  .logo {
    font-size: 1.25rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
  .header,
  .footer,
  .admin-section {
    display: none;
  }

  body {
    background-color: white;
  }

  .btn {
    border: 1px solid var(--primary);
  }
}
