/* =================== 
   MODERN ENHANCEMENTS FOR TRADING PLATFORM
   =================== */

/* PERFORMANCE: Image Optimization & Lazy Loading */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Prevent CLS (Cumulative Layout Shift) */
img, video, iframe {
  aspect-ratio: auto;
}

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

/* ACCESSIBILITY: Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: #05043C;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

body {
  color: #05043C;
  background: #ffffff;
  line-height: 1.6;
}

p {
  line-height: 1.7;
  color: #5D6063;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  line-height: 1.3;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* MOBILE OPTIMIZATION: Touch targets (min 44px) */
button, 
a.ul-btn, 
input[type="submit"],
input[type="button"] {
  min-height: 44px;
  min-width: 44px;
  padding: 12px 24px;
}

/* Modern Button Styles */
.btn-modern {
  background: linear-gradient(90deg, #0805B1 0%, #FF0000 100%);
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(8, 5, 177, 0.15);
  cursor: pointer;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  min-height: 44px;
  font-size: 1rem;
}

.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(8, 5, 177, 0.25);
  text-decoration: none;
  color: white;
}

.btn-modern:focus-visible {
  outline: 2px solid #0805B1;
  outline-offset: 2px;
}

.btn-modern:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-modern-outline {
  background: transparent;
  border: 2px solid #0805B1;
  color: #0805B1;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 44px;
}

.btn-modern-outline:hover {
  background: #0805B1;
  color: white;
  text-decoration: none;
}

.btn-modern-outline:focus-visible {
  outline: 2px solid #0805B1;
  outline-offset: 2px;
}

/* Feature Cards */
.feature-card {
  padding: 30px;
  background: white;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 300px;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: #0805B1;
  box-shadow: 0 12px 24px rgba(8, 5, 177, 0.1);
}

.feature-card i {
  font-size: 2.5rem;
  color: #FF0000;
  margin-bottom: 20px;
  display: block;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card h3 {
  margin-bottom: 15px;
  color: #05043C;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card p {
  color: #5D6063;
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 0;
}

/* Modern Card Styles */
.modern-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.modern-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Section Spacing */
.section-padding {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 50px 0;
  }
}

/* Gradient Background */
.gradient-bg {
  background: linear-gradient(90deg, #0805B1 0%, #FF0000 100%);
  color: white;
}

/* Icon Boxes */
.icon-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.icon-box .icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: rgba(255, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FF0000;
  font-size: 1.5rem;
}

/* Badge Styles */
.badge-success {
  background: #d4edda;
  color: #155724;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.badge-info {
  background: #d1ecf1;
  color: #0c5460;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

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

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #0805B1;
  outline-offset: 2px;
}

/* Animation Classes */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-slide-up {
  animation: slideInUp 0.6s ease-out;
}

.animate-slide-down {
  animation: slideInDown 0.6s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Modern Input Styles with Mobile Optimization */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: "Manrope", sans-serif;
  font-size: 16px; /* Prevents zoom on iOS */
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  appearance: none; /* Remove default browser styling */
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: #0805B1;
  box-shadow: 0 0 0 3px rgba(8, 5, 177, 0.1);
  outline: none;
}

/* Input Error State */
input[type="text"].error,
input[type="email"].error,
textarea.error {
  border-color: #FF0000;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* Input Success State */
input[type="text"].success,
input[type="email"].success,
textarea.success {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Link Hover Effects */
a.link-hover {
  position: relative;
  color: #0805B1;
  text-decoration: none;
}

a.link-hover::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: #0805B1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

a.link-hover:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Responsive Grid */
.responsive-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.responsive-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.responsive-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .responsive-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .responsive-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .responsive-grid-4,
  .responsive-grid-3,
  .responsive-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Mobile Table Display */
@media (max-width: 768px) {
  .comparison-table thead {
    display: none;
  }

  .comparison-table,
  .comparison-table tbody {
    display: block;
    width: 100%;
  }

  .comparison-table tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid #e6e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(5, 4, 60, 0.06);
    background: #fff;
  }

  .comparison-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: right;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #f2f3f8;
  }

  .comparison-table tr td:last-child {
    border-bottom: none;
  }

  .comparison-table td::before {
    content: attr(data-label);
    font-weight: 600;
    text-align: left;
    color: #5D6063;
    flex-shrink: 0;
  }

  /* First cell = feature name acts as card header */
  .comparison-table td:first-child {
    display: block;
    text-align: left;
    background: linear-gradient(90deg, #0805B1 0%, #FF0000 100%);
    padding: 14px 16px;
  }
  .comparison-table td:first-child::before {
    display: none;
  }
  .comparison-table td:first-child strong {
    color: #fff;
    font-size: 15px;
  }
}

/* Stats Section */
.stats-card {
  text-align: center;
  padding: 30px;
}

.stats-card .number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0805B1;
  margin-bottom: 10px;
}

.stats-card .label {
  color: #5D6063;
  font-size: 0.95rem;
}

/* Benefits List */
.benefits-list {
  list-style: none;
  padding: 0;
}

.benefits-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 15px;
  color: #05043C;
  line-height: 1.6;
}

.benefits-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #0805B1;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.comparison-table th {
  background: linear-gradient(90deg, #0805B1 0%, #FF0000 100%);
  color: white;
  font-weight: 600;
}

.comparison-table tr:hover {
  background: #f9f9f9;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

/* Testimonial Card */
.testimonial-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  border-left: 4px solid #0805B1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.testimonial-card .stars {
  color: #F6AF0F;
  margin-bottom: 15px;
  font-size: 1rem;
}

.testimonial-card .text {
  color: #05043C;
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.7;
}

.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card .author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(90deg, #0805B1 0%, #FF0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.testimonial-card .author-info h4 {
  margin: 0;
  font-size: 0.95rem;
}

.testimonial-card .author-info p {
  margin: 0;
  color: #9E9E9E;
  font-size: 0.85rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #0805B1 0%, #FF0000 100%);
  color: white;
  padding: 60px;
  border-radius: 16px;
  text-align: center;
}

.cta-section h2 {
  color: white;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

@media (max-width: 768px) {
  .cta-section {
    padding: 40px 20px;
  }
}

/* Footer Enhancements */
.footer-link:hover {
  color: #0805B1;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(8, 5, 177, 0.1);
  color: #0805B1;
  transition: all 0.3s ease;
  margin-right: 10px;
  min-height: 44px;
  min-width: 44px;
}

.social-icons a:hover {
  background: #0805B1;
  color: white;
  transform: translateY(-3px);
}

/* Breadcrumb */
.breadcrumb-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb-modern a {
  color: #0805B1;
  text-decoration: none;
}

.breadcrumb-modern a:hover {
  text-decoration: underline;
}

.breadcrumb-modern span {
  color: #9E9E9E;
}

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

.text-center {
  text-align: center;
}

.text-muted {
  color: #9E9E9E;
}

.text-primary {
  color: #0805B1;
}

.text-danger {
  color: #FF0000;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-0 {
  margin-top: 0;
}

.py-3 {
  padding: 1rem 0;
}

.py-5 {
  padding: 3rem 0;
}

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

@media print {
  .no-print {
    display: none;
  }
  
  .print-page-break {
    page-break-after: always;
  }
}

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