/* CSS Variables */
:root {
  --primary: #64748b;
  --primary-foreground: #ffffff;
  --secondary: #f59e0b;
  --secondary-foreground: #ffffff;
  --accent: #dc2626;
  --accent-foreground: #ffffff;
  --background: #fafafa;
  --foreground: #18181b;
  --card: #ffffff;
  --card-foreground: #18181b;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #64748b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --font-family: 'Open Sans', sans-serif;
  --radius: 0.5rem;
}

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

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

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

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

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* Container */
.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.3;
}

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

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin: 0 0 1rem 0;
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--secondary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.08);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary);
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.btn-outline-white {
  background: transparent;
  color: white;
  padding: 0.75rem 1.5rem;
  border: 2px solid white;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

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

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

/* Form Elements */
.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  font-family: var(--font-family);
  font-size: 1rem;
  background: var(--card);
  color: var(--card-foreground);
}

.form-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.2);
}

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

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

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

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

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

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

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

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

.nexorvexil-top_mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nexorvexil-top_mobile-menu-content {
  text-align: center;
}

.nexorvexil-top_mobile-menu-link {
  display: block;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nexorvexil-top_mobile-menu-link:hover {
  color: var(--secondary);
  text-decoration: none;
}

/* Hero Section */
.hero {
  background: var(--primary);
  color: white;
  padding: 5rem 0;
}

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

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

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

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

.hero-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 5rem 0;
  text-align: center;
}

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

.cta-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Sections */
section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.page-header {
  background: var(--muted);
  text-align: center;
  padding: 3rem 0;
}

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

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

/* Newsletter Section */
.newsletter-section {
  background: var(--card);
}

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

.newsletter-form {
  display: flex;
  gap: 1rem;
}

.newsletter-input {
  flex: 1;
}

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

/* Partners Section */
.partners-section {
  text-align: center;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.partner-item {
  text-align: center;
}

.partner-item p {
  font-weight: 600;
  margin-top: 1rem;
}

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

/* About Preview */
.about-preview {
  background: var(--card);
}

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

.about-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

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

/* Stats Section */
.stats-section {
  text-align: center;
}

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

.stat-item {
  text-align: center;
}

.stat-item h3 {
  margin: 1rem 0 0.5rem 0;
}

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

/* Services Accordion */
.services-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  cursor: pointer;
  background: var(--card);
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.accordion-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.accordion-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: none;
}

.accordion-content.active {
  display: block;
}

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

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

.service-cta {
  margin-top: 1.5rem;
}

/* Company Story */
.company-story {
  background: var(--card);
}

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

.story-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

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

/* Mission and Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.value-item {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}

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

/* Team Section */
.team-section {
  background: var(--muted);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.team-member {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}

.member-avatar {
  margin-bottom: 1rem;
}

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

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

/* Achievements */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.achievement-item {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}

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

/* Contact Page */
.contact-info-bar {
  background: var(--muted);
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-info-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.contact-info-text p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

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

/* Contact Form */
.nexorvexil-top_contact-form-content {
  max-width: 800px;
  margin: 0 auto;
}

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

.nexorvexil-top_contact-form {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

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

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

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

.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  font-family: var(--font-family);
  font-size: 1rem;
  background: var(--card);
  color: var(--card-foreground);
}

.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  font-family: var(--font-family);
  font-size: 1rem;
  background: var(--card);
  color: var(--card-foreground);
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.125rem;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
}

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

/* Success Message */
.success-message {
  background: #dcfce7;
  border: 1px solid #16a34a;
  color: #15803d;
  padding: 2rem;
  border-radius: var(--radius);
  margin-top: 2rem;
  text-align: center;
}

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

.success-content h3 {
  margin: 0;
  color: #15803d;
}

.success-content p {
  margin: 0;
}

/* Additional Contact Methods */
.additional-contact {
  background: var(--muted);
}

.contact-methods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.contact-method {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}

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

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

.legal-content h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.last-updated {
  color: var(--muted-foreground);
  font-style: italic;
  margin-bottom: 2rem;
}

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

.legal-content ul {
  margin: 1rem 0;
  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: 0 2px 8px rgba(0,0,0,0.08);
}

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

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

.footer a {
  color: rgba(255,255,255,0.85);
}

.footer a:hover {
  color: white;
}

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

.footer-column h3,
.footer-column h4 {
  margin-bottom: 1rem;
  color: white;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  flex-wrap: wrap;
  gap: 1rem;
}

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

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

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

.nexorvexil-top_cookie-banner-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  gap: 2rem;
}

.nexorvexil-top_cookie-banner-text {
  flex: 1;
}

.nexorvexil-top_cookie-banner-text p {
  margin: 0;
  font-size: 0.875rem;
}

.nexorvexil-top_cookie-banner-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.nexorvexil-top_cookie-banner-actions button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .nexorvexil-top_cookie-banner-inner {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nexorvexil-top_cookie-banner-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Cookie Modal */
.nexorvexil-top_cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

.nexorvexil-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: 1rem;
}

.nexorvexil-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: 1.5rem 0;
}

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

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

.nexorvexil-top_cookie-toggle-row div {
  flex: 1;
}

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

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

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

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

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

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

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

/* Animation Classes */
.animate-slide-in {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-slide-left {
  opacity: 0;
  transform: translateX(-40px);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(40px);
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .cta-content h2 {
    font-size: 1.75rem;
  }
}

/* === CLASS ALIAS FIXES (injected by engine) === */
.hero-image { /* alias for .hero-img */ }
.hero-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.hero-text { /* alias for .hero-content */ }
.hero-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

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