/* ========================================
   RESPONSIVE CSS - MOBILE FIRST APPROACH
   ======================================== */

/* Base Mobile Styles (320px+) */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Container Responsive */
.container {
  width: 100%;
  max-width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
}

/* Navigation - Mobile First */
.navbar {
  padding: 0.5rem 1rem;
  background: linear-gradient(to right, #2a4397, #27a8e1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand img {
  max-height: 40px;
  width: auto;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
  font-size: 1.5rem;
  background: transparent;
  color: #fff;
}

.navbar-collapse {
  background: linear-gradient(to right, #2a4397, #27a8e1);
  margin-top: 1rem;
  border-radius: 0.5rem;
  padding: 1rem;
}

.navbar-nav {
  flex-direction: column;
  width: 100%;
}

.navbar-nav .nav-item {
  margin: 0.25rem 0;
}

.navbar-nav .nav-link {
  color: #fff !important;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  background: rgba(255,255,255,0.1);
  transform: translateX(5px);
}

/* Header Responsive */
#header {
  padding: 0.5rem 0;
  height: auto;
  min-height: 70px;
}

/* Hero Section Mobile */
.banner {
  padding: 100px 1rem 2rem;
  min-height: 100vh;
  background: linear-gradient(135deg, #feae3b 0%, #f39c12 100%);
  display: flex;
  align-items: center;
}

.banner h1 {
  font-size: 1.75rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.banner p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Carousel Mobile */
.carousel-inner {
  border-radius: 1rem;
  overflow: hidden;
}

.slider-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.carousel-item .d-flex {
  flex-direction: column;
  align-items: center;
}

/* Services Section Mobile */
.services {
  padding: 3rem 1rem;
}

.service-box {
  margin-bottom: 2rem;
  padding: 2rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.service-box:hover {
  transform: translateY(-5px);
}

.service-box .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #2a4397;
}

.service-box h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Download Section Mobile */
.download-app {
  padding: 3rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #feae3b 0%, #f39c12 100%);
  border-radius: 1rem;
  margin: 2rem 1rem;
}

.download-app h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.download-app .btn {
  margin: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  border: none;
  background: rgba(255,255,255,0.2);
  transition: all 0.3s ease;
}

.download-app .btn:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.05);
}

.download-app img {
  max-width: 150px;
  height: auto;
}

/* Contact Form Mobile */
.contact {
  padding: 3rem 1rem;
}

.contact-form {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-control {
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: #2a4397;
  box-shadow: 0 0 0 0.2rem rgba(42, 67, 151, 0.25);
}

/* Buttons Mobile */
.btn {
  padding: 0.75rem 2rem;
  border-radius: 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #2a4397 0%, #27a8e1 100%);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(42, 67, 151, 0.4);
}

/* Tables Mobile - Convert to Cards */
.table-responsive {
  border: none;
  box-shadow: none;
}

.table-mobile-card {
  display: none;
}

@media (max-width: 767px) {
  .table,
  .table thead,
  .table tbody,
  .table th,
  .table td,
  .table tr {
    display: block;
  }
  
  .table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .table tr {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  .table td {
    border: none;
    position: relative;
    padding: 0.5rem 0 0.5rem 30%;
    text-align: left;
  }
  
  .table td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 0;
    width: 25%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
    color: #2a4397;
  }
  
  .table-mobile-card {
    display: block;
  }
  
  .table-desktop {
    display: none;
  }
}

/* Dropdowns Mobile */
.dropdown-menu {
  border: none;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.dropdown-item {
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: #2a4397;
  transform: translateX(5px);
}

/* Modals Mobile */
.modal-dialog {
  margin: 1rem;
  max-width: calc(100% - 2rem);
}

.modal-content {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 1rem 1.5rem;
}

/* Footer Mobile */
.footer-copy {
  background: #083362;
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
}

/* Utility Classes */
.text-center-mobile {
  text-align: center;
}

.hide-mobile {
  display: none;
}

.show-mobile {
  display: block;
}

/* ========================================
   TABLET STYLES (768px+)
   ======================================== */
@media (min-width: 768px) {
  .container {
    max-width: 750px;
    padding: 0 2rem;
  }
  
  .navbar-collapse {
    background: transparent;
    margin-top: 0;
    padding: 0;
  }
  
  .navbar-nav {
    flex-direction: row;
    margin-left: auto;
  }
  
  .navbar-nav .nav-item {
    margin: 0 0.5rem;
  }
  
  .navbar-nav .nav-link:hover {
    transform: none;
  }
  
  .banner h1 {
    font-size: 2.5rem;
  }
  
  .banner p {
    font-size: 1.1rem;
  }
  
  .carousel-item .d-flex {
    flex-direction: row;
    justify-content: center;
  }
  
  .slider-img {
    max-width: 200px;
    margin: 0.5rem;
  }
  
  .service-box {
    margin-bottom: 2rem;
  }
  
  .download-app {
    margin: 2rem 0;
  }
  
  .hide-mobile {
    display: block;
  }
  
  .show-mobile {
    display: none;
  }
  
  .text-center-mobile {
    text-align: left;
  }
}

/* ========================================
   DESKTOP STYLES (992px+)
   ======================================== */
@media (min-width: 992px) {
  .container {
    max-width: 970px;
  }
  
  .banner {
    padding: 120px 2rem 4rem;
  }
  
  .banner h1 {
    font-size: 3rem;
  }
  
  .banner p {
    font-size: 1.2rem;
  }
  
  .slider-img {
    max-width: 250px;
  }
  
  .services {
    padding: 4rem 2rem;
  }
  
  .service-box {
    padding: 3rem 2rem;
  }
  
  .download-app {
    padding: 4rem 2rem;
  }
  
  .contact {
    padding: 4rem 2rem;
  }
}

/* ========================================
   LARGE DESKTOP STYLES (1200px+)
   ======================================== */
@media (min-width: 1200px) {
  .container {
    max-width: 1170px;
  }
  
  .banner h1 {
    font-size: 3.5rem;
  }
  
  .slider-img {
    max-width: 300px;
  }
}

/* ========================================
   EXTRA LARGE DESKTOP STYLES (1400px+)
   ======================================== */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .banner h1 {
    font-size: 4rem;
  }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */
@media (prefers-color-scheme: dark) {
  .service-box {
    background: #2d3748;
    color: #fff;
  }
  
  .contact-form {
    background: #2d3748;
    color: #fff;
  }
  
  .form-control {
    background: #4a5568;
    border-color: #4a5568;
    color: #fff;
  }
  
  .form-control:focus {
    background: #4a5568;
    border-color: #2a4397;
    color: #fff;
  }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus indicators */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid #2a4397;
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .btn-primary {
    background: #000;
    border: 2px solid #fff;
  }
  
  .navbar {
    background: #000;
    border-bottom: 2px solid #fff;
  }
}

/* Print styles */
@media print {
  .navbar,
  .btn,
  .carousel-control-prev,
  .carousel-control-next {
    display: none !important;
  }
  
  .banner {
    background: none !important;
    color: #000 !important;
  }
  
  .service-box {
    border: 1px solid #000;
    box-shadow: none;
  }
}