/* CSS Variables */
:root {
  --primary: #6366F1;
  --primary-foreground: #FFFFFF;
  --secondary: #4F46E5;
  --secondary-foreground: #FFFFFF;
  --accent: #818CF8;
  --accent-foreground: #1E1B4B;
  --background: #F8FAFC;
  --foreground: #0F172A;
  --card: #FFFFFF;
  --card-foreground: #0F172A;
  --border: #E2E8F0;
  --input: #E2E8F0;
  --ring: #6366F1;
  --muted: #F1F5F9;
  --muted-foreground: #64748B;
  --font-family: 'Open Sans', sans-serif;
  --radius: 0.75rem;
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  margin: 0;
  padding: 0;
  overflow-wrap: break-word;
}

.hidden {
  display: none !important;
}

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

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 1rem 0;
}

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

a:hover {
  text-decoration: underline;
}

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

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

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

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border: 2px solid transparent;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--secondary);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 8px 8px 16px rgba(209, 209, 209, 0.3), -8px -8px 16px rgba(255, 255, 255, 0.8);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 8px 8px 16px rgba(209, 209, 209, 0.3), -8px -8px 16px rgba(255, 255, 255, 0.8);
}

.btn-outline-light {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

/* Icons */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: var(--muted);
  box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
  margin-bottom: 1rem;
}

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

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

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

.avatar-icon {
  width: 4rem;
  height: 4rem;
  color: var(--muted-foreground);
}

/* Header and Navigation */
.header {
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.navbar {
  padding: 1rem 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand .logo-img {
  height: 2rem;
  max-width: 100%;
  height: auto;
}

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

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

.nav-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.brivolanta-top_mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

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

.brivolanta-top_mobile-menu a {
  color: var(--foreground);
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 0;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(79, 70, 229, 0.9));
  display: flex;
  align-items: center;
}

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

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  .9;
}

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

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

/* Sections */
section {
  padding: 5rem 0;
  background: linear-gradient(180deg, var(--background) 0%, var(--muted) 100%);
}

section:nth-child(even) {
  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;
}

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

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

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.25rem;
  .9;
}

/* Cards */
.service-card,
.team-member,
.pricing-card,
.feature-item,
.process-step,
.achievement-card,
.category-card,
.comparison-feature {
  background: var(--card);
  color: var(--card-foreground);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  
  transform: translateY(20px);
}

.service-card:hover,
.team-member:hover,
.pricing-card:hover,
.achievement-card:hover,
.category-card:hover,
.comparison-feature:hover {
  transform: translateY(-5px);
  box-shadow: 12px 12px 24px #d1d1d1, -12px -12px 24px #ffffff;
}

.service-card.animate-in,
.team-member.animate-in,
.pricing-card.animate-in,
.feature-item.animate-in,
.process-step.animate-in,
.achievement-card.animate-in,
.category-card.animate-in,
.comparison-feature.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.service-features {
  margin: 1.5rem 0;
}

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

.service-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.service-features li:last-child {
  border-bottom: none;
}

/* Feature Items */
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-left: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.feature-content h4 {
  margin-bottom: 0.5rem;
}

.feature-content p {
  margin: 0;
  color: var(--muted-foreground);
}

/* Process Steps */
.process-step {
  text-align: center;
  position: relative;
}

.step-number {
  position: absolute;
  top: -1rem;
  right: -1rem;
  background: var(--primary);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

/* Team Members */
.member-avatar {
  text-align: center;
  margin-bottom: 1rem;
}

.member-role {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.member-expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.expertise-tag {
  background: var(--muted);
  color: var(--muted-foreground);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.team-cta {
  text-align: center;
  margin-top: 2rem;
}

/* CTA Sections */
.cta-section {
  background: var(--background);
  padding: 4rem 0;
}

.cta-card {
  background: var(--card);
  padding: 3rem;
  border-radius: var(--radius);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
}

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

.cta-content p {
  margin-bottom: 2rem;
  color: var(--muted-foreground);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

/* About Page Styles */
.story-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.rounded-image {
  border-radius: var(--radius);
}

.mission-card {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.value-content h4 {
  margin-bottom: 0.5rem;
}

.value-content p {
  margin: 0;
  color: var(--muted-foreground);
}

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

.brivolanta-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;
}

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

.form-input:focus {
  outline: none;
  border-color: var(--ring);
}

.contact-card {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
  height: fit-content;
}

.contact-details {
  margin-top: 2rem;
}

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

.contact-content h4 {
  margin-bottom: 0.5rem;
}

.contact-content p,
.contact-content address {
  margin: 0;
  font-style: normal;
}

.map-placeholder {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  margin-top: 2rem;
  border-left: 4px solid var(--primary);
  box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
}

.map-content {
  max-width: 300px;
  margin: 0 auto;
}

.success-message {
  background: #dcfce7;
  border: 1px solid #16a34a;
  color: #15803d;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 1rem;
}

.success-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.success-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #16a34a;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.success-content h3 {
  margin-bottom: 0.5rem;
  color: #15803d;
}

.success-content p {
  margin: 0;
}

/* Pricing Page Styles */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

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

.pricing-card.featured {
  transform: scale(1.05);
  border-left: 4px solid var(--accent);
}

.pricing-badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
}

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

.pricing-description {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.pricing-features {
  text-align: left;
  margin: 2rem 0;
}

.pricing-features h4 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.pricing-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.feature-icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.pricing-cta {
  margin-top: 2rem;
}

.faq-item-simple {
  margin-bottom: 1.5rem;
}

.faq-item-simple h4 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.faq-item-simple p {
  margin: 0;
  color: var(--muted-foreground);
}

/* FAQ Page Styles */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
  box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background: var(--muted);
}

.faq-question h3 {
  margin: 0;
  font-size: 1.125rem;
}

.faq-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.faq-toggle:hover {
  background: var(--muted);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--muted-foreground);
}

.faq-answer p {
  margin: 0;
}

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

.legal-content h1 {
  margin-bottom: 2rem;
}

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

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

.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

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

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

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

.cookie-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
}

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

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

.cookie-table tr:last-child td {
  border-bottom: none;
}

/* Footer */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 3rem 0 1rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
}

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

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

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

.footer-section address {
  font-style: normal;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
}

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

.legal-links {
  display: flex;
  gap: 1rem;
}

.legal-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.875rem;
}

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

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-legal {
    flex-direction: column;
    text-align: center;
  }
  
  .legal-links {
    justify-content: center;
  }
}

/* Cookie Consent Styles */
.brivolanta-top_cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  z-index: 1050;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

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

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

.brivolanta-top_cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brivolanta-top_cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brivolanta-top_cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.brivolanta-top_cookie-modal-content {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
}

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

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

.brivolanta-top_cookie-toggle-row:last-child {
  border-bottom: none;
}

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

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

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

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

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

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

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

@media (max-width: 768px) {
  .brivolanta-top_cookie-banner-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .brivolanta-top_cookie-banner-actions {
    justify-content: center;
  }
  
  .brivolanta-top_cookie-modal-actions {
    flex-direction: column;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
}

/* Animation Classes */
.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-card.featured {
    transform: none;
  }
}

/* === CLASS ALIAS FIXES (injected by engine) === */
.hero-text { /* alias for .hero-content */ }
.hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* === 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 */
#brivolanta-top_cookie-banner.hidden, #cookie-consent-banner.hidden { display: none !important; }
#brivolanta-top_cookie-banner:not(.hidden), #cookie-consent-banner:not(.hidden) { display: block !important; }
#brivolanta-top_cookie-modal.hidden { display: none !important; }
.hidden { display: none !important; }
