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

:root {
  --primary: #7B68A2;
  --primary-dark: #5D4E7A;
  --secondary: #A8D5BA;
  --accent: #F4E1C1;
  --text: #2D2D2D;
  --text-light: #5A5A5A;
  --white: #FFFFFF;
  --bg-light: #F9F7FC;
  --shadow: 0 4px 20px rgba(123, 104, 162, 0.15);
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--white);
}

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

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

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo span {
  color: var(--primary-dark);
}

/* Navigation */
.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-desktop a {
  color: var(--text);
  font-weight: 500;
  padding: 10px 0;
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  width: 100%;
}

/* Mobile Menu Button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 20px;
}

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

.nav-mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.nav-mobile a {
  display: block;
  color: var(--text);
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 8px;
  transition: background var(--transition);
}

.nav-mobile a:hover,
.nav-mobile a.active {
  background: var(--bg-light);
  color: var(--primary);
}

/* Main Content */
main {
  margin-top: 70px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--accent) 100%);
  padding: 60px 20px 80px;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 20px;
  line-height: 1.3;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

/* Sections */
section {
  padding: 60px 20px;
}

section h2 {
  font-size: 1.75rem;
  color: var(--primary-dark);
  margin-bottom: 30px;
  text-align: center;
}

/* Services */
.services-grid {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.service-card {
  background: var(--white);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
}

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

.service-card p {
  color: var(--text-light);
  margin-bottom: 15px;
}

.service-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Features */
.features {
  background: var(--bg-light);
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.feature-item {
  text-align: center;
  padding: 25px;
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-item h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
}

/* Testimonials */
.testimonials {
  background: var(--white);
}

.testimonials-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.testimonial {
  background: var(--bg-light);
  border-radius: 16px;
  padding: 30px;
  position: relative;
}

.testimonial::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.2;
  position: absolute;
  top: 10px;
  left: 20px;
  line-height: 1;
}

.testimonial p {
  color: var(--text);
  font-style: italic;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary-dark);
}

/* About */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-light);
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 12px;
}

.value-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.value-item h4 {
  color: var(--primary-dark);
  margin-bottom: 5px;
}

.value-item p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Contact */
.contact-section {
  background: var(--bg-light);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.contact-icon {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
}

.contact-item h3 {
  color: var(--primary-dark);
  font-size: 1rem;
  margin-bottom: 5px;
}

.contact-item p {
  color: var(--text-light);
}

/* Thank You Page */
.thank-you {
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
}

.thank-you-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 30px;
}

.thank-you h1 {
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.thank-you p {
  color: var(--text-light);
  max-width: 500px;
  margin-bottom: 30px;
}

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

.legal-content h1 {
  color: var(--primary-dark);
  margin-bottom: 30px;
  font-size: 2rem;
}

.legal-content h2 {
  color: var(--primary);
  font-size: 1.4rem;
  margin: 35px 0 15px;
  text-align: left;
}

.legal-content h3 {
  color: var(--primary-dark);
  font-size: 1.15rem;
  margin: 25px 0 12px;
}

.legal-content p {
  color: var(--text-light);
  margin-bottom: 15px;
}

.legal-content ul {
  margin: 15px 0 20px 25px;
  color: var(--text-light);
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  color: var(--text);
}

/* Footer */
footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 50px 20px 25px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.footer-brand p {
  opacity: 0.8;
  font-size: 0.95rem;
}

.footer-links h4 {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--white);
  opacity: 0.8;
  transition: opacity var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 20px;
  z-index: 9999;
  display: none;
}

.cookie-banner.active {
  display: block;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cookie-content p {
  color: var(--text);
  font-size: 0.95rem;
}

.cookie-content a {
  color: var(--primary);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
}

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

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

.cookie-btn-settings {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.cookie-btn-decline {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.cookie-btn-decline:hover {
  background: var(--text-light);
  color: var(--white);
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.cookie-modal.active {
  display: flex;
}

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

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

.cookie-modal-header h3 {
  color: var(--primary-dark);
  font-size: 1.25rem;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 5px;
  line-height: 1;
}

.cookie-modal-close:hover {
  color: var(--text);
}

.cookie-option {
  padding: 15px 0;
  border-bottom: 1px solid var(--bg-light);
}

.cookie-option:last-of-type {
  border-bottom: none;
}

.cookie-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cookie-option-header h4 {
  color: var(--text);
  font-size: 1rem;
}

.cookie-option p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.cookie-toggle {
  position: relative;
  width: 50px;
  height: 26px;
}

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

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 26px;
  transition: var(--transition);
}

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

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

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

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

/* Desktop Styles */
@media (min-width: 768px) {
  .nav-desktop {
    display: block;
  }

  .menu-toggle {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }

  .hero {
    padding: 100px 20px 120px;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero p {
    font-size: 1.25rem;
  }

  section {
    padding: 80px 20px;
  }

  section h2 {
    font-size: 2.25rem;
    margin-bottom: 50px;
  }

  .services-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .service-card {
    flex: 1 1 calc(50% - 15px);
    min-width: 280px;
  }

  .features-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .feature-item {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 250px;
  }

  .testimonials-container {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .testimonial {
    flex: 1 1 calc(50% - 15px);
    min-width: 280px;
  }

  .about-content {
    flex-direction: row;
  }

  .about-text {
    flex: 1;
  }

  .about-values {
    flex: 1;
  }

  .contact-info {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .contact-item {
    flex: 1 1 calc(50% - 10px);
    min-width: 280px;
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }

  .footer-brand {
    flex: 1;
    max-width: 350px;
  }

  .footer-links {
    display: flex;
    gap: 60px;
  }

  .cookie-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-content p {
    flex: 1;
    margin-right: 20px;
  }

  .cookie-buttons {
    flex-shrink: 0;
  }
}

@media (min-width: 1024px) {
  .service-card {
    flex: 1 1 calc(33.333% - 20px);
  }

  .testimonial {
    flex: 1 1 calc(33.333% - 20px);
  }

  .contact-item {
    flex: 1 1 calc(25% - 15px);
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
