/*--------------------------------------------------------------
# Responsive Styles
--------------------------------------------------------------*/

/* Large Devices (Desktops, less than 1200px) */
@media (max-width: 1199.98px) {
  .hero h1 {
    font-size: 42px;
  }
  
  .hero h2 {
    font-size: 20px;
  }
  
  .section-title h2 {
    font-size: 28px;
  }
}

/* Medium Devices (Tablets, less than 992px) */
@media (max-width: 991.98px) {
  .hero {
    height: auto;
    padding: 120px 0 60px 0;
  }
  
  .hero h1 {
    font-size: 36px;
  }
  
  .hero h2 {
    font-size: 18px;
  }
  
  .hero .hero-img {
    text-align: center;
    margin-top: 40px;
  }
  
  .hero .hero-img img {
    max-width: 80%;
  }
  
  .section-title h2 {
    font-size: 26px;
  }
  
  .navbar a {
    padding: 10px 0 10px 20px;
  }
  
  .navbar .login-btn,
  .navbar .register-btn {
    margin-left: 10px;
    padding: 6px 15px;
    font-size: 13px;
  }
  
  .cta h3 {
    font-size: 24px;
  }
  
  .cta .cta-btn-container {
    text-align: left;
    margin-top: 20px;
  }
  
  .cta .cta-btn {
    margin-left: 0;
  }
  
  .footer-contact {
    margin-top: 30px;
  }
}

/* Small Devices (Landscape Phones, less than 768px) */
@media (max-width: 767.98px) {
  .hero {
    text-align: center;
    padding: 100px 0 50px 0;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero h2 {
    font-size: 16px;
  }
  
  .hero .hero-btns {
    justify-content: center;
  }
  
  .hero .hero-img img {
    max-width: 100%;
  }
  
  .section-title h2 {
    font-size: 24px;
  }
  
  .section-title p {
    font-size: 16px;
  }
  
  section {
    padding: 60px 0;
  }
  
  .services .service-box {
    margin-bottom: 30px;
  }
  
  .testimonials .testimonial-item {
    padding: 20px;
  }
  
  .testimonials .testimonial-img {
    width: 80px;
    height: 80px;
  }
  
  .cta {
    text-align: center;
  }
  
  .cta .cta-btn-container {
    text-align: center;
  }
  
  .footer-top {
    padding: 40px 0 20px 0;
  }
  
  .footer-info, .footer-links {
    margin-bottom: 20px;
  }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
  .hero h1 {
    font-size: 28px;
  }
  
  .hero h2 {
    font-size: 15px;
  }
  
  .hero .btn-primary,
  .hero .btn-secondary {
    display: block;
    width: 100%;
    margin: 10px 0;
  }
  
  .section-title h2 {
    font-size: 22px;
  }
  
  .navbar .login-btn,
  .navbar .register-btn {
    display: block;
    margin: 10px 0;
    text-align: center;
  }
  
  .signals-table {
    font-size: 12px;
  }
  
  .signals-table th,
  .signals-table td {
    padding: 10px 5px;
  }
  
  .testimonials .testimonial-item {
    padding: 15px;
  }
  
  .testimonials .testimonial-img {
    width: 60px;
    height: 60px;
  }
  
  .testimonials .testimonial-item h3 {
    font-size: 18px;
  }
  
  .cta h3 {
    font-size: 20px;
  }
  
  .back-to-top {
    right: 10px;
    bottom: 10px;
  }
}

/* Header Responsive Styles */
@media (max-width: 1199px) {
  .header-content {
    padding: 0 15px;
  }
  
  .nav-container {
    max-width: 700px;
  }
  
  .main-nav {
    margin: 0 auto;
    width: 100%;
    justify-content: space-between;
  }
  
  .main-nav .nav-item {
    margin: 0 5px;
  }
  
  .main-nav .nav-link {
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
  }
  
  .auth-buttons .btn {
    padding: 6px 15px;
    font-size: 13px;
  }
  
  /* Dropdown adjustments */
  .dropdown-content {
    flex-wrap: wrap;
  }
  
  .dropdown-column {
    min-width: 160px;
  }
  
  .dropdown-promo {
    min-width: 250px;
  }
}

/* Force desktop navigation to be visible in the test environment */
.nav-container {
  display: flex !important;
}

.main-nav {
  display: flex !important;
}

@media (max-width: 991px) {
  .header {
    padding: 15px 0;
  }
  
  /* Menu toggle still visible for mobile view */
  .menu-toggle {
    display: block;
  }
  
  .auth-buttons .login-btn {
    display: none;
  }
  
  /* Menu Overlay Styles */
  .menu-overlay {
    overflow-y: auto;
  }
  
  .submenu-container {
    flex-direction: column;
  }
  
  .submenu-section {
    margin-bottom: 20px;
  }
  
  .submenu-image {
    margin-top: 20px;
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .auth-buttons .register-btn {
    display: none;
  }
  
  .overlay-header {
    padding: 15px;
  }
  
  .overlay-content {
    padding: 15px;
  }
  
  .accordion-button {
    padding: 15px 0;
    font-size: 15px;
  }
  
  .submenu-section h3 {
    font-size: 13px;
  }
  
  .submenu-section ul li a {
    font-size: 14px;
  }
  
  .image-caption h4 {
    font-size: 16px;
  }
  
  .image-caption p {
    font-size: 13px;
  }
}

@media (max-width: 575px) {
  .header {
    padding: 10px 0;
  }
  
  .header .logo {
    max-height: 35px;
  }
  
  .menu-toggle {
    font-size: 20px;
  }
  
  .overlay-footer .auth-buttons .btn {
    padding: 10px 15px;
  }
}

/* Swiper Responsive Fixes */
@media (max-width: 767px) {
  .testimonials-slider .swiper-slide {
    opacity: 1;
    height: auto !important;
  }
  
  .testimonials-slider .swiper-wrapper {
    height: auto !important;
  }
  
  .testimonials-slider .swiper-pagination {
    bottom: 0;
    position: relative;
    margin-top: 20px;
  }
  
  .testimonials {
    padding: 60px 0;
  }
  
  .testimonials .testimonial-item {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* Space theme specific adjustments */
  .hero::before {
    background-size: 200%; /* Make stars more visible on small screens */
  }
  
  .hero h1 {
    text-shadow: 0 0 15px rgba(126, 58, 242, 0.5); /* Adjusted glow for smaller screens */
  }
  
  .cta::before {
    opacity: 0.05; /* Reduce tech grid opacity on small screens */
  }
}

/* Table Responsive Fixes */
@media (max-width: 767px) {
  .signals-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .signals-table .table {
    min-width: 650px;
  }
  
  /* Enhance table contrast on dark theme for mobile */
  .signals-table td {
    color: var(--gray-800); /* Brighter text for better readability */
    padding: 12px 8px; /* Slightly smaller padding on mobile */
  }
  
  .signals-table th {
    padding: 12px 8px;
    font-size: 13px;
  }
  
  .signals-table .currency-pair {
    color: var(--primary-color); /* Make currency pairs stand out */
    font-size: 14px;
  }
  
  .signals-table .signal-type {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .signals-table .status {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  /* Add horizontal scroll indicator */
  .table-responsive::after {
    content: '← Scroll →';
    display: block;
    text-align: center;
    padding: 8px;
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
  }
  
  @keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
  }
}

/* Dark Theme Specific Mobile Adjustments */
@media (max-width: 575.98px) {
  /* Enhance button glow effects on small screens */
  .hero .btn-primary,
  .hero .btn-secondary,
  .cta .cta-btn {
    box-shadow: 0 0 15px rgba(126, 58, 242, 0.4); /* Slightly reduced glow */
  }
  
  /* Adjust card styling for better mobile visibility */
  .services .service-box,
  .popular-courses .course-card,
  .testimonials .testimonial-item {
    border: 1px solid rgba(126, 58, 242, 0.2); /* More visible borders */
  }
  
  /* Enhance icon visibility */
  .services .service-box .icon {
    box-shadow: 0 0 10px rgba(126, 58, 242, 0.3); /* Slightly enhanced glow */
  }
}

/* Touch-friendly adjustments */
@media (max-width: 991px) {
  /* Increase touch target sizes */
  .navbar a, 
  .navbar a:focus,
  .footer-links ul a,
  .social-links a,
  .btn,
  .read-more {
    min-height: 44px; /* Apple's recommended minimum touch target size */
    display: flex;
    align-items: center;
  }
  
  /* Add more space between clickable elements */
  .navbar li,
  .footer-links ul li {
    margin-bottom: 5px;
  }
  
  /* Make buttons more touch-friendly */
  .btn-primary,
  .btn-secondary,
  .btn-outline-primary,
  .btn-outline-light {
    padding: 10px 20px;
    font-size: 16px;
  }
  
  /* Improve mobile navigation */
  .navbar-toggler {
    padding: 10px;
    border: none;
    background-color: rgba(126, 58, 242, 0.1);
    border-radius: 5px;
  }
  
  .navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(126, 58, 242, 0.3);
  }
  
  /* Improve form elements on mobile */
  input, select, textarea, button {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 12px 15px;
  }
  
  /* Fix for iOS momentum scrolling */
  .signals-table,
  .testimonials-slider {
    -webkit-overflow-scrolling: touch;
  }
}

/* Fluid typography for better responsiveness */
@media screen and (max-width: 768px) {
  html {
    font-size: 15px; /* Slightly smaller base font size on mobile */
  }
  
  body {
    line-height: 1.5;
  }
  
  h1 {
    font-size: calc(1.5rem + 2vw); /* Fluid typography based on viewport width */
  }
  
  h2 {
    font-size: calc(1.3rem + 1vw);
  }
  
  h3 {
    font-size: calc(1.1rem + 0.5vw);
  }
  
  p, li, td, th {
    font-size: calc(0.95rem + 0.2vw);
  }
}
