/* Custom CSS for U.S. Elite Investment Club */

/* Grid Pattern Background */
.grid-pattern {
  background-image: 
    linear-gradient(rgba(201, 166, 70, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 166, 70, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

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

/* Network Visualization */
.network-node {
  @apply absolute w-4 h-4 bg-gold rounded-full;
  animation: pulse 2s infinite;
}

.network-node:nth-child(odd) {
  animation-delay: 0.5s;
}

.network-node:nth-child(even) {
  animation-delay: 1s;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 166, 70, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(201, 166, 70, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 166, 70, 0);
  }
}

/* Pyramid Visualization */
.pyramid-container {
  position: relative;
}

.pyramid-layer {
  position: relative;
  z-index: 10;
}

.layer-t3 {
  animation: fadeInUp 0.8s ease-out;
}

.layer-t2 {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.layer-t1 {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.layer-t0 {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

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

/* Hover Effects */
.pyramid-layer:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #C9A646;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #A68B39;
}

/* Form Styling */
form input,
form select,
form textarea {
  color: #111827 !important;
  background-color: white;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 166, 70, 0.1);
  color: #111827 !important;
}

/* Ensure option text is also visible */
form select option {
  color: #111827 !important;
  background-color: white;
}

/* Placeholder text styling */
form input::placeholder,
form textarea::placeholder {
  color: #6b7280 !important;
}

/* Button Hover Effects */
button {
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Mobile Menu Animation */
#mobile-menu {
  transition: all 0.3s ease;
}

#mobile-menu.show {
  display: block;
  animation: slideDown 0.3s ease-out;
}

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

/* Section Animations */
section {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

.fade-in {
  opacity: 0;
  transform: translateY(50px);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section Enhancements */
.hero-section {
  background: 
    linear-gradient(135deg, rgba(11, 31, 58, 0.85) 0%, rgba(26, 59, 92, 0.85) 50%, rgba(11, 31, 58, 0.85) 100%),
    url('../images/hero-background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Hero Connected Section - Zero Gap */
.hero-connected {
  margin-top: 0 !important;
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
  background-color: #0B1F3A !important;
  position: relative;
  z-index: 10;
  
  /* Force remove any possible gaps */
  border-top: none !important;
  outline: none !important;
}

/* Ensure zero spacing between Hero and Education */
.hero-section + .hero-connected {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-top: none !important;
}

/* Force remove any gaps */
body {
  line-height: 1.6;
}

section {
  display: block;
  margin: 0 !important;
  border: none !important;
}

/* Specific fix for seamless connection */
#education {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-top: none !important;
  border-bottom: none !important;
  vertical-align: top !important;
}

/* Remove any default spacing */
.hero-section, #education {
  vertical-align: top;
  display: block;
}

/* Ultimate fix for gap removal */
.hero-section {
  margin-bottom: -1px !important;
}

#education {
  margin-top: -1px !important;
  position: relative;
  z-index: 2;
}

/* Ensure no whitespace between sections */
.hero-section + #education {
  margin-top: -2px !important;
}

/* Additional whitespace removal */
section + section {
  margin-top: 0 !important;
}

/* Font and line-height reset to prevent gaps */
html, body {
  font-size: 16px;
  line-height: normal;
}

/* Seamless Transition from Education (Navy) to Philosophy (White) */
.education-to-philosophy-transition {
  height: 4rem;
  background: linear-gradient(180deg, 
    #0B1F3A 0%,
    rgba(11, 31, 58, 0.8) 20%,
    rgba(11, 31, 58, 0.6) 40%,
    rgba(11, 31, 58, 0.3) 60%,
    rgba(11, 31, 58, 0.1) 80%,
    rgba(255, 255, 255, 1) 100%);
  position: relative;
  z-index: 5;
}

/* Seamless Transition from Philosophy (White) to Strategy (Soft Gray) */
.philosophy-to-strategy-transition {
  height: 3rem;
  background: linear-gradient(180deg, 
    #ffffff 0%,
    rgba(245, 247, 250, 0.3) 30%,
    rgba(245, 247, 250, 0.6) 60%,
    rgba(245, 247, 250, 0.9) 90%,
    #F5F7FA 100%);
  position: relative;
  z-index: 5;
}

/* Hero Content Backdrop for Better Readability */
.hero-content-backdrop {
  background: rgba(11, 31, 58, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 3rem;
  border: 1px solid rgba(201, 166, 70, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Hero Text Enhancements */
.hero-title {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-tagline {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Hero CTA Button Enhancements */
.hero-cta-primary {
  box-shadow: 0 4px 15px rgba(201, 166, 70, 0.4);
  border: 2px solid transparent;
}

.hero-cta-primary:hover {
  box-shadow: 0 8px 25px rgba(201, 166, 70, 0.6);
  transform: translateY(-2px);
}

.hero-cta-secondary {
  border: 2px solid #C9A646;
  box-shadow: 0 4px 15px rgba(201, 166, 70, 0.2);
}

.hero-cta-secondary:hover {
  box-shadow: 0 8px 25px rgba(201, 166, 70, 0.4);
  transform: translateY(-2px);
}

/* Remove gaps between sections */
.section-seamless {
  margin-top: 0;
  padding-top: 5rem;
}

/* Ensure all sections connect seamlessly */
section {
  margin: 0;
}

/* Smooth scrolling enhancement */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1;
}

/* Optimize section transitions */
section + section {
  border-top: none;
}

/* Enhanced scroll padding for navigation */
section[id] {
  scroll-margin-top: 80px;
}

/* Subtle parallax effect for transitions */
.hero-to-education-transition,
.education-to-philosophy-transition,
.philosophy-to-strategy-transition {
  will-change: transform;
  transform: translateZ(0);
}

/* Optimize scroll performance */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent layout shifts during scrolling */
main {
  contain: layout style paint;
}

/* Mobile optimization for seamless scrolling */
@media (max-width: 768px) {
  .hero-to-education-transition,
  .education-to-philosophy-transition,
  .philosophy-to-strategy-transition {
    height: 2rem;
  }
  
  .section-seamless {
    padding-top: 3rem;
  }
  
  .hero-section {
    background-attachment: scroll;
  }
}

#hero {
  background: linear-gradient(135deg, #0B1F3A 0%, #1A3B5C 50%, #0B1F3A 100%);
  position: relative;
  overflow: hidden;
}

/* Typography Improvements */
.font-serif {
  font-feature-settings: "kern" 1, "liga" 1;
  letter-spacing: -0.025em;
}

/* Gold Gradient Text */
.text-gold-gradient {
  background: linear-gradient(135deg, #C9A646 0%, #F4D03F  50%, #C9A646 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(11, 31, 58, 0.15);
}

/* Progress Indicators */
.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(201, 166, 70, 0.3);
  position: relative;
}

.progress-dot.active {
  background: #C9A646;
}

.progress-dot.active::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid rgba(201, 166, 70, 0.3);
  animation: ripple 2s infinite;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Education & Compliance Section Styles */
.education-compliance-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideInUp 1s ease-out;
}

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

.expert-profile-card {
  transition: all 0.3s ease;
}

.expert-profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(201, 166, 70, 0.2);
}

.expert-avatar {
  transition: transform 0.3s ease;
}

.expert-profile-card:hover .expert-avatar {
  transform: scale(1.1);
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
  .pyramid-container {
    padding: 0 1rem;
  }
  
  .pyramid-layer {
    margin-bottom: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .network-visualization {
    transform: scale(0.8);
  }
  
  /* Hero Section Mobile Optimization */
  .hero-section {
    background-attachment: scroll;
  }
  
  .hero-content-backdrop {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.125rem !important;
  }
  
  /* Education & Compliance Mobile Optimization */
  .education-compliance-card {
    padding: 1.5rem !important;
    margin: 0 1rem;
  }
  
  .education-compliance-card h3 {
    font-size: 1.5rem !important;
  }
  
  .expert-profile-card {
    padding: 1rem !important;
  }
  
  .expert-profile-card .flex {
    flex-direction: column;
    text-align: center;
    space-x: 0;
  }
  
  .expert-avatar {
    margin: 0 auto 1rem auto !important;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .grid-cols-1 {
    gap: 2rem;
  }
  
  /* Ultra Mobile Optimization for Education Section */
  .education-compliance-card {
    padding: 1rem !important;
    margin: 0 0.5rem;
    bottom: 10px !important;
  }
  
  .education-compliance-card h3 {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .education-compliance-card p {
    font-size: 0.875rem !important;
  }
  
  .expert-profile-card {
    padding: 0.75rem !important;
    margin-bottom: 0.75rem;
  }
  
  .expert-profile-card .flex {
    flex-direction: column !important;
    text-align: center !important;
    gap: 0.5rem !important;
  }
  
  .expert-avatar {
    width: 60px !important;
    height: 60px !important;
    margin: 0 auto 0.5rem auto !important;
  }
  
  .expert-profile-card h4 {
    font-size: 1rem !important;
  }
  
  .expert-profile-card .text-sm {
    font-size: 0.75rem !important;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .bg-navy {
    background: white !important;
    color: black !important;
    border: 1px solid #ccc;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #C9A646;
  outline-offset: 2px;
}

/* Modal Styles */
#teacher-modal {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#teacher-modal:not(.hidden) {
  opacity: 1;
}

.modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

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

/* Modal responsive design */
@media (max-width: 768px) {
  #teacher-modal .max-w-4xl {
    max-width: 95vw;
  }
  
  #teacher-modal .grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  #teacher-modal .p-8 {
    padding: 1.5rem;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .text-neutral-gray {
    color: #333 !important;
  }
  
  .bg-soft-gray {
    background: #f0f0f0 !important;
  }
}