:root {
  --primary: #000000;
  --primary-foreground: #FFFFFF;
  --secondary: #16a34a;
  --secondary-foreground: #FFFFFF;
  --accent: #2563eb;
  --accent-foreground: #FFFFFF;
  --background: #FFFFFF;
  --foreground: #111827;
  --card: #FFFFFF;
  --card-foreground: #111827;
  --border: #E5E7EB;
  --input: #E5E7EB;
  --ring: #000000;
  --muted: #F3F4F6;
  --muted-foreground: #6B7280;
  --font-family: 'Open Sans', sans-serif;
  --radius: 0.5rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin: 0 0 1rem 0;
}

.text-primary {
  color: var(--primary);
}

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

.text-lg {
  font-size: 1.125rem;
}

.text-sm {
  font-size: 0.875rem;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.mb-4 {
  margin-bottom: 1rem;
}

/* Buttons */
.btn-primary,
.btn-outline {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--primary-foreground);
}

/* Icons */
.icon-box {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--primary-foreground);
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-md {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-lg {
  width: 2rem;
  height: 2rem;
}

/* Header */
.header {
  background: var(--background);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
}

.nav-logo {
  margin-bottom: 1rem;
}

.logo-img {
  height: 2.5rem;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--foreground);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.qorvalenix-top_mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.qorvalenix-top_mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.mobile-nav-link {
  text-decoration: none;
  color: var(--foreground);
  font-weight: 500;
  padding: 0.5rem 0;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .qorvalenix-top_mobile-menu-toggle {
    display: block;
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: var(--background);
  color: var(--foreground);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 0;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--muted-foreground);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Sections */
section {
  padding: 3rem 0;
}

section:nth-child(even) {
  background: linear-gradient(180deg, var(--background) 0%, var(--muted) 100%);
}

section:nth-child(odd) {
  background: linear-gradient(180deg, var(--muted) 0%, var(--background) 100%);
}

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

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--background), var(--muted));
  padding: 4rem 0;
  text-align: center;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

/* Cards */
.process-step,
.expertise-card,
.value-card,
.team-card,
.pricing-card,
.blog-card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.process-step.animate-in,
.expertise-card.animate-in,
.value-card.animate-in,
.team-card.animate-in,
.pricing-card.animate-in,
.blog-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.process-step:hover,
.expertise-card:hover,
.value-card:hover,
.team-card:hover,
.pricing-card:hover,
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.process-step h3,
.expertise-card h3,
.value-card h3,
.team-card h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Services Page */
.service-row {
  padding: 3rem 0;
}

.service-row-reverse .service-content {
  flex-direction: row-reverse;
}

.service-content {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.service-text {
  flex: 1;
}

.service-image {
  flex: 1;
}

.service-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  max-width: 100%;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .service-content,
  .service-row-reverse .service-content {
    flex-direction: column;
  }
}

/* Pricing Section */
.pricing-section {
  padding: 4rem 0;
}

.pricing-card {
  text-align: center;
  position: relative;
}

.pricing-card-featured {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, var(--background), var(--muted));
}

.pricing-header {
  margin-bottom: 2rem;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1rem 0;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  text-align: left;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* About Page */
.about-intro {
  padding: 3rem 0;
}

.about-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  max-width: 100%;
}

.story-timeline {
  padding: 4rem 0;
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.timeline-item {
  position: relative;
  padding-left: 5rem;
  margin-bottom: 3rem;
}

.timeline-marker {
  position: absolute;
  left: 1.25rem;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-marker i {
  color: var(--primary-foreground);
}

.timeline-content h3 {
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Contact Page */
.contact-section {
  padding: 4rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.qorvalenix-top_contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.contact-info h2 {
  margin-bottom: 2rem;
  color: var(--primary);
}

.contact-details {
  margin-bottom: 3rem;
}

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

.contact-content h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.contact-content a {
  color: var(--primary);
  text-decoration: none;
}

.contact-content a:hover {
  text-decoration: underline;
}

.contact-cta {
  background: linear-gradient(135deg, var(--muted), var(--background));
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-cta h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.location-section {
  padding: 3rem 0;
}

.location-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.location-card h3 {
  color: var(--primary);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Success Message */
.success-message {
  background: linear-gradient(135deg, var(--secondary), #22c55e);
  color: white;
  padding: 1rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Blog Page */
.blog-content {
  padding: 3rem 0;
}

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

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
}

.blog-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.blog-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
}

.blog-content-inner {
  padding: 1.5rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.blog-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: linear-gradient(135deg, var(--muted), var(--border));
  color: var(--foreground);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.blog-cta {
  background: linear-gradient(135deg, var(--background), var(--muted));
  padding: 4rem 0;
}

/* CTA Sections */
.cta {
  background: var(--background);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 3rem 0;
  margin: 2rem 0;
}

.newsletter {
  background: linear-gradient(135deg, var(--muted), var(--background));
  padding: 3rem 0;
}

.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Testimonials */
.testimonials {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--muted), var(--background));
}

.testimonial-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-quote {
  font-size: 1.5rem;
  font-style: italic;
  color: var(--foreground);
  margin-bottom: 2rem;
  position: relative;
}

.testimonial-quote::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary);
  position: absolute;
  left: -2rem;
  top: -1rem;
}

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

/* Legal Pages */
.legal-content {
  padding: 3rem 0;
}

.legal-text {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.legal-text h2 {
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.legal-text h3 {
  color: var(--secondary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-text ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

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

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

/* Cookie Table */
.cookie-table {
  overflow-x: auto;
  margin: 2rem 0;
}

.cookie-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cookie-table th,
.cookie-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cookie-table th {
  background: var(--muted);
  font-weight: 600;
  color: var(--primary);
}

/* Footer */
.footer {
  background: transparent;
  border-top: 1px solid var(--border);
  color: var(--foreground);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-info,
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

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

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

.footer-copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@media (max-width: 768px) {
  .footer-info,
  .footer-legal {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Cookie Banner */
.qorvalenix-top_cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 9999;
  padding: 1rem 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.qorvalenix-top_cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.qorvalenix-top_cookie-banner-text {
  flex: 1;
  min-width: 300px;
}

.qorvalenix-top_cookie-banner-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.qorvalenix-top_cookie-banner-actions button {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .qorvalenix-top_cookie-banner-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .qorvalenix-top_cookie-banner-actions {
    justify-content: center;
  }
}

/* Cookie Modal */
.qorvalenix-top_cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qorvalenix-top_cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.qorvalenix-top_cookie-modal-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.cookie-toggles {
  margin: 2rem 0;
}

.qorvalenix-top_cookie-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.qorvalenix-top_cookie-toggle-row:last-child {
  margin-bottom: 0;
}

.qorvalenix-top_cookie-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .qorvalenix-top_cookie-modal-overlay {
    padding: 1rem;
  }
  
  .qorvalenix-top_cookie-modal-actions {
    flex-direction: column;
  }
}

/* === BASELINE SAFETY CSS (injected by engine) === */

/* Ensure .hidden works consistently even with ID-specific overrides */
.hidden { display: none !important; }

/* Prevent content overflow breaking layout */
img, video, iframe { max-width: 100%; height: auto; }
* { box-sizing: border-box; }

/* Ensure container has responsive padding */
.container { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }

/* Prevent flex/grid children from overflowing */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive grid fallbacks */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Ensure forms don't break layout */
.form-input, input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%;
  max-width: 100%;
}

/* Success message styling */
.success-message {
  margin-top: 1rem;
  padding: 1rem;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 0.5rem;
  color: #065f46;
  text-align: center;
}

/* Stacking context for hero sections — prevents z-index:-1 children from going behind the page */
.hero, .hero-section, .page-header, .cta, .cta-section { isolation: isolate; position: relative; }

/* Desktop nav injected by engine — show on desktop, hide on mobile */
.nav-menu { display: flex; align-items: center; gap: 1.5rem; }
.nav-menu .nav-link { text-decoration: none; color: var(--foreground, #1f2937); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-menu .nav-link:hover { color: var(--primary, #2563eb); }
@media (max-width: 768px) {
  .nav-menu { display: none !important; }
}

/* Fixed header body padding safety */
body { min-height: 100vh; }

/* Prevent long words breaking layout */
h1, h2, h3, h4, p, li, td, th { overflow-wrap: break-word; word-wrap: break-word; }

/* === END BASELINE SAFETY CSS === */

/* Cookie banner visibility rules */
#qorvalenix-top_cookie-banner.hidden, #cookie-consent-banner.hidden { display: none !important; }
#qorvalenix-top_cookie-banner:not(.hidden), #cookie-consent-banner:not(.hidden) { display: block !important; }
#qorvalenix-top_cookie-modal.hidden { display: none !important; }
.hidden { display: none !important; }
