/* ==========================================================================
   Kauffeld Enterprises, Inc. - Main Stylesheet
   ========================================================================== */

/* CSS Variables */
:root {
  --primary: #1e3a5f;
  --primary-light: #2d5a87;
  --primary-dark: #0f1f33;
  --accent: #e67e22;
  --accent-hover: #d35400;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --success: #22c55e;
  --error: #ef4444;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --header-height: 80px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--gray-700);
  background-color: var(--white);
  padding-top: var(--header-height);
}

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

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

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

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray-600);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section */
.section {
  padding: 5rem 0;
}

.section-gray {
  background-color: var(--gray-50);
}

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

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.9);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  z-index: 10000;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

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

.logo-text span:first-child {
  font-size: 1rem;
  color: var(--gray-900);
}

.logo-text span:last-child {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: block;
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--gray-100);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  cursor: pointer;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  transition: all var(--transition);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

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

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

.btn-white:hover {
  background: var(--gray-100);
  color: var(--primary-dark);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-full {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  color: var(--white);
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-audience {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.8);
}

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

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.service-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--gray-200);
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-content {
  padding: 1.5rem;
}

.service-content h3 {
  margin-bottom: 0.75rem;
}

.service-content p {
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  margin-bottom: 1.5rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: var(--white);
}

.feature-card h3 {
  margin-bottom: 0.75rem;
}

.feature-card p {
  margin-bottom: 0;
}

/* Forms */
.form-wrapper {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  margin: 0 auto;
}

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

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

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

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--gray-800);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-400);
}

.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='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 3rem;
}

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

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-checkbox label {
  font-size: 0.875rem;
  color: var(--gray-600);
  cursor: pointer;
}

.form-checkbox label a {
  color: var(--primary);
  text-decoration: underline;
}

.form-error {
  color: var(--error);
  font-size: 0.8125rem;
  margin-top: 0.5rem;
  display: none;
}

.form-input.error,
.form-textarea.error,
.form-select.error {
  border-color: var(--error);
}

.form-input.error + .form-error,
.form-textarea.error + .form-error,
.form-select.error + .form-error {
  display: block;
}

.form-success {
  background: #dcfce7;
  color: #166534;
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  text-align: center;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

.contact-text h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-text p,
.contact-text a {
  color: var(--gray-600);
  margin: 0;
}

/* Business Hours */
.hours-list {
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 2rem;
}

.hours-list h4 {
  margin-bottom: 1rem;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.hours-row:last-child {
  border-bottom: none;
}

.hours-row span:first-child {
  font-weight: 500;
}

.hours-row span:last-child {
  color: var(--gray-600);
}

/* Map */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
}

.map-container iframe {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
}

/* Footer */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-brand p {
  margin-bottom: 1.5rem;
}

.footer-column h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--gray-400);
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  color: var(--primary-light);
}

.footer-disclaimer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--gray-800);
  border-bottom: 1px solid var(--gray-800);
  margin-bottom: 1.5rem;
}

.footer-disclaimer p {
  font-size: 0.8125rem;
  margin: 0;
}

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

.footer-bottom p {
  font-size: 0.875rem;
  margin: 0;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gray-900);
  color: var(--white);
  padding: 1.25rem 1.5rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform var(--transition);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-text h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cookie-text p {
  font-size: 0.875rem;
  color: var(--gray-400);
  margin: 0;
}

.cookie-text a {
  color: var(--accent);
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.cookie-btn-accept {
  background: var(--accent);
  color: var(--white);
}

.cookie-btn-accept:hover {
  background: var(--accent-hover);
}

.cookie-btn-reject {
  background: var(--gray-700);
  color: var(--white);
}

.cookie-btn-reject:hover {
  background: var(--gray-600);
}

.cookie-btn-customize {
  background: transparent;
  color: var(--gray-300);
  border: 1px solid var(--gray-600);
}

.cookie-btn-customize:hover {
  background: var(--gray-800);
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.cookie-modal.visible {
  opacity: 1;
  visibility: visible;
}

.cookie-modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.cookie-modal-header h3 {
  margin: 0;
}

.cookie-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--gray-600);
  transition: all var(--transition);
}

.cookie-modal-close:hover {
  background: var(--gray-200);
}

.cookie-category {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cookie-category-header label {
  font-weight: 600;
  color: var(--gray-800);
}

.cookie-always-on {
  font-size: 0.75rem;
  background: var(--gray-200);
  color: var(--gray-600);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

.cookie-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray-300);
  border-radius: 24px;
  transition: var(--transition);
}

.cookie-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--transition);
}

.cookie-switch input:checked + .cookie-slider {
  background: var(--primary);
}

.cookie-switch input:checked + .cookie-slider::before {
  transform: translateX(20px);
}

.cookie-category p {
  font-size: 0.8125rem;
  margin: 0;
}

.cookie-modal-footer {
  margin-top: 1.5rem;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 4rem 0;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Legal Pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h2 {
  margin-top: 2rem;
}

.legal-content h3 {
  margin-top: 1.5rem;
}

.legal-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
  list-style: disc;
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-brand {
    grid-column: 1 / -1;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    gap: 0;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 999;
  }
  
  .nav-list.open {
    transform: translateX(0);
  }
  
  .nav-link {
    font-size: 1.25rem;
    padding: 1rem 2rem;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-image {
    order: -1;
    max-width: 80%;
    margin: 0 auto;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
  }
  
  .form-wrapper {
    padding: 1.5rem;
  }
  
  .cookie-buttons {
    flex-direction: column;
  }
  
  .cookie-btn {
    width: 100%;
  }
}
