/* Modern CSS Variables */
:root {
  /* Primary Colors */
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  
  /* Secondary Colors */
  --secondary-color: #64748b;
  --secondary-dark: #475569;
  --secondary-light: #94a3b8;
  
  /* Accent Colors */
  --accent-color: #10b981;
  --accent-dark: #059669;
  --accent-light: #34d399;
  
  /* Neutral Colors */
  --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;
  
  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  /* Border Colors */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Shadow */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Container - Grid System */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 640px) {
  .container {
    padding: 0 var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-8);
  }
}

/* Grid System */
.row {
  display: grid;
  gap: var(--space-6);
  width: 100%;
}

.col-1 { grid-template-columns: 1fr; }
.col-2 { grid-template-columns: repeat(2, 1fr); }
.col-3 { grid-template-columns: repeat(3, 1fr); }
.col-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive Grid */
@media (max-width: 768px) {
  .col-2,
  .col-3,
  .col-4 {
    grid-template-columns: 1fr;
  }
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--text-5xl);
  }
  
  h2 {
    font-size: var(--text-4xl);
  }
  
  h3 {
    font-size: var(--text-3xl);
  }
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

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

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

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  background-color: var(--primary-color);
  color: var(--white);
}

.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

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

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

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

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* Cards */
.card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: var(--space-6);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  height: 100%;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Header */
header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.logo {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-8);
  margin: 0;
  align-items: center;
  flex-wrap: wrap;
}

.nav-menu a {
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

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

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: var(--radius-full);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all var(--transition-fast);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    padding: var(--space-4);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu li {
    margin: var(--space-2) 0;
  }
  
  .nav-menu a {
    display: block;
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-fast);
  }
  
  .nav-menu a:hover {
    background-color: var(--bg-secondary);
  }
}

/* Hero Section */
.hero {
  padding: var(--space-20) 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-small {
  padding: var(--space-16) 0;
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  text-align: left;
}

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

.hero-img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  object-fit: cover;
}

/* Single column hero when no image */
.hero-wrapper:not(:has(.hero-image)) {
  grid-template-columns: 1fr;
  text-align: center;
}

.hero-wrapper:not(:has(.hero-image)) .hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-img {
    max-width: 100%;
    height: 250px;
    object-fit: cover;
  }
}

.hero-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: var(--text-6xl);
  }
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  font-weight: 500;
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

@media (max-width: 768px) {
  .hero-buttons {
    justify-content: center;
  }
}

/* Sections */
.section {
  padding: var(--space-20) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-12);
  font-size: var(--text-3xl);
  font-weight: 800;
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--text-4xl);
  }
}

/* Feature Cards */
.feature-card {
  text-align: center;
}

.feature-icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.feature-card h3 {
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Service Cards */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
  color: var(--primary-color);
}

.service-card h3 {
  margin-bottom: var(--space-3);
}

.service-description {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.service-features {
  list-style: none;
  margin-bottom: var(--space-6);
}

.service-features li {
  padding: var(--space-1) 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.service-features li::before {
  content: '✓';
  color: var(--accent-color);
  font-weight: bold;
  margin-right: var(--space-2);
}

.service-price {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  text-align: center;
}

.price-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.price-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-color);
}

.service-action {
  text-align: center;
  margin-top: auto;
}

/* Stats Section */
.stat-card {
  text-align: center;
  padding: var(--space-6);
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: var(--space-2);
}

.stat-label {
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Testimonials */
.testimonial-card {
  position: relative;
}

.testimonial-content {
  margin-bottom: var(--space-4);
}

.testimonial-content p {
  font-style: italic;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.author-avatar {
  width: 48px;
  height: 48px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.author-info h4 {
  margin-bottom: var(--space-1);
  font-size: var(--text-base);
}

.author-position,
.author-company {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.testimonial-rating {
  color: #fbbf24;
  font-size: var(--text-lg);
}

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

.step-number {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 auto var(--space-4);
}

.process-step h3 {
  margin-bottom: var(--space-3);
}

.process-step p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Contact Form */
.contact-form-section {
  background-color: var(--bg-primary);
  padding: var(--space-12);
  border-radius: var(--radius-2xl);
  margin-top: var(--space-12);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-3);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
  background-color: var(--bg-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Contact Methods */
.contact-method {
  text-align: center;
  padding: var(--space-6);
  background-color: var(--bg-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
}

.contact-method-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

.contact-method h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.contact-method-value {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: var(--space-2);
}

.contact-method-description {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--white);
  text-align: center;
  padding: var(--space-16);
  border-radius: var(--radius-2xl);
  margin: var(--space-20) 0;
}

.cta-content h2 {
  color: var(--white);
  margin-bottom: var(--space-4);
}

.cta-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}

.cta-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

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

.cta-section .btn:hover {
  background-color: var(--gray-100);
  transform: translateY(-2px);
}

.cta-section .btn-outline {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

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

/* Footer */
footer {
  background-color: var(--gray-900);
  color: var(--white);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
}

.footer-section p {
  color: var(--gray-400);
  margin-bottom: var(--space-3);
}

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

.footer-section ul li {
  margin-bottom: var(--space-2);
}

.footer-section ul li a {
  color: var(--gray-400);
  transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
  color: var(--white);
}

.contact-info p {
  margin-bottom: var(--space-2);
  color: var(--gray-400);
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: var(--space-8);
  text-align: center;
}

.footer-bottom p {
  color: var(--gray-400);
  margin-bottom: 0;
}

/* Cookie Notice */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--gray-900);
  color: var(--white);
  padding: var(--space-4);
  z-index: 1000;
  display: none;
}

.cookie-notice.show {
  display: block;
}

.cookie-notice-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.cookie-notice-text {
  flex: 1;
  min-width: 300px;
}

.cookie-notice-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.cookie-notice .btn {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out forwards;
}

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

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

/* Theme Variations */

/* MODERN THEME */
.modern-template {
  --primary-color: #2563eb;
  --accent-color: #10b981;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --text-primary: #0f172a;
  --border-radius: 12px;
}

.modern-template .hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.modern-template .card {
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border-radius: var(--border-radius);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-template .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.modern-template .btn {
  border-radius: 50px;
  padding: 12px 32px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* CLASSIC THEME */
.classic-template {
  --primary-color: #8b4513;
  --accent-color: #d4af37;
  --bg-primary: #fefdf8;
  --bg-secondary: #f9f7f1;
  --text-primary: #2c1810;
  --font-sans: 'Playfair Display', serif;
  --border-radius: 4px;
}

.classic-template body {
  font-family: var(--font-serif);
  background: linear-gradient(45deg, #fefdf8 25%, transparent 25%), 
              linear-gradient(-45deg, #fefdf8 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, #fefdf8 75%), 
              linear-gradient(-45deg, transparent 75%, #fefdf8 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.classic-template .hero {
  background: linear-gradient(rgba(139, 69, 19, 0.9), rgba(139, 69, 19, 0.9)), 
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  color: #fefdf8;
  text-align: center;
  padding: 80px 0;
}

.classic-template .card {
  background: #fefdf8;
  border: 2px solid #d4af37;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.classic-template .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d4af37, #8b4513, #d4af37);
}

.classic-template .btn {
  border-radius: var(--border-radius);
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  font-family: var(--font-serif);
  font-weight: 600;
  text-transform: capitalize;
}

.classic-template .btn:hover {
  background: var(--primary-color);
  color: #fefdf8;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

/* CREATIVE THEME */
.creative-template {
  --primary-color: #ff6b6b;
  --accent-color: #4ecdc4;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9ff;
  --text-primary: #2d3436;
  --border-radius: 25px;
}

.creative-template body {
  background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
  min-height: 100vh;
}

.creative-template .hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: skewY(-3deg);
  margin-top: -50px;
  padding: 100px 0 80px;
}

.creative-template .hero .container {
  transform: skewY(3deg);
}

.creative-template .card {
  background: white;
  border-radius: var(--border-radius);
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  transform: rotate(-1deg);
  transition: all 0.3s ease;
}

.creative-template .card:nth-child(even) {
  transform: rotate(1deg);
}

.creative-template .card:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.creative-template .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
}

.creative-template .btn {
  border-radius: 50px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border: none;
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.creative-template .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.creative-template .btn:hover::before {
  left: 100%;
}

/* PROFESSIONAL THEME */
.professional-template {
  --primary-color: #1a365d;
  --accent-color: #3182ce;
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --text-primary: #1a202c;
  --border-radius: 8px;
}

.professional-template body {
  background: #f7fafc;
  font-family: 'Inter', sans-serif;
}

.professional-template .hero {
  background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
  color: white;
  position: relative;
}

.professional-template .hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.professional-template .card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.professional-template .card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.15);
  transform: translateY(-2px);
}

.professional-template .btn {
  border-radius: var(--border-radius);
  background: var(--primary-color);
  border: none;
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  transition: all 0.2s ease;
}

.professional-template .btn:hover {
  background: var(--accent-color);
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

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

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

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
  .dark-theme {
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
  }
}

/* Sidebar Layout */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: start;
}

/* Three column layout with sidebars */
.content-wrapper.has-sidebars {
  grid-template-columns: 250px 1fr 250px;
}

/* Two column layout with left sidebar */
.content-wrapper.has-left-sidebar {
  grid-template-columns: 250px 1fr;
}

/* Two column layout with right sidebar */
.content-wrapper.has-right-sidebar {
  grid-template-columns: 1fr 250px;
}

.main-content-area {
  min-width: 0; /* Prevents overflow in grid */
}

.sidebar-left,
.sidebar-right {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Sidebar Styles */
.sidebar {
  background-color: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.sidebar h3 {
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--primary-color);
}

.sidebar-article {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-4);
  transition: background-color var(--transition-fast);
}

.sidebar-article:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.sidebar-article:hover {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.sidebar-article img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}

.sidebar-article h4 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

.sidebar-article p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-2);
}

.sidebar-article small {
  font-size: var(--text-xs);
  color: var(--text-light);
  font-weight: 500;
}

/* Responsive Sidebar Layout */
@media (max-width: 1200px) {
  .content-wrapper.has-sidebars {
    grid-template-columns: 200px 1fr 200px;
  }
  
  .content-wrapper.has-left-sidebar {
    grid-template-columns: 200px 1fr;
  }
  
  .content-wrapper.has-right-sidebar {
    grid-template-columns: 1fr 200px;
  }
}

@media (max-width: 1024px) {
  .content-wrapper.has-sidebars,
  .content-wrapper.has-left-sidebar,
  .content-wrapper.has-right-sidebar {
    grid-template-columns: 1fr;
  }
  
  .sidebar-left,
  .sidebar-right {
    position: static;
    max-height: none;
    order: 2;
  }
  
  .main-content-area {
    order: 1;
  }
}

@media (max-width: 768px) {
  .sidebar {
    padding: var(--space-4);
  }
  
  .sidebar-article {
    padding: var(--space-3);
  }
  
  .sidebar-article img {
    height: 100px;
  }
}

/* Print Styles */
@media print {
  .hero,
  .cta-section,
  footer,
  .btn,
  .sidebar-left,
  .sidebar-right {
    display: none;
  }
  
  .content-wrapper {
    grid-template-columns: 1fr !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ========================================
   UNIVERSAL SECTION STYLES
   ======================================== */

/* CSS Variables for Universal Sections */
:root {
  /* Section Variables */
  --section-bg: var(--bg-secondary);
  --section-padding: var(--space-20);
  --section-padding-mobile: var(--space-16);
  
  /* Container Variables */
  --container-max-width: 1200px;
  --container-gap: 2rem;
  --container-gap-mobile: 1.5rem;
  
  /* Card Variables */
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
  --card-border-radius: var(--radius-xl);
  --card-padding: var(--space-6);
  --card-min-width: 200px;
  
  /* Animation Variables */
  --animation-duration: 0.3s;
  --animation-easing: ease-in-out;
  --fade-distance: 20px;
}

/* ========================================
   BASE SECTION STYLES
   ======================================== */

/* Universal Section Base */
.section {
  padding: var(--section-padding) var(--space-4);
  background: var(--section-bg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section.alt-bg {
  background: var(--bg-primary);
}

.section.dark-bg {
  background: var(--gray-900);
  color: var(--white);
}

.section.gradient-bg {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--white);
}

/* Section Headers */
.section-header {
  max-width: 800px;
  margin: 0 auto var(--space-12);
  text-align: center;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
}

.section.dark-bg .section-title,
.section.gradient-bg .section-title {
  color: var(--white);
}

.section.dark-bg .section-subtitle,
.section.gradient-bg .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   UNIVERSAL CONTAINER STYLES
   ======================================== */

/* Base Container Pattern */
[class$="-container"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--container-gap);
  max-width: var(--container-max-width);
  margin: 0 auto;
  width: 100%;
}

/* Grid Layout Containers */
[class$="-container"].grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--card-min-width), 1fr));
  align-items: start;
}

/* Specific Container Layouts */
.stats-container,
.features-container,
.services-container,
.team-container,
.testimonials-container,
.process-container,
.benefits-container,
.portfolio-container,
.pricing-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--card-min-width), 1fr));
  gap: var(--container-gap);
  max-width: var(--container-max-width);
  margin: 0 auto;
  align-items: start;
}

/* Two Column Layouts */
.about-container,
.contact-methods-container {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Three Column Layouts */
.features-container,
.services-container {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Four Column Layouts */
.stats-container,
.team-container {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Single Column on Mobile */
@media (max-width: 768px) {
  [class$="-container"] {
    grid-template-columns: 1fr !important;
    gap: var(--container-gap-mobile);
  }
}

/* ========================================
   UNIVERSAL CARD STYLES
   ======================================== */

/* Base Card Pattern */
[class$="-card"] {
  background: var(--bg-primary);
  border-radius: var(--card-border-radius);
  padding: var(--card-padding);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: all var(--animation-duration) var(--animation-easing);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  
  /* Animation Initial State */
  opacity: 0;
  transform: translateY(var(--fade-distance));
}

/* Card Hover Effects */
[class$="-card"]:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-color);
}

/* Card Visible State (for animations) */
[class$="-card"].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card Animation Delays */
[class$="-card"]:nth-child(1) { transition-delay: 0.1s; }
[class$="-card"]:nth-child(2) { transition-delay: 0.2s; }
[class$="-card"]:nth-child(3) { transition-delay: 0.3s; }
[class$="-card"]:nth-child(4) { transition-delay: 0.4s; }
[class$="-card"]:nth-child(5) { transition-delay: 0.5s; }
[class$="-card"]:nth-child(6) { transition-delay: 0.6s; }

/* ========================================
   SPECIFIC SECTION IMPLEMENTATIONS
   ======================================== */

/* Stats Section */
.section.stats-section {
  background: var(--bg-primary);
  padding: var(--section-padding) var(--space-4);
}

.stats-container {
  --card-min-width: 200px;
}

.stat-card {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border: none;
}

.stat-card .stat-number {
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
  display: block;
}

.stat-card .stat-label {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

/* Features Section */
.section.features-section {
  background: var(--bg-secondary);
}

.features-container {
  --card-min-width: 280px;
}

.feature-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.feature-card .feature-icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  color: var(--primary-color);
}

.feature-card h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* Services Section */
.section.services-section {
  background: var(--bg-primary);
}

.services-container {
  --card-min-width: 300px;
}

.service-card {
  padding: var(--space-8) var(--space-6);
  text-align: left;
}

.service-card .service-icon {
  font-size: var(--text-3xl);
  color: var(--primary-color);
  margin-bottom: var(--space-4);
}

.service-card h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.service-card .service-description {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
  flex-grow: 1;
}

.service-card .service-features {
  list-style: none;
  margin-bottom: var(--space-6);
}

.service-card .service-features li {
  padding: var(--space-1) 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.service-card .service-features li::before {
  content: '✓';
  color: var(--accent-color);
  font-weight: bold;
  margin-right: var(--space-2);
}

.service-card .service-action {
  margin-top: auto;
}

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

.team-container {
  --card-min-width: 250px;
}

.team-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.team-card .team-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  color: var(--primary-color);
}

.team-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.team-card .team-position {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
}

.team-card p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* Testimonials Section */
.section.testimonials-section {
  background: var(--bg-primary);
}

.testimonials-container {
  --card-min-width: 350px;
}

.testimonial-card {
  padding: var(--space-8) var(--space-6);
  text-align: left;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary-color);
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  opacity: 0.3;
  font-family: serif;
}

.testimonial-card .testimonial-content {
  margin-bottom: var(--space-6);
  padding-top: var(--space-4);
}

.testimonial-card .testimonial-content p {
  font-style: italic;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

.testimonial-card .testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-card .author-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  color: var(--primary-color);
  flex-shrink: 0;
}

.testimonial-card .author-info h4 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.testimonial-card .author-position {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0;
}

.testimonial-card .testimonial-rating {
  color: #fbbf24;
  font-size: var(--text-lg);
  margin-top: var(--space-2);
}

/* Process Section */
.section.process-section {
  background: var(--bg-secondary);
}

.process-container {
  --card-min-width: 250px;
}

.process-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  position: relative;
}

.process-card .step-number {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 auto var(--space-4);
}

.process-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.process-card p {
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* Portfolio Section */
.section.portfolio-section {
  background: var(--bg-primary);
}

.portfolio-container {
  --card-min-width: 300px;
}

.portfolio-card {
  padding: 0;
  overflow: hidden;
}

.portfolio-card .portfolio-image {
  width: 100%;
  height: 200px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  color: var(--primary-color);
}

.portfolio-card .portfolio-content {
  padding: var(--space-6);
}

.portfolio-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.portfolio-card .portfolio-category {
  color: var(--primary-color);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.portfolio-card p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* Pricing Section */
.section.pricing-section {
  background: var(--bg-secondary);
}

.pricing-container {
  --card-min-width: 280px;
}

.pricing-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary-color);
  border-width: 2px;
  transform: scale(1.05);
}

.pricing-card .pricing-header {
  margin-bottom: var(--space-6);
}

.pricing-card h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.pricing-card .price {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: var(--space-1);
}

.pricing-card .price-period {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.pricing-card .pricing-features {
  list-style: none;
  margin-bottom: var(--space-8);
  text-align: left;
}

.pricing-card .pricing-features li {
  padding: var(--space-2) 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.pricing-card .pricing-features li::before {
  content: '✓';
  color: var(--accent-color);
  font-weight: bold;
  margin-right: var(--space-2);
}

.pricing-card .pricing-action {
  margin-top: auto;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .section {
    padding: var(--section-padding-mobile) var(--space-4);
  }
  
  .section-title {
    font-size: var(--text-2xl);
  }
  
  .section-subtitle {
    font-size: var(--text-base);
  }
  
  [class$="-card"] {
    padding: var(--space-4);
  }
  
  .stat-card .stat-number {
    font-size: var(--text-3xl);
  }
  
  .feature-card .feature-icon {
    font-size: var(--text-3xl);
  }
  
  .team-card .team-avatar {
    width: 100px;
    height: 100px;
  }
  
  .process-card .step-number {
    width: 50px;
    height: 50px;
    font-size: var(--text-lg);
  }
  
  .pricing-card.featured {
    transform: none;
  }
}

/* ========================================
   ANIMATION UTILITIES
   ======================================== */

/* Intersection Observer Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(var(--fade-distance));
  transition: all 0.6s var(--animation-easing);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Animation for Cards */
.stagger-animation [class$="-card"]:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation [class$="-card"]:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation [class$="-card"]:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation [class$="-card"]:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation [class$="-card"]:nth-child(5) { transition-delay: 0.5s; }
.stagger-animation [class$="-card"]:nth-child(6) { transition-delay: 0.6s; }

/* Fade In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(var(--fade-distance));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s var(--animation-easing) forwards;
}

/* Scale In Animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-in {
  animation: scaleIn 0.4s var(--animation-easing) forwards;
}

/* Slide In Animation */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.6s var(--animation-easing) forwards;
}

.slide-in-right {
  animation: slideInRight 0.6s var(--animation-easing) forwards;
}

/* ===== ДОПОЛНЕНИЕ ДЛЯ РЕШЕНИЯ ПРОБЛЕМЫ "В СТОЛБИК" ===== */

/* Services Grid */
.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
  margin: var(--space-12) 0;
}

/* Features Grid */
.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin: var(--space-12) 0;
}

/* Stats Grid */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  margin: var(--space-12) 0;
}

/* Testimonials Grid */
.testimonials-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-6);
  margin: var(--space-12) 0;
}

/* Content Sections Grid (для index.ejs) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* Contact Methods Grid */
.contact-methods-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  margin: var(--space-12) 0;
}

/* Responsive для всех Grid контейнеров */
@media (max-width: 768px) {
  .services-container,
  .features-container,
  .stats-container,
  .testimonials-container,
  .contact-methods-container {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* Additional utility classes for better flexibility */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-up:nth-child(1) { animation-delay: 0.1s; }
.animate-fade-up:nth-child(2) { animation-delay: 0.2s; }
.animate-fade-up:nth-child(3) { animation-delay: 0.3s; }
.animate-fade-up:nth-child(4) { animation-delay: 0.4s; }
.animate-fade-up:nth-child(5) { animation-delay: 0.5s; }
.animate-fade-up:nth-child(6) { animation-delay: 0.6s; }

/* ===== ИСПРАВЛЕНИЯ CTA БЛОКА ===== */

/* CTA секция - улучшенный контраст */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #ffffff !important; /* Принудительно белый текст */
  text-align: center;
  padding: var(--space-16);
  border-radius: var(--radius-2xl);
  margin: var(--space-20) 0;
  position: relative;
  overflow: hidden;
}

/* Дополнительный overlay для лучшего контраста */
.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2); /* Темная подложка */
  z-index: 1;
}

.cta-section * {
  position: relative;
  z-index: 2;
  color: #ffffff !important; /* Все элементы белым */
}

.cta-content h2 {
  color: #ffffff !important;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Тень для читаемости */
}

.cta-content p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* CTA кнопки с улучшенным контрастом */
.cta-section .btn {
  background-color: #ffffff !important;
  color: var(--primary-color) !important;
  border: 2px solid #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cta-section .btn:hover {
  background-color: rgba(255, 255, 255, 0.9) !important;
  color: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.cta-section .btn-outline {
  background-color: transparent !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

.cta-section .btn-outline:hover {
  background-color: #ffffff !important;
  color: var(--primary-color) !important;
}

/* ===== ИСПРАВЛЕНИЕ BOXED ЭФФЕКТА ===== */

/* Убрать ограничения ширины и сделать полноширинный дизайн */
body {
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Полноширинные контейнеры */
.container {
  max-width: 100%; /* Убрать ограничение */
  margin: 0;
  padding: 0 var(--space-4);
}

/* Для контентных секций - ограничить внутренний контент */
.section .container {
  max-width: 1200px; /* Контент в разумных пределах */
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Header полной ширины */
header {
  width: 100%;
  margin: 0;
  padding: 0;
}

header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Hero секция полной ширины */
.hero {
  width: 100%;
  margin: 0;
}

/* Footer полной ширины */
footer {
  width: 100%;
  margin: 0;
}

/* CTA секция полной ширины с внутренним контейнером */
.cta-section {
  width: 100vw; /* Полная ширина viewport */
  margin-left: calc(50% - 50vw); /* Выход за границы контейнера */
  margin-right: calc(50% - 50vw);
}

.cta-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Убрать возможные скрытые сайдбары */
.sidebar,
.sidebar-left,
.sidebar-right,
.has-sidebar,
.has-left-sidebar,
.has-right-sidebar {
  display: none !important;
}

/* Основной контент на всю ширину */
.main-content,
.main-content-area,
.content-wrapper {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Страничный лейаут без сайдбаров */
.page-layout {
  display: block !important;
  grid-template-columns: 1fr !important;
}

/* Services, Features, Stats на всю ширину */
.services-section,
.features-section,
.stats-section {
  width: 100%;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-8);
  }
  
  .section .container {
    padding: 0 var(--space-8);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-12);
  }
  
  .section .container {
    padding: 0 var(--space-12);
  }
}

/* Убрать любые фиксированные ширины, которые создают boxed эффект */
#main,
#content,
#wrapper,
.site,
.site-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ===== */

/* Убрать центрирование body если есть */
html, body {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Полноширинные фоновые секции */
.hero,
.cta-section,
.stats-section {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Вернуть внутренний контент в разумные границы */
.hero .container,
.cta-section .container,
.stats-section .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  left: auto;
  right: auto;
}

/* Убрать любые box-shadow или border, создающие boxed эффект */
body {
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
}

/* Темы - убрать boxed стили */
.modern-template,
.classic-template, 
.creative-template,
.professional-template {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
}