/* ============================================
   DRAGON LIGHT VENTURES - MODERN ENHANCEMENTS
   Add this file AFTER your main stylesheet
   ============================================ */

/* ============================================
   CSS VARIABLES - Easy Customization
   ============================================ */
:root {
  /* Modern Color Palette */
  --primary-dark: #1e3a5f;
  --primary-medium: #2c5282;
  --primary-light: #4a7cb8;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-color: #10b981;
  --warning-color: #f59e0b;
  
  /* Neutral Palette */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Spacing Scale */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Typography Scale */
  --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;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GLOBAL ENHANCEMENTS
   ============================================ */

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Better Font Rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================================
   NAVIGATION ENHANCEMENTS
   ============================================ */

/* Modern Sticky Header with Backdrop Blur */
nav {
  position: sticky !important;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-base);
  background: rgba(30, 58, 95, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Add subtle shadow on scroll */
nav.scrolled {
  box-shadow: var(--shadow-lg);
}

/* Enhanced Nav Links */
nav a {
  position: relative;
  transition: all var(--transition-base);
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md);
}

/* Modern Hover Effect for Nav Links */
nav a:not(.btn):hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* Active Link Indicator */
nav a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

nav a:not(.btn):hover::after {
  width: 80%;
}

/* Register Button Enhancement */
nav a[href="register.php"],
nav a[href*="Register"] {
  background: var(--accent-primary) !important;
  color: white !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all var(--transition-base);
}

nav a[href="register.php"]:hover,
nav a[href*="Register"]:hover {
  background: #2563eb !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */

/* Modern Hero with Animated Gradient */
section[id="home"],
.hero,
nav + section:first-of-type,
nav + div > section:first-of-type {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
  background-size: 200% 200% !important;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
  padding: var(--spacing-3xl) var(--spacing-xl) !important;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Animated Gradient Background */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hero Overlay Pattern */
section[id="home"]::before,
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Hero Heading Enhancement */
section[id="home"] h1,
.hero h1,
nav + section:first-of-type h1 {
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  margin-bottom: var(--spacing-lg) !important;
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

/* Hero Subheading */
section[id="home"] p,
.hero p,
nav + section:first-of-type > p {
  font-size: var(--text-xl) !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  max-width: 600px;
  margin: 0 auto var(--spacing-xl) !important;
  position: relative;
  z-index: 1;
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */

/* Modern Button Base Styles */
a[class*="btn"],
button,
input[type="submit"],
.cta-button,
section[id="home"] a,
.hero a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem !important;
  font-size: var(--text-base) !important;
  font-weight: 600 !important;
  line-height: 1.5;
  text-decoration: none !important;
  border-radius: var(--radius-xl) !important;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Primary Button Style */
section[id="home"] a:first-of-type,
.hero a:first-of-type,
a[href="sell-house.php"] {
  background: white !important;
  color: var(--primary-dark) !important;
  font-weight: 700 !important;
}

section[id="home"] a:first-of-type:hover,
.hero a:first-of-type:hover,
a[href="sell-house.php"]:hover {
  background: var(--gray-100) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Secondary Button Style */
section[id="home"] a:not(:first-of-type),
.hero a:not(:first-of-type) {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  border: 2px solid rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

section[id="home"] a:not(:first-of-type):hover,
.hero a:not(:first-of-type):hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Button Hover Shine Effect */
a[class*="btn"]::before,
button::before,
section[id="home"] a::before,
.hero a::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;
}

a[class*="btn"]:hover::before,
button:hover::before,
section[id="home"] a:hover::before,
.hero a:hover::before {
  left: 100%;
}

/* Active State */
a[class*="btn"]:active,
button:active {
  transform: translateY(-1px);
}

/* ============================================
   CARD ENHANCEMENTS
   ============================================ */

/* Modern Card Styles */
.card,
section div[class*="card"],
section > div > div[class*="col"] > div,
article,
[class*="service"],
[class*="feature"],
[class*="property"] {
  background: white;
  border-radius: var(--radius-2xl) !important;
  padding: var(--spacing-xl) !important;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-100);
  position: relative;
  overflow: hidden;
}

/* Card Hover Effect */
.card:hover,
section div[class*="card"]:hover,
section > div > div[class*="col"] > div:hover,
article:hover,
[class*="service"]:hover,
[class*="feature"]:hover,
[class*="property"]:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
  border-color: var(--accent-primary);
}

/* Card Top Accent */
.card::before,
section > div > div[class*="col"] > div::before,
[class*="service"]::before,
[class*="feature"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.card:hover::before,
section > div > div[class*="col"] > div:hover::before,
[class*="service"]:hover::before,
[class*="feature"]:hover::before {
  transform: scaleX(1);
}

/* Card Headings */
.card h2,
.card h3,
.card h4,
section > div > div[class*="col"] > div h2,
section > div > div[class*="col"] > div h3,
section > div > div[class*="col"] > div h4 {
  font-size: var(--text-xl) !important;
  font-weight: 700 !important;
  color: var(--gray-900) !important;
  margin-bottom: var(--spacing-md) !important;
  line-height: 1.3 !important;
}

/* Card Text */
.card p,
section > div > div[class*="col"] > div p {
  color: var(--gray-600) !important;
  line-height: 1.6 !important;
  margin-bottom: var(--spacing-md) !important;
}

/* Card Links */
.card a,
section > div > div[class*="col"] > div a {
  color: var(--accent-primary) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-base);
}

.card a:hover,
section > div > div[class*="col"] > div a:hover {
  color: #2563eb !important;
  gap: 0.75rem;
}

/* Arrow Animation for Links */
.card a::after,
section > div > div[class*="col"] > div a::after {
  content: '→';
  transition: transform var(--transition-base);
}

.card a:hover::after,
section > div > div[class*="col"] > div a:hover::after {
  transform: translateX(4px);
}

/* ============================================
   PROPERTY CARDS ENHANCEMENT
   ============================================ */

/* Property Card Image Area */
[class*="property"] img,
section[id*="properties"] img,
.property-image {
  border-radius: var(--radius-lg);
  transition: all var(--transition-slow);
  width: 100%;
  height: auto;
  object-fit: cover;
}

[class*="property"]:hover img,
section[id*="properties"] div:hover img,
.property-image:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Property Badge Styles */
.property-badge,
[class*="property"] [class*="badge"],
section[id*="properties"] [class*="badge"] {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  background: var(--accent-gradient);
  color: white;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 999px;
  margin-top: var(--spacing-sm);
}

/* ============================================
   SECTION HEADINGS
   ============================================ */

/* Section Heading Styles */
section > h1,
section > h2,
.section-heading,
main > h1,
main > h2 {
  font-size: clamp(2rem, 4vw, 3rem) !important;
  font-weight: 800 !important;
  color: var(--gray-900) !important;
  text-align: center;
  margin-bottom: var(--spacing-2xl) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  position: relative;
  padding-bottom: var(--spacing-md);
}

/* Section Heading Underline */
section > h1::after,
section > h2::after,
.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 999px;
}

/* ============================================
   CALL-TO-ACTION SECTION
   ============================================ */

/* Modern CTA Section */
section[style*="background"],
.cta-section,
section:has(a[href*="cash"]) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  padding: var(--spacing-3xl) var(--spacing-xl) !important;
  border-radius: var(--radius-2xl);
  margin: var(--spacing-3xl) auto !important;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* CTA Pattern Overlay */
.cta-section::before,
section[style*="background"]::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.03) 10px,
      rgba(255, 255, 255, 0.03) 20px
    );
  animation: patternMove 20s linear infinite;
  pointer-events: none;
}

@keyframes patternMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* CTA Heading */
.cta-section h2,
section[style*="background"] h2 {
  color: white !important;
  font-size: var(--text-4xl) !important;
  font-weight: 800 !important;
  margin-bottom: var(--spacing-lg) !important;
  position: relative;
  z-index: 1;
}

/* CTA Text */
.cta-section p,
section[style*="background"] p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: var(--text-lg) !important;
  margin-bottom: var(--spacing-xl) !important;
  position: relative;
  z-index: 1;
}

/* CTA Button */
.cta-section a,
.cta-section button,
section[style*="background"] a,
section[style*="background"] button {
  background: white !important;
  color: var(--primary-dark) !important;
  padding: 1rem 2.5rem !important;
  font-size: var(--text-lg) !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.cta-section a:hover,
.cta-section button:hover,
section[style*="background"] a:hover,
section[style*="background"] button:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ============================================
   FOOTER ENHANCEMENTS
   ============================================ */

footer {
  background: var(--gray-900) !important;
  color: var(--gray-300) !important;
  padding: var(--spacing-3xl) var(--spacing-xl) var(--spacing-xl) !important;
  margin-top: var(--spacing-3xl);
}

footer h3,
footer h4 {
  color: white !important;
  font-weight: 700 !important;
  font-size: var(--text-lg) !important;
  margin-bottom: var(--spacing-md) !important;
}

footer a {
  color: var(--gray-300) !important;
  text-decoration: none !important;
  transition: all var(--transition-base);
  display: inline-block;
}

footer a:hover {
  color: white !important;
  transform: translateX(4px);
}

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

footer li {
  margin-bottom: var(--spacing-sm);
}

/* Copyright Text */
footer [class*="copy"],
footer p:last-child {
  text-align: center;
  color: var(--gray-500) !important;
  font-size: var(--text-sm) !important;
  margin-top: var(--spacing-xl) !important;
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--gray-800);
}

/* ============================================
   FORM ENHANCEMENTS
   ============================================ */

input,
textarea,
select {
  width: 100%;
  padding: 0.875rem 1rem !important;
  font-size: var(--text-base) !important;
  border: 2px solid var(--gray-300) !important;
  border-radius: var(--radius-lg) !important;
  background: white;
  transition: all var(--transition-base);
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

/* Form Labels */
label {
  font-weight: 600 !important;
  color: var(--gray-700) !important;
  margin-bottom: var(--spacing-xs) !important;
  display: block;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Fade-in Animation */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

/* Slide-in Animation */
.slide-in {
  animation: slideIn 0.6s ease-out;
}

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

/* Text Gradient */
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   RESPONSIVE ENHANCEMENTS
   ============================================ */

@media (max-width: 768px) {
  /* Mobile Typography Adjustments */
  section[id="home"] h1,
  .hero h1 {
    font-size: 2rem !important;
  }
  
  /* Mobile Spacing */
  section[id="home"],
  .hero,
  section {
    padding: var(--spacing-xl) var(--spacing-md) !important;
  }
  
  /* Mobile Buttons */
  a[class*="btn"],
  button,
  section[id="home"] a,
  .hero a {
    padding: 0.75rem 1.5rem !important;
    font-size: var(--text-sm) !important;
  }
  
  /* Mobile Cards */
  .card,
  section > div > div[class*="col"] > div {
    padding: var(--spacing-lg) !important;
  }
  
  /* Mobile Navigation */
  nav a {
    padding: 0.5rem 0.75rem !important;
    font-size: var(--text-sm) !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Tablet Adjustments */
  section[id="home"] h1,
  .hero h1 {
    font-size: 3rem !important;
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus Styles */
*:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .card,
  section > div > div[class*="col"] > div {
    border: 2px solid currentColor;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  nav,
  footer,
  .cta-section,
  button,
  a[class*="btn"] {
    display: none !important;
  }
  
  .card,
  section > div > div[class*="col"] > div {
    box-shadow: none !important;
    border: 1px solid #000;
    page-break-inside: avoid;
  }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* GPU Acceleration for Animations */
.card,
section > div > div[class*="col"] > div,
a[class*="btn"],
button,
section[id="home"] a,
.hero a {
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Optimize Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   END OF MODERN ENHANCEMENTS
   ============================================ */
