/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Basic setup and global variables */
:root {
  scroll-behavior: smooth;
  --bg-primary: #FAFAFA;
  --bg-secondary: #FFFFFF;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --border-color: #E5E7EB;
  --card-bg: rgba(255, 255, 255, 0.7);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(229, 231, 235, 0.5);
  --scrollbar-track: #FAFAFA;
  --nav-shadow: rgba(0, 0, 0, 0.05);
  --premium-shadow: rgba(30, 58, 138, 0.08);
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
}

[data-theme="dark"] {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --border-color: #334155;
  --card-bg: rgba(30, 41, 59, 0.8);
  --glass-bg: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(51, 65, 85, 0.5);
  --scrollbar-track: #1E293B;
  --nav-shadow: rgba(0, 0, 0, 0.3);
  --premium-shadow: rgba(0, 0, 0, 0.4);
  --gray-50: #1E293B;
  --gray-100: #334155;
  --gray-200: #475569;
  --gray-300: #64748B;
  --gray-400: #94A3B8;
  --gray-500: #CBD5E1;
  --gray-600: #E2E8F0;
  --gray-700: #E2E8F0;
  --gray-800: #334155;
  --gray-900: #F1F5F9;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
}

/* Glassmorphism custom components */
.glass-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.4s ease;
}

.glass-nav.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px -10px var(--nav-shadow);
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: #D4AF37;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1E3A8A;
}

/* Page Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(30, 58, 138, 0.1);
  border-left-color: #D4AF37;
  border-right-color: #1E3A8A;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}

.animate-float-delayed {
  animation: float-delayed 8s ease-in-out infinite;
}

/* Scroll reveal initial states */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Custom premium hover properties */
.premium-hover {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(30, 58, 138, 0.08);
}

/* Glow effects */
.hover-glow {
  transition: all 0.3s ease;
}
.hover-glow:hover {
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Dark mode overrides for Tailwind utility classes */
[data-theme="dark"] body,
[data-theme="dark"] .bg-white { background-color: var(--bg-secondary) !important; }
[data-theme="dark"] .bg-bg-light { background-color: var(--bg-primary) !important; }
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-50\/50 { background-color: var(--gray-800) !important; }
[data-theme="dark"] .bg-gray-100 { background-color: var(--gray-800) !important; }
[data-theme="dark"] .bg-gray-200 { background-color: var(--gray-700) !important; }
[data-theme="dark"] .bg-gray-800 { background-color: var(--gray-800) !important; }
[data-theme="dark"] .bg-gray-900 { background-color: #020617 !important; }
[data-theme="dark"] .bg-yellow-500\/10 { background-color: rgba(212, 175, 55, 0.15) !important; }
[data-theme="dark"] .bg-blue-100 { background-color: rgba(30, 58, 138, 0.3) !important; }
[data-theme="dark"] .bg-yellow-100 { background-color: rgba(212, 175, 55, 0.15) !important; }

[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-900 { color: var(--text-primary) !important; }
[data-theme="dark"] .text-gray-600 { color: var(--gray-300) !important; }
[data-theme="dark"] .text-gray-500 { color: var(--gray-400) !important; }
[data-theme="dark"] .text-gray-400 { color: var(--gray-400) !important; }
[data-theme="dark"] .text-gray-300 { color: var(--gray-300) !important; }
[data-theme="dark"] .text-text-dark { color: var(--text-primary) !important; }
[data-theme="dark"] .text-text-muted { color: var(--text-secondary) !important; }
[data-theme="dark"] .text-white { color: #FFFFFF !important; }
[data-theme="dark"] .text-royal-blue { color: #FFFFFF !important; }
[data-theme="dark"] .bg-blue-50 .text-royal-blue,
[data-theme="dark"] .bg-blue-50.text-royal-blue,
[data-theme="dark"] .bg-blue-50 svg.text-royal-blue { color: #000000 !important; }
[data-theme="dark"] .bg-blue-50 { background-color: rgba(219, 234, 254, 0.15) !important; }

[data-theme="dark"] .border-gray-100,
[data-theme="dark"] .border-gray-100\/50,
[data-theme="dark"] .border-border-light { border-color: var(--border-color) !important; }
[data-theme="dark"] .border-gray-200 { border-color: var(--gray-700) !important; }
[data-theme="dark"] .border-gray-700 { border-color: var(--gray-600) !important; }
[data-theme="dark"] .border-gray-800 { border-color: var(--gray-700) !important; }
[data-theme="dark"] .border-t { border-color: var(--border-color) !important; }
[data-theme="dark"] .border-t.border-gray-100 { border-color: var(--border-color) !important; }

[data-theme="dark"] .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important; }
[data-theme="dark"] .shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important; }
[data-theme="dark"] .shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4) !important; }
[data-theme="dark"] .shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important; }

[data-theme="dark"] .hover\:bg-gray-50:hover { background-color: var(--gray-700) !important; }
[data-theme="dark"] .hover\:bg-gray-700:hover { background-color: var(--gray-600) !important; }
[data-theme="dark"] .hover\:text-gray-600:hover { color: var(--gray-300) !important; }

[data-theme="dark"] .hover-glow:hover {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

[data-theme="dark"] .premium-hover:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .placeholder-gray-500::placeholder { color: var(--gray-500) !important; }

/* Dark mode input fields */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: var(--gray-800) !important;
  color: var(--text-primary) !important;
  border-color: var(--gray-600) !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--gray-500) !important;
}

/* Dark mode sections with white backgrounds */
[data-theme="dark"] .bg-white.rounded-\\[24px\\] {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

/* Theme toggle button */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-primary);
  transition: all 0.3s ease;
}
.theme-toggle:hover {
  background-color: var(--gray-100);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}
.theme-toggle:hover svg {
  transform: rotate(20deg);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}
.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
}
[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}
[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Masonry Column CSS - Custom fallback if needed, Tailwind grid covers standard, but masonry is neat */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 24px;
}

/* Lightbox styles */
.lightbox {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

/* Scroll to top button */
#scroll-to-top {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
#scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.py-20 { padding-top: 7rem !important; }
