/* 
 * Crane Management - Main Stylesheet
 * Author: J.Sun
 * Date: 2025-08-02
 * Description: Modern, minimalist design with dynamic backgrounds
 */

/* ===== CSS CUSTOM PROPERTIES (VARIABLES) ===== */
:root {
  /* Colors - Futuristic Scientific Theme */
  --primary-color: #00d4ff;
  --primary-hover: #00b8e6;
  --accent-color: #8b5cf6;
  --accent-secondary: #06ffa5;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-dark: #1e293b;
  --background-primary: #0f172a;
  --background-secondary: #1e293b;
  --background-overlay: rgba(15, 23, 42, 0.95);
  --background-glass: rgba(30, 41, 59, 0.8);
  --border-light: rgba(0, 212, 255, 0.2);
  --border-glow: rgba(0, 212, 255, 0.4);
  --shadow-light: rgba(0, 212, 255, 0.15);
  --grid-color: rgba(0, 212, 255, 0.1);
  --grid-accent: rgba(139, 92, 246, 0.15);
  
  /* Typography */
  --font-family: 'Poppins', 'Inter', 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 40px;
  
  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-slow: 0.8s ease;
  
  /* Z-index layers */
  --z-background: 1;
  --z-shapes: 2;
  --z-content: 10;
  --z-navigation: 1000;
  --z-modal: 999;
  --z-footer: 1002;
}

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

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-light);
  background: var(--background-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* ===== SIMPLIFIED FUTURISTIC BACKGROUND ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: 
    /* Subtle dot pattern */
    radial-gradient(circle at 50% 50%, var(--grid-color) 1px, transparent 1px),
    /* Minimal grid */
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    linear-gradient(0deg, var(--grid-color) 1px, transparent 1px),
    /* Clean gradient base */
    radial-gradient(ellipse at center top, var(--background-secondary) 0%, var(--background-primary) 70%);
  background-size: 
    100px 100px,
    100px 100px,
    100px 100px,
    100% 100%;
  animation: subtleFlow 60s linear infinite;
}

@keyframes subtleFlow {
  0% { 
    background-position: 
      0% 0%,
      0px 0px, 0px 0px,
      center top;
  }
  50% { 
    background-position: 
      50% 50%,
      50px 50px, 50px 50px,
      center top;
  }
  100% { 
    background-position: 
      100% 100%,
      100px 100px, 100px 100px,
      center top;
  }
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== NAVIGATION ===== */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-navigation);
  background: var(--background-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--spacing-md) var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px var(--shadow-light);
}

.brand-logo {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.brand-logo:hover {
  opacity: 0.8;
}

.brand-text {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.5px;
}

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

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  font-weight: var(--font-weight-normal);
  transition: color var(--transition-fast);
  position: relative;
  letter-spacing: -0.2px;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.nav-toggle:hover,
.nav-toggle:focus {
  border-color: var(--primary-color);
  background: rgba(0, 212, 255, 0.1);
  outline: none;
}

.nav-toggle:active {
  transform: scale(0.95);
}

.nav-toggle::before {
  content: "☰";
  color: var(--text-primary);
  font-size: 18px;
}

.nav-menu {
  position: absolute;
  top: 80px;
  right: 0;
  background: var(--background-glass);
  border-radius: 16px;
  padding: var(--spacing-md);
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 32px var(--shadow-light);
}

.nav-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu ul {
  list-style: none;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 16px;
  font-weight: var(--font-weight-normal);
  transition: all var(--transition-fast);
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 4px 0;
  letter-spacing: -0.2px;
}

.nav-menu a:hover {
  color: var(--primary-color);
  background: rgba(0, 212, 255, 0.1);
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  background: var(--background-primary);
  overflow: hidden;
  padding: 0 var(--spacing-md);
  text-align: center;
  padding-top: 40vh; /* Increased from 35vh for better centering */
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  z-index: var(--z-content);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-25%); /* Reduced from -40% for better positioning */
}

.hero-title {
  font-size: clamp(28px, 5vw, 64px);
  font-weight: 200;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 0 auto 32px auto; /* Increased bottom margin from 24px */
  animation: fadeInUp var(--transition-slow) 0.4s both;
  letter-spacing: clamp(-1px, -0.15vw, -1.5px);
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 12px); /* Increased gap between lines */
  padding: 0;
  min-height: 180px; /* Increased from 160px for more breathing room */
}

/* ===== TYPING ANIMATION ===== */
.typing-text {
  display: inline-block;
  overflow: visible;
  white-space: nowrap;
  position: relative;
  text-align: center;
  margin: 0;
  width: auto;
  max-width: 100%;
}

/* Hero title typing text specific styling */
.hero-title .typing-text {
  display: inline-block;
  text-align: center;
  width: auto;
  line-height: 1.1;
  margin: 0;
  padding: 0;
}

/* Style the second line with primary color */
#typing-line2 {
  color: var(--primary-color);
}

/* Ensure the cursor inherits the proper color */
#typing-line2::after {
  color: var(--primary-color) !important;
}

/* Force show cursor for testing - remove this later */
#typing-line2.completed::after {
  opacity: 1 !important;
  animation: blink 1s infinite !important;
  content: '|' !important;
  display: inline !important;
}

/* Hide all cursors by default */
.typing-text::after {
  content: '|';
  color: var(--primary-color);
  margin-left: 3px;
  opacity: 0;
  display: inline;
  vertical-align: baseline;
  line-height: inherit;
  font-size: inherit;
  animation: none;
}

/* Show cursor when actively typing */
.typing-text.active-typing::after {
  opacity: 1;
  animation: blink 1s infinite;
}

/* Show cursor when completed - this is the key rule */
.typing-text.completed::after {
  opacity: 1;
  animation: blink 1s infinite;
}

/* Hide cursor when finished */
.typing-text.finished::after {
  opacity: 0;
  animation: none;
}

/* Service typing and about typing specific styles */
.service-typing {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  display: inline-block;
  position: relative;
  white-space: nowrap;
  font-size: 22px; /* Further increased from 20px to match increased content size */
  line-height: 1.7; /* Reduced from 1.8 for better desktop layout */
  margin-bottom: 3px; /* Reduced to half again for minimal spacing */
  min-height: 95px; /* Further increased from 85px for larger text */
}

.about-typing {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  display: inline-block;
  position: relative;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 100%;
  text-align: center;
  font-size: 22px; /* Further increased from 20px to match increased content size */
  line-height: 1.7; /* Reduced from 1.8 for better desktop layout */
  margin-bottom: 3px; /* Reduced to half again for consistency */
  min-height: 95px; /* Further increased from 85px for larger text */
  max-width: 100%;
}

/* Show service item and about text when typing starts */
.service-typing.active-typing,
.service-typing.finished,
.about-typing.active-typing,
.about-typing.finished {
  opacity: 1;
  transform: translateY(0);
}

/* Cursor styles for service and about typing */
.service-typing::after,
.about-typing::after {
  content: '|';
  color: var(--primary-color);
  margin-left: 3px;
  opacity: 0;
  display: inline;
  vertical-align: baseline;
  line-height: inherit;
  font-size: inherit;
  animation: none;
}

/* Show cursor when actively typing */
.service-typing.active-typing::after,
.about-typing.active-typing::after {
  opacity: 1;
  animation: blink 1s infinite;
}

/* Hide cursor when finished */
.service-typing.finished::after,
.about-typing.finished::after {
  opacity: 0;
  animation: none;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 1; }
  51% { opacity: 0; }
  100% { opacity: 0; }
}

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

/* ===== SIMPLIFIED HERO BACKGROUND PATTERNS ===== */
.background-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  background-image: 
    /* Clean dot grid */
    radial-gradient(circle at center, var(--primary-color) 1px, transparent 1px),
    /* Minimal lines */
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    linear-gradient(0deg, var(--grid-color) 1px, transparent 1px);
  background-size: 
    80px 80px,
    80px 80px,
    80px 80px;
  animation: cleanFlow 40s linear infinite;
  z-index: var(--z-background);
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-shapes);
}

.shape {
  position: absolute;
  opacity: 0.1;
  animation: minimalFloat 30s ease-in-out infinite;
}

/* Simple line elements */
.shape:nth-child(1) {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  top: 25%;
  left: 15%;
  animation-delay: 0s;
  transform: rotate(15deg);
}

.shape:nth-child(2) {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  top: 65%;
  right: 20%;
  animation-delay: 10s;
  transform: rotate(-15deg);
}

.shape:nth-child(3) {
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, var(--grid-color), var(--primary-color), var(--grid-color));
  top: 45%;
  right: 15%;
  animation-delay: 20s;
  transform: rotate(30deg);
}

.shape:nth-child(4) {
  width: 60px;
  height: 1px;
  background: var(--border-light);
  top: 35%;
  left: 70%;
  animation-delay: 15s;
  transform: rotate(-45deg);
}

.shape:nth-child(5) {
  width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  top: 75%;
  left: 25%;
  animation-delay: 5s;
  transform: rotate(5deg);
}

@keyframes cleanFlow {
  0% { 
    background-position: 0% 0%, 0px 0px, 0px 0px;
  }
  50% { 
    background-position: 50% 50%, 40px 40px, 40px 40px;
  }
  100% { 
    background-position: 100% 100%, 80px 80px, 80px 80px;
  }
}

@keyframes minimalFloat {
  0%, 100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-20px) translateX(10px) rotate(180deg);
    opacity: 0.15;
  }
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-glass);
  z-index: var(--z-modal);
  padding: 0 var(--spacing-md);
  padding-top: 15vh; /* Reduced from 35vh for better desktop positioning */
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-light);
}

.content-section.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  animation: slideIn var(--transition-fast);
}

.content-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  background-image: 
    /* Simple dot pattern */
    radial-gradient(circle at center, var(--grid-color) 1px, transparent 1px),
    /* Clean grid */
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px, 60px 60px;
  animation: subtleContentFlow 50s linear infinite;
  z-index: var(--z-background);
  pointer-events: none;
}

@keyframes subtleContentFlow {
  0% { 
    background-position: 0% 0%, 0% 0%, 0% 0%;
  }
  50% { 
    background-position: 50% 50%, 30px 30px, 30px 30px;
  }
  100% { 
    background-position: 100% 100%, 60px 60px, 60px 60px;
  }
}

@keyframes subtleContentFlow {
  0% { 
    background-position: 0% 0%, 0% 0%, 0% 0%;
  }
  50% { 
    background-position: 50% 50%, 30px 30px, 30px 30px;
  }
  100% { 
    background-position: 100% 100%, 60px 60px, 60px 60px;
  }
}

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

.content-container {
  max-width: 1100px; /* Increased from 1000px to accommodate larger text */
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: var(--z-content);
  padding: 0 var(--spacing-md);
  transform: translateY(0); /* Removed the -40% transform for better desktop positioning */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-height: 60vh; /* Ensure consistent container height */
  padding-top: var(--spacing-lg); /* Reduced from var(--spacing-xl) for more compact layout */
}

.content-section h2,
.content-section h3 {
  font-size: clamp(34px, 5.5vw, 58px); /* Further increased from 52px max for better prominence */
  margin-bottom: var(--spacing-md); /* Reduced from var(--spacing-lg) for better proportion */
  color: var(--text-primary);
  font-weight: var(--font-weight-light);
  line-height: 1.2;
  letter-spacing: -1px;
  text-align: center;
  width: 100%;
  margin-top: 0; /* Ensure consistent title positioning */
  padding-top: 0; /* Remove any top padding */
}

.content-section p {
  font-size: 22px; /* Further increased from 20px for better visibility */
  line-height: 1.7; /* Reduced from 1.8 for more compact desktop layout */
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md); /* Reduced from var(--spacing-lg) */
  font-weight: var(--font-weight-light);
  letter-spacing: -0.2px;
  max-width: 800px;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  margin-top: 0; /* Ensure consistent spacing from title */
  padding-top: 0; /* Remove any top padding */
}

.content-section ul {
  margin-left: 0;
  padding-left: 0;
  margin-top: 0; /* Ensure consistent spacing from title, same as paragraph */
  margin-bottom: var(--spacing-md); /* Reduced to match paragraph */
  width: 100%;
  max-width: 900px;
  padding-top: 0; /* Remove any top padding */
}

.content-section li {
  list-style: none;
  padding: 7px 9px; /* Reduced to half again for very tight spacing */
  margin: 3px 0; /* Reduced to half again for minimal spacing between items */
  background: transparent;
  border-radius: 12px;
  transition: all var(--transition-fast);
  font-size: 22px; /* Further increased from 20px for better visibility */
  line-height: 1.7; /* Reduced from 1.8 for more compact layout */
  color: var(--text-secondary);
  font-weight: var(--font-weight-light);
  letter-spacing: -0.2px;
}

/* Align first list item with paragraph text by removing top margin */
.content-section li:first-child {
  margin-top: 0;
}

.content-section li:hover {
  background: rgba(0, 212, 255, 0.05);
  transform: translateX(4px);
}

.close-btn {
  position: absolute;
  top: var(--spacing-xl);
  right: var(--spacing-xl);
  width: 44px;
  height: 44px;
  background: var(--background-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: var(--primary-color);
  color: var(--background-primary);
  border-color: var(--primary-color);
  transform: scale(1.05);
}

/* ===== FOOTER ===== */
footer {
  position: fixed;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: var(--font-weight-normal);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--background-glass);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 12px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--border-light);
  white-space: nowrap; /* Prevent text wrapping */
  max-width: 90vw; /* Ensure it doesn't overflow screen */
  z-index: var(--z-footer); /* Ensure footer stays on top */
  pointer-events: auto; /* Ensure footer is always interactive */
  isolation: isolate; /* Create new stacking context */
}

.footer-email {
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(0, 212, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: inherit; /* Ensure it inherits footer's z-index */
  pointer-events: auto; /* Ensure it's clickable */
}

.footer-email:hover {
  transform: scale(1.1);
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.email-icon {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
  transition: all var(--transition-fast);
}

.footer-email:hover .email-icon {
  color: var(--text-primary);
  filter: drop-shadow(0 0 8px var(--primary-color));
}

.footer-email:hover {
  transform: scale(1.1);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) and (min-width: 769px) {
  .hero-section {
    padding: 0 var(--spacing-lg);
    justify-content: center; /* Changed from flex-start for better centering */
    padding-top: 0; /* Removed excessive padding-top */
  }
  
  .hero-content {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    transform: translateY(0); /* Removed the -45% transform for natural positioning */
  }
  
  .hero-title {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.1;
    gap: clamp(6px, 1vw, 10px);
    margin: 0 auto;
    padding: 0;
    min-height: 140px;
  }
  
  .hero-title .typing-text {
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    margin: 0;
    width: auto;
    display: inline-block;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 20px var(--spacing-md);
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-right {
    gap: var(--spacing-sm);
  }
  
  .hero-section {
    padding: 0 var(--spacing-sm);
    min-height: 100vh;
    justify-content: center; /* Changed from flex-start for better centering */
    padding-top: 0; /* Removed excessive padding-top */
  }
  
  .hero-content {
    width: 100%;
    max-width: 100%;
    transform: translateY(0); /* Removed the -45% transform for natural positioning */
  }
  
  .hero-title {
    font-size: clamp(24px, 6vw, 48px); /* Increased minimum size for better mobile readability */
    line-height: 1.2; /* Improved line height */
    gap: clamp(4px, 1vw, 10px); /* Better gap for mobile */
    letter-spacing: clamp(-0.5px, -0.1vw, -1px);
    margin: 0 auto 20px auto; /* Added bottom margin for better spacing */
    padding: 0;
    min-height: 140px; /* Adequate height for mobile */
  }
  
  .hero-title .typing-text {
    display: inline-block;
    text-align: center;
    width: auto;
    white-space: normal; /* Allow wrapping on mobile */
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: visible;
    margin: 0;
    max-width: 100%;
  }
  
  .content-section {
    padding: 0 var(--spacing-md);
    padding-top: 35vh; /* Slightly reduced from 40vh for better mobile positioning */
  }
  
  .content-container {
    transform: translateY(-30%); /* Reduced from -45% for better mobile positioning */
    text-align: center;
    justify-content: flex-start; /* Ensure consistent alignment */
    min-height: 60vh; /* Maintain consistent container height on mobile */
    padding-top: var(--spacing-md); /* Less padding on mobile */
  }
  
  .content-section h2,
  .content-section h3 {
    font-size: clamp(28px, 7vw, 46px); /* Further increased for mobile prominence */
    margin-bottom: var(--spacing-md);
    text-align: center;
    margin-top: 0; /* Ensure consistent title positioning on mobile */
    padding-top: 0;
  }
  
  .content-section p {
    font-size: 20px; /* Further increased from 18px for better mobile visibility */
    margin-bottom: 20px; /* Slightly reduced */
    max-width: 100%;
    text-align: center;
    margin-top: 0; /* Consistent spacing */
    padding-top: 0;
    line-height: 1.6; /* Better mobile readability */
  }
  
  .content-section ul {
    margin-top: 0; /* Consistent spacing, same as paragraph */
    margin-bottom: 20px; /* Match paragraph margin-bottom */
    padding-top: 0;
  }
  
  .content-section li {
    padding: 6px var(--spacing-md); /* Reduced to half again for minimal mobile spacing */
    margin: 3px 0; /* Reduced to half again for very tight mobile spacing */
    font-size: 20px; /* Further increased from 18px for better mobile visibility */
    line-height: 1.6; /* Better mobile readability */
  }
  
  /* Align first list item with paragraph text on mobile */
  .content-section li:first-child {
    margin-top: 0;
  }
  
  .close-btn {
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .nav-menu {
    right: -10px;
    min-width: 200px;
    padding: 20px;
  }
  
  footer {
    bottom: var(--spacing-sm);
    font-size: 12px;
    gap: 8px; /* Reduced gap for mobile to fit better */
    padding: 8px 12px; /* Reduced padding for mobile */
    max-width: 95vw; /* Ensure it fits on small screens */
  }
  
  .footer-email {
    padding: 6px;
  }
  
  .email-icon {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav-container {
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  .hero-section {
    padding: 0 var(--spacing-lg); /* Removed conflicting padding rule */
    justify-content: center; /* Ensure centering for tablet */
  }
  
  .content-section {
    padding: 0 var(--spacing-lg);
    padding-top: 25vh; /* Reduced for better tablet positioning */
  }
  
  .content-container {
    transform: translateY(-15%); /* Reduced from -45% for better tablet positioning */
    justify-content: flex-start; /* Ensure consistent alignment */
    min-height: 60vh; /* Maintain consistent container height on tablet */
    padding-top: var(--spacing-md); /* Reduced from var(--spacing-lg) for better tablet proportion */
    max-width: 900px; /* Slightly reduced for better tablet reading */
  }
  
  .nav-right {
    gap: var(--spacing-md);
  }
  
  .nav-links {
    gap: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: var(--spacing-sm) 20px;
  }
  
  .hero-section {
    justify-content: center; /* Changed from flex-start for better centering */
    padding-top: 0; /* Removed excessive padding-top */
  }
  
  .hero-content {
    padding: 0 15px;
    transform: translateY(0); /* Removed the -45% transform for natural positioning */
  }
  
  .hero-title {
    min-height: 160px; /* Increased for better small mobile spacing */
    font-size: clamp(26px, 8vw, 50px); /* Increased for better small mobile readability */
    line-height: 1.2;
    margin-bottom: 20px; /* Added bottom margin */
  }
  
  .typing-text {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }
  
  .hero-title .typing-text {
    display: inline-block;
    width: auto;
    max-width: 100%;
    margin: 0;
  }
  
  .content-section {
    padding: 0 var(--spacing-sm);
    padding-top: 35vh; /* Slightly reduced for small mobile */
  }
  
  .content-container {
    transform: translateY(-30%); /* Reduced from -45% for better small mobile positioning */
    padding: 0 15px;
    justify-content: flex-start; /* Ensure consistent alignment */
    min-height: 60vh; /* Maintain consistent container height on small mobile */
    padding-top: var(--spacing-sm); /* Added top padding */
  }
  
  footer {
    bottom: 12px;
    font-size: 11px;
    padding: 6px 10px; /* Adjusted padding for very small screens */
    gap: 6px; /* Reduced gap for very small screens */
    max-width: 98vw; /* Ensure it fits on very small screens */
  }
}

@media (min-width: 1440px) {
  .nav-container {
    padding: var(--spacing-md) 60px;
  }
  
  .hero-section {
    padding: 0 60px;
    padding-top: 35vh; /* Increased from 28vh for better balance */
  }
  
  .hero-content {
    max-width: 1400px; /* Increased max-width for large screens */
    transform: translateY(-30%); /* Reduced from -50% for better positioning */
  }
  
  .hero-title {
    font-size: clamp(48px, 4vw, 80px); /* Larger font size for big screens */
    line-height: 1.1;
    gap: clamp(10px, 1.4vw, 18px); /* Increased gap */
    letter-spacing: clamp(-1.5px, -0.2vw, -2px);
    min-height: 220px; /* Increased min-height for large screens */
    margin-bottom: 50px; /* Increased margin */
  }
  
  .content-container {
    max-width: 1100px; /* Optimized width for large desktop reading */
    padding-top: var(--spacing-lg);
  }
  
  .content-section h2,
  .content-section h3 {
    font-size: clamp(38px, 4.5vw, 62px); /* Further increased from 56px for better large desktop prominence */
  }
  
  .content-section p {
    font-size: 24px; /* Further increased from 21px for better large desktop visibility */
    max-width: 850px; /* Wider for large screens */
  }
  
  .content-section li {
    font-size: 24px; /* Further increased from 21px for better large desktop visibility */
    padding: 8px 10px; /* Reduced to half again for very tight large screen spacing */
    margin: 4px 0; /* Reduced to half again for minimal large screen spacing */
  }
  
  /* Align first list item with paragraph text on large desktop */
  .content-section li:first-child {
    margin-top: 0;
  }
  
  .content-section {
    padding: 140px 60px 100px;
  }
}

/* ===== EXTRA LARGE SCREENS (27" and larger) ===== */
@media (min-width: 2048px) {
  .hero-section {
    padding-top: 30vh; /* Increased from 25vh for better balance */
  }
  
  .hero-content {
    max-width: 1600px;
    transform: translateY(-25%); /* Reduced from -45% for better positioning */
  }
  
  .hero-title {
    font-size: clamp(64px, 3.5vw, 96px); /* Even larger text for very big screens */
    gap: clamp(14px, 1.8vw, 24px); /* Increased gap */
    letter-spacing: clamp(-2px, -0.25vw, -2.5px);
    min-height: 260px; /* Increased */
    margin-bottom: 60px; /* Increased margin */
  }
  
  .nav-container {
    padding: var(--spacing-lg) 80px; /* More padding for very large screens */
  }
  
  .content-section {
    padding: 160px 80px 120px;
  }
}

/* ===== ULTRA WIDE SCREENS (32" and larger) ===== */
@media (min-width: 2560px) {
  .hero-section {
    padding-top: 23vh; /* Moved higher for ultra-wide screens */
  }
  
  .hero-content {
    max-width: 1800px;
    transform: translateY(-40%); /* Moved higher from -30% */
  }
  
  .hero-title {
    font-size: clamp(72px, 3vw, 108px); /* Maximum size for ultra-wide */
    gap: clamp(16px, 2vw, 24px);
    letter-spacing: clamp(-2.5px, -0.3vw, -3px);
    min-height: 280px;
    margin-bottom: 60px;
  }
  
  .nav-container {
    padding: var(--spacing-lg) 100px;
  }
  
  .content-section {
    padding: 180px 100px 140px;
  }
}
