/* ===== CSS VARIABLES ===== */
:root {
  /* Colors - Dark Theme (Default) */
  --bg-primary: #0a0f14;
  --bg-secondary: #111920;
  --bg-card: #161f29;
  --bg-card-hover: #1c2734;
  --accent: #DC213C;
  --accent-hover: #b71c32;
  --accent-dim: rgba(220, 33, 60, 0.15);
  --accent-glow: rgba(220, 33, 60, 0.4);
  --text-primary: #f0f4f8;
  --text-secondary: #8b9eb3;
  --text-muted: #5a6d7e;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-primary: 'Plus Jakarta Sans', 'Varela Round', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Varela Round', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f8f9fb;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f2f5;
  --text-primary: #1a1f26;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
  -webkit-font-smoothing: antialiased;
}

/* Fixed Grid Pattern Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(220, 33, 60, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 33, 60, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(220, 33, 60, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 33, 60, 0.04) 1px, transparent 1px);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--accent-hover);
}

.highlight {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-xl) 0;
  scroll-margin-top: 80px;
  position: relative;
  z-index: 1;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-sm) 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(17, 25, 32, 0.95);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.95);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.logo img {
  height: 40px;
  width: auto;
  transition: var(--transition);
}

.logo:hover img {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Navigation Buttons Container */
.nav-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  transform: scale(1.1);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
}

.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

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

/* ===== HERO SECTION ===== */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow-x: clip; /* Prevent horizontal scroll without creating scroll container */
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
  z-index: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* Scrolling Logo Background */
.logo-scroll-top,
.logo-scroll-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100px; /* Container height for vertical centering */
  display: flex;
  align-items: center; /* Center the scroll row vertically */
  opacity: 0.75;
  z-index: 0; /* Background layer */
  pointer-events: none; /* Disable for container */
}

.logo-scroll-top {
  top: 0; /* Pin to top edge of hero */
}

.logo-scroll-bottom {
  bottom: 0; /* Pin to bottom edge of hero */
}

.scroll-logo-link {
  display: inline-block;
  pointer-events: auto; /* Re-enable for links */
  transition: transform 0.3s ease;
  flex-shrink: 0;
  position: relative; /* Enable absolute positioning for tooltip */
}

.scroll-logo-link:hover {
  transform: scale(1.15);
}

.scroll-logo-link:hover .scroll-logo {
  opacity: 1;
}

.logo-scroll-row {
  width: 100%;
  overflow: hidden; /* Hide horizontal scrolling animation */
  position: relative;
  pointer-events: auto;
  height: 70px; /* Space for 50px logo scaled to 57.5px + padding */
  display: flex; /* Enable flexbox */
  align-items: center; /* Center the track vertically */
}

.logo-scroll-track {
  display: flex;
  gap: 6rem;
  align-items: center;
  width: fit-content;
  height: 100%; /* Fill the row height for proper centering */
  will-change: transform;
  pointer-events: auto;
}

.logo-scroll-left .logo-scroll-track {
  animation: scrollLeft 60s linear infinite;
}

.logo-scroll-right .logo-scroll-track {
  animation: scrollRight 60s linear infinite;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-100% / 3)); }
}

@keyframes scrollRight {
  0% { transform: translateX(calc(-100% / 3)); }
  100% { transform: translateX(0); }
}

.scroll-logo {
  height: 50px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  opacity: 1;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .scroll-logo {
  opacity: 1;
}

@media (max-width: 768px) {
  .logo-scroll-track {
    gap: 4rem;
  }

  .scroll-logo {
    height: 40px;
    max-width: 100px;
  }

  .logo-scroll-row {
    height: 60px; /* Reduced - no tooltip space needed */
  }

  .logo-scroll-top,
  .logo-scroll-bottom {
    height: 80px; /* Smaller container for mobile */
  }

  .hero-content {
    padding-bottom: 4rem; /* More aggressive push on mobile */
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 5rem; /* Push button higher - increased from 3rem */
}

.hero-content h1 {
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--accent-glow);
  color: white;
}

/* ===== SERVICES SECTION ===== */
.services {
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.service-card {
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: var(--transition);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-dim);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}

.service-card h2 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-sm);
}

.service-card p {
  font-size: 1rem;
}

/* ===== PORTFOLIO SECTION ===== */

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-header h2 {
  margin-bottom: var(--spacing-sm);
}

.section-header p {
  font-size: 1.125rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.portfolio-card {
  background: var(--bg-card);
  padding: var(--spacing-md);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.portfolio-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.portfolio-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.portfolio-card h3 {
  margin-bottom: var(--spacing-sm);
  font-size: 1.5rem;
}

.portfolio-cta {
  text-align: center;
  padding: var(--spacing-md);
}

/* Portfolio Preview Cards (Main Site) */
.portfolio-preview-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

/* Force small tech logo sizing on preview cards */
#portfolio-preview-grid .portfolio-tech-tag {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  border-radius: 6px !important;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border) !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

#portfolio-preview-grid .portfolio-tech-tag img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  object-fit: contain !important;
  display: block !important;
}

.portfolio-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portfolio-card-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.portfolio-card-type {
  color: var(--accent);
  font-weight: 600;
}

.portfolio-card-date {
  color: var(--text-secondary);
}

.portfolio-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.n8n-badge {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.2);
}

.portfolio-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-md);
  gap: 1rem;
}

.portfolio-tech-stack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.portfolio-tech-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
  overflow: hidden;
}

.portfolio-tech-tag:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

.portfolio-tech-tag img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px;
  max-height: 20px;
  object-fit: contain;
  display: block;
}

.portfolio-view-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: var(--transition);
}

.portfolio-preview-card:hover .portfolio-view-link {
  transform: translateX(4px);
  display: inline-block;
}

/* ===== CONTACT SECTION ===== */
.contact {
  background: var(--bg-secondary);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--spacing-lg);
  align-items: start;
}

/* About Section */
.about-section {
  padding: var(--spacing-md);
}

.about-section h3 {
  margin-bottom: var(--spacing-md);
  font-size: 2rem;
}

.about-section h4 {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.about-section p {
  margin-bottom: var(--spacing-sm);
  line-height: 1.7;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: var(--spacing-sm) 0;
}

.about-list li {
  padding: 0.75rem 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.about-list strong {
  color: var(--accent);
  font-weight: 600;
}

.about-cta {
  margin-top: var(--spacing-md);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Form Section */
.form-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  padding: var(--spacing-md);
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center; /* Center the submit button */
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.form-group {
  margin-bottom: var(--spacing-sm);
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

/* Anti-spam honeypot - visually hidden but present in DOM */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.btn-loading {
  display: none;
}

button[type="submit"]:disabled .btn-text {
  display: none;
}

button[type="submit"]:disabled .btn-loading {
  display: inline;
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  display: none;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  text-align: center;
  font-weight: 500;
}

.form-message.success {
  display: block;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.form-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Contact Info - Now in horizontal layout under form */
.contact-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
}

.contact-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm);
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.contact-info-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-info-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.contact-info-item h4 {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.contact-info-item p,
.contact-info-item a {
  font-size: 0.9rem;
  margin: 0;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.footer-brand img {
  height: 50px;
  margin-bottom: var(--spacing-sm);
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--spacing-md);
}

.footer-column h4 {
  margin-bottom: var(--spacing-sm);
  font-size: 1rem;
}

.footer-column a,
.footer-column p {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== MODAL SYSTEM ===== */

/* Modal Overlay - Full screen container */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  animation: modalFadeIn 0.3s ease;
}

.modal.active {
  display: block;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dark overlay background */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

[data-theme="light"] .modal-overlay {
  background: rgba(0, 0, 0, 0.6);
}

/* Modal Container - The content box */
.modal-container {
  position: relative;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  margin: 5vh auto;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease;
  z-index: 10000;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* Close Button */
.modal-close {
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
  color: var(--text-secondary);
  padding: 0;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: scale(1.1);
}

.modal-close:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal-close svg {
  width: 24px;
  height: 24px;
}

/* Modal Body */
.modal-body {
  flex: 1;
  padding: var(--spacing-md);
  overflow-y: auto;
  position: relative;
  min-height: 500px;
}

/* Loading State */
.modal-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-secondary);
  font-size: 1.1rem;
  z-index: 1;
}

/* Calendly Iframe */
.calendly-iframe {
  width: 100%;
  min-height: 700px;
  border: none;
  border-radius: 8px;
  display: block;
  background: var(--bg-secondary);
}

.calendly-iframe.loaded {
  /* Iframe is always visible, this class is just for reference */
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    max-height: 95vh;
    margin: 2.5vh auto;
    border-radius: 12px;
  }

  .modal-header {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .modal-header h3 {
    font-size: 1.25rem;
  }

  .modal-body {
    padding: var(--spacing-sm);
    min-height: 400px;
  }

  .calendly-iframe {
    min-height: 600px;
  }
}

@media (max-width: 480px) {
  .modal-container {
    width: 100%;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .modal-header {
    padding: var(--spacing-sm);
  }

  .modal-body {
    min-height: 300px;
  }

  .calendly-iframe {
    min-height: 500px;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Navbar Mobile */
  .navbar .container {
    gap: 0.5rem;
  }

  .logo img {
    height: 32px;
  }

  /* Mobile Navigation */
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 70px);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    transition: right 0.3s ease;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
    z-index: 999;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
  }

  .nav-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
  }

  .theme-toggle {
    position: relative;
    z-index: 1001;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }

  .mobile-menu-toggle {
    display: flex !important;
    position: relative;
    z-index: 1001;
    padding: 0.4rem;
    flex-shrink: 0;
  }

  .mobile-menu-toggle span {
    width: 20px;
    height: 2px;
  }

  /* Hamburger Animation */
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

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

  /* Layout Adjustments */
  .hero {
    min-height: 80vh;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .service-card,
  .portfolio-card {
    padding: var(--spacing-md);
  }
}

/* ===== LEGAL PAGES ===== */
.legal-page {
  padding: var(--spacing-xl) 0;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 200px);
}

.legal-page .container {
  max-width: 860px;
}

.legal-header {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.legal-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--spacing-sm);
}

.legal-header .legal-updated {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  font-size: 1.2rem;
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-xs);
}

.legal-content p {
  margin-bottom: var(--spacing-sm);
  line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
  margin-bottom: var(--spacing-sm);
  padding-left: 1.5rem;
}

.legal-content li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

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

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--accent-hover);
}

.legal-content .legal-notice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 0 8px 8px 0;
  margin: var(--spacing-md) 0;
}

.legal-content .legal-notice p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.legal-contact {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.legal-contact h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

@media (max-width: 768px) {
  .legal-page {
    padding: var(--spacing-lg) 0;
  }

  .legal-content h2 {
    font-size: 1.3rem;
    margin-top: var(--spacing-md);
  }
}

/* ===== COMING SOON PAGE ===== */
.coming-soon-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.coming-soon-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

.coming-soon-content h1 {
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 0.8s ease-out;
}

.coming-soon-text {
  font-size: 1.35rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}
