/**
 * Enhanced Mobile Responsiveness for Traveler Theme
 * Optimized for phones and tablets
 * Add this to your theme's CSS files
 */

/* ===================================
   MOBILE-FIRST BASE STYLES
   =================================== */

/* Ensure proper viewport scaling */
@viewport {
  width: device-width;
  zoom: 1;
}

/* Improve touch targets - minimum 44x44px */
@media (max-width: 767px) {
  
  /* === GENERAL TOUCH IMPROVEMENTS === */
  a, button, input[type="submit"], input[type="button"], .btn {
    min-height: 44px !important;
    min-width: 44px;
    padding: 12px 20px !important;
    font-size: 16px !important;
  }
  
  /* Links and clickable elements */
  a {
    padding: 8px 4px;
    line-height: 1.6;
  }
  
  /* === TYPOGRAPHY === */
  body {
    font-size: 16px !important;
    line-height: 1.6 !important;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
  
  h1 { font-size: 28px !important; line-height: 1.3 !important; }
  h2 { font-size: 24px !important; line-height: 1.3 !important; }
  h3 { font-size: 20px !important; line-height: 1.3 !important; }
  h4 { font-size: 18px !important; line-height: 1.4 !important; }
  h5 { font-size: 16px !important; line-height: 1.4 !important; }
  h6 { font-size: 15px !important; line-height: 1.4 !important; }
  
  p {
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
  }
  
  /* === HEADER & NAVIGATION === */
  #header .header {
    padding: 15px 20px !important;
  }
  
  .menu-style-1 ul.slimmenu li a,
  .menu-style-2 ul.slimmenu li a {
    padding: 15px 20px !important;
    font-size: 17px !important;
  }
  
  .menu-style-1 ul.slimmenu li a .sub-toggle,
  .menu-style-2 ul.slimmenu li a .sub-toggle {
    width: 48px !important;
    height: 48px !important;
    line-height: 48px !important;
  }
  
  /* === FORMS & INPUTS === */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 12px 15px !important;
    min-height: 48px !important;
    border-radius: 4px !important;
    width: 100% !important;
    margin-bottom: 15px !important;
  }
  
  select {
    background-size: 16px;
    padding-right: 40px !important;
  }
  
  textarea {
    min-height: 120px !important;
  }
  
  label {
    font-size: 16px !important;
    margin-bottom: 8px !important;
    display: block !important;
  }
  
  /* Form booking wrapper */
  .form-book-wrapper .form-group {
    margin-bottom: 20px !important;
  }
  
  .form-book-wrapper .btn-primary {
    width: 100% !important;
    padding: 15px !important;
    font-size: 18px !important;
    margin-top: 10px !important;
  }
  
  /* === IMAGES === */
  img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  
  /* === TOURS/HOTELS/ACTIVITIES LISTINGS === */
  .booking-item {
    margin-bottom: 20px !important;
    padding: 15px !important;
  }
  
  .booking-item-title {
    font-size: 20px !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
  }
  
  .booking-item-description {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
  
  .booking-item-price {
    font-size: 24px !important;
    font-weight: bold !important;
  }
  
  .booking-item-price-from {
    font-size: 14px !important;
  }
  
  .booking-item-rating-stars {
    margin: 10px 0 !important;
  }
  
  .booking-item-rating-stars li {
    font-size: 16px !important;
    margin-right: 3px !important;
  }
  
  /* === SINGLE TOUR/HOTEL PAGES === */
  .st-single-tour .st-tour-feature,
  .single-st_hotel .booking-item-features {
    padding: 15px !important;
  }
  
  .booking-item-features li {
    padding: 10px 15px !important;
    font-size: 16px !important;
    margin-bottom: 10px !important;
  }
  
  /* Review sections */
  .review-box {
    padding: 15px !important;
    margin-bottom: 20px !important;
  }
  
  .review-box-score {
    font-size: 32px !important;
    padding: 20px !important;
  }
  
  /* === TABS === */
  .nav-tabs > li > a {
    padding: 12px 15px !important;
    font-size: 16px !important;
    min-height: 48px !important;
  }
  
  .tab-content {
    padding: 20px 15px !important;
  }
  
  /* === GALLERY === */
  .popup-gallery {
    margin: 0 -5px !important;
  }
  
  .popup-gallery .col-xs-4,
  .popup-gallery .col-xs-6 {
    padding: 5px !important;
  }
  
  /* === FOOTER === */
  #main-footer {
    padding: 30px 20px !important;
  }
  
  #main-footer .footer-col {
    margin-bottom: 30px !important;
  }
  
  /* === SPACING & MARGINS === */
  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  
  .row {
    margin-left: -10px !important;
    margin-right: -10px !important;
  }
  
  [class*="col-"] {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  /* === MODALS === */
  .modal-dialog {
    margin: 10px !important;
    width: calc(100% - 20px) !important;
  }
  
  .modal-content {
    padding: 20px !important;
  }
  
  .modal-title {
    font-size: 22px !important;
  }
  
  /* === SEARCH FILTERS === */
  .ajax-filter {
    padding: 15px !important;
  }
  
  .ajax-filter .filter-item {
    margin-bottom: 15px !important;
  }
  
  /* === CALENDAR === */
  .daterangepicker {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .calendar-table {
    font-size: 14px !important;
  }
  
  .calendar-table td {
    min-width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
  }
  
  /* === BOOKING FORMS === */
  .booking-form {
    padding: 20px 15px !important;
  }
  
  .booking-form .form-row {
    margin-bottom: 20px !important;
  }
  
  /* === MAP VIEW === */
  .page-half-map .col-left-map {
    width: 100% !important;
    position: relative !important;
  }
  
  .page-half-map .col-right-map {
    width: 100% !important;
    height: 400px !important;
    position: relative !important;
  }
  
  /* === BREADCRUMBS === */
  .breadcrumb {
    font-size: 14px !important;
    padding: 10px 20px !important;
  }
  
  /* === BUTTONS === */
  .btn-lg {
    font-size: 18px !important;
    padding: 15px 25px !important;
  }
  
  .btn-sm {
    font-size: 14px !important;
    padding: 10px 15px !important;
    min-height: 40px !important;
  }
  
  /* === TABLES === */
  table {
    font-size: 15px !important;
  }
  
  table td,
  table th {
    padding: 12px 8px !important;
  }
  
  /* === ICONS === */
  .fa, .icon {
    font-size: 18px !important;
    min-width: 20px;
  }
  
  /* === SEARCH BAR === */
  .search-form {
    padding: 15px !important;
  }
  
  .search-form input[type="text"] {
    font-size: 16px !important;
    padding: 12px 15px !important;
  }
  
  /* === TOUR PACKAGE INFO === */
  .package-info-wrapper {
    padding: 15px !important;
  }
  
  .package-info {
    margin-bottom: 20px !important;
  }
  
  /* === FACILITIES/AMENITIES === */
  .facilities-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  .facility-item {
    padding: 15px !important;
    min-height: 60px !important;
  }
}

/* ===================================
   TABLET PORTRAIT (768px - 991px)
   =================================== */
@media (min-width: 768px) and (max-width: 991px) {
  
  body {
    font-size: 15px !important;
  }
  
  h1 { font-size: 32px !important; }
  h2 { font-size: 28px !important; }
  h3 { font-size: 24px !important; }
  
  .container {
    padding-left: 30px !important;
    padding-right: 30px !important;
  }
  
  .booking-item-title {
    font-size: 22px !important;
  }
  
  a, button, .btn {
    min-height: 42px !important;
    padding: 10px 18px !important;
  }
}

/* ===================================
   LANDSCAPE PHONE (480px - 767px)
   =================================== */
@media (min-width: 480px) and (max-width: 767px) {
  
  .booking-item {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .booking-item-img {
    width: 100% !important;
    margin-bottom: 15px !important;
  }
  
  .booking-item-details {
    width: 100% !important;
  }
}

/* ===================================
   VERY SMALL PHONES (max 375px)
   =================================== */
@media (max-width: 375px) {
  
  body {
    font-size: 15px !important;
  }
  
  h1 { font-size: 24px !important; }
  h2 { font-size: 21px !important; }
  h3 { font-size: 18px !important; }
  
  .booking-item-price {
    font-size: 20px !important;
  }
  
  .btn {
    padding: 12px 15px !important;
    font-size: 15px !important;
  }
}

/* ===================================
   PERFORMANCE & OPTIMIZATION
   =================================== */

/* Reduce animations on mobile for performance */
@media (max-width: 767px) {
  * {
    -webkit-animation-duration: 0.1s !important;
    animation-duration: 0.1s !important;
    -webkit-transition-duration: 0.1s !important;
    transition-duration: 0.1s !important;
  }
  
  /* Lazy load images */
  img[loading="lazy"] {
    background: #f0f0f0;
  }
  
  /* Optimize scrolling */
  body {
    -webkit-overflow-scrolling: touch;
  }
}

/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */
@media (max-width: 767px) {
  
  /* Focus states for keyboard navigation */
  a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid #007bff !important;
    outline-offset: 2px !important;
  }
  
  /* Skip to content link */
  .skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 10px;
    z-index: 100;
  }
  
  .skip-to-content:focus {
    top: 0;
  }
}

/* ===================================
   LANDSCAPE ORIENTATION
   =================================== */
@media (max-width: 767px) and (orientation: landscape) {
  
  /* Reduce header size in landscape */
  #header .header {
    padding: 10px 20px !important;
  }
  
  /* Optimize vertical space */
  .booking-item {
    padding: 10px !important;
  }
  
  h1 { font-size: 24px !important; }
  h2 { font-size: 20px !important; }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
  
  body {
    font-size: 12pt !important;
    line-height: 1.5 !important;
  }
  
  /* Hide navigation and unnecessary elements */
  #header, #main-footer, .nav-tabs, .btn, .social-share {
    display: none !important;
  }
  
  /* Show important content */
  .booking-item-title,
  .booking-item-description,
  .booking-item-price {
    display: block !important;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* ===================================
   END OF ENHANCED MOBILE STYLES
   =================================== */

/* 
   Note: All colors maintained from original theme
   No color overrides - respecting theme's color scheme
*/
