/**
 * ============================================================================
 * COMPLETE MOBILE RESPONSIVE STYLES
 * ============================================================================
 * Comprehensive mobile responsiveness for all devices
 * Preserves desktop and existing CSS - only adds mobile breakpoints
 * ============================================================================
 */

/* ============================================================================
 * BASE MOBILE SETUP - All Devices
 * ============================================================================ */

/* Ensure proper box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent horizontal scroll on mobile */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* ============================================================================
 * TABLET LANDSCAPE (992px - 1199px)
 * ============================================================================ */
@media (max-width: 1199px) and (min-width: 992px) {
  .container {
    max-width: 960px;
  }
  
  /* Adjust font sizes slightly */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

/* ============================================================================
 * TABLET PORTRAIT (768px - 991px)
 * ============================================================================ */
@media (max-width: 991px) {
  /* Container adjustments */
  .container {
    max-width: 720px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Typography scaling */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }
  
  /* Section padding reduction */
  .section-full {
    padding: 50px 0;
  }
  
  /* Header adjustments */
  .header-nav .nav-table {
    display: none;
  }
  
  /* Grid adjustments - 2 columns */
  .col-lg-4, .col-lg-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  /* Job cards */
  .twm-jobs-grid-style1,
  .new-job-card {
    margin-bottom: 20px;
  }
  
  /* Forms */
  .form-group {
    margin-bottom: 15px;
  }
  
  /* Buttons */
  .site-button, .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* ============================================================================
 * MOBILE LANDSCAPE (576px - 767px)
 * ============================================================================ */
@media (max-width: 767px) {
  /* Container */
  .container {
    max-width: 540px;
    padding-left: 12px;
    padding-right: 12px;
  }
  
  /* Typography */
  body { font-size: 14px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }
  h4 { font-size: 1rem; }
  p { font-size: 14px; }
  
  /* Section padding */
  .section-full {
    padding: 40px 0;
  }
  
  .p-t120, .p-t100, .p-t90, .p-t80, .p-t70 {
    padding-top: 40px !important;
  }
  
  .p-b120, .p-b100, .p-b90, .p-b80, .p-b70 {
    padding-bottom: 40px !important;
  }
  
  /* Grid - Single column */
  .col-md-6, .col-md-4, .col-md-3,
  .col-lg-6, .col-lg-4, .col-lg-3 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }
  
  /* Header */
  .site-header {
    padding: 10px 0;
  }
  
  .logo-header img {
    max-height: 40px;
  }
  
  /* Navigation */
  .header-nav-btn-section {
    display: none;
  }
  
  /* Hero/Banner Section */
  .twm-home1-banner-section {
    padding: 30px 0;
  }
  
  .twm-bnr-title-large {
    font-size: 24px;
    line-height: 1.3;
  }
  
  .twm-bnr-title-small {
    font-size: 14px;
  }
  
  /* Search Bar */
  .twm-bnr-search-bar .form-group {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .twm-bnr-search-bar .form-control {
    height: 45px;
    font-size: 14px;
  }
  
  /* Job Cards */
  .twm-jobs-grid-style1,
  .new-job-card {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .job-card-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .company-logo {
    width: 50px;
    height: 50px;
  }
  
  .job-title {
    font-size: 16px;
  }
  
  .job-location {
    font-size: 13px;
  }
  
  .apply-now-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }
  
  /* Job Categories */
  .job-categories-block,
  .job-cat-block-hpage-6 {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  /* How It Works */
  .twm-w-process-steps,
  .twm-w-process-steps3 {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .twm-w-process-steps h4,
  .twm-w-process-steps3 h4 {
    font-size: 16px;
  }
  
  /* Recruiters */
  .twm-recruiters5-box {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  /* Footer */
  .footer-top {
    padding: 40px 0;
  }
  
  .footer-bottom {
    padding: 20px 0;
  }
  
  /* Forms */
  .form-control,
  .form-select {
    padding: 10px;
    font-size: 14px;
    height: 45px;
  }
  
  textarea.form-control {
    height: auto;
    min-height: 100px;
  }
  
  /* Buttons */
  .site-button, .btn {
    padding: 12px 20px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 10px;
  }
  
  .btn-group .btn {
    width: auto;
  }
  
  /* Tables */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Modals */
  .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
  
  .modal-content {
    padding: 15px;
  }
  
  /* Cards */
  .card, .panel {
    margin-bottom: 15px;
  }
  
  .card-body, .panel-body {
    padding: 15px;
  }
}

/* ============================================================================
 * MOBILE PORTRAIT (320px - 575px)
 * ============================================================================ */
@media (max-width: 575px) {
  /* Container */
  .container {
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Typography */
  body { font-size: 13px; }
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.15rem; }
  h3 { font-size: 1rem; }
  h4 { font-size: 0.95rem; }
  p { font-size: 13px; }
  
  /* Section padding */
  .section-full {
    padding: 30px 0;
  }
  
  .p-t120, .p-t100, .p-t90, .p-t80, .p-t70, .p-t60, .p-t50 {
    padding-top: 30px !important;
  }
  
  .p-b120, .p-b100, .p-b90, .p-b80, .p-b70, .p-b60, .p-b50 {
    padding-bottom: 30px !important;
  }
  
  /* Header */
  .logo-header img {
    max-height: 35px;
  }
  
  /* Banner */
  .twm-bnr-title-large {
    font-size: 20px;
  }
  
  .twm-bnr-title-small {
    font-size: 13px;
  }
  
  /* Job Cards */
  .twm-jobs-grid-style1,
  .new-job-card {
    padding: 12px;
  }
  
  .company-logo {
    width: 45px;
    height: 45px;
  }
  
  .job-title {
    font-size: 15px;
  }
  
  .job-location {
    font-size: 12px;
  }
  
  .apply-now-btn {
    padding: 10px;
    font-size: 13px;
  }
  
  /* Job Categories */
  .job-cat-block-hpage-6 .twm-media {
    width: 40px;
    height: 40px;
  }
  
  /* Forms */
  .form-control,
  .form-select {
    padding: 8px;
    font-size: 13px;
    height: 42px;
  }
  
  /* Buttons */
  .site-button, .btn {
    padding: 10px 15px;
    font-size: 13px;
  }
  
  /* Modals */
  .modal-dialog {
    margin: 5px;
    max-width: calc(100% - 10px);
  }
  
  .modal-content {
    padding: 12px;
  }
  
  /* Cards */
  .card-body, .panel-body {
    padding: 12px;
  }
}

/* ============================================================================
 * SMALL MOBILE (320px - 479px)
 * ============================================================================ */
@media (max-width: 479px) {
  /* Typography */
  body { font-size: 12px; }
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1.05rem; }
  h3 { font-size: 0.95rem; }
  h4 { font-size: 0.9rem; }
  p { font-size: 12px; }
  
  /* Section padding */
  .section-full {
    padding: 25px 0;
  }
  
  /* Banner */
  .twm-bnr-title-large {
    font-size: 18px;
  }
  
  /* Job Cards */
  .company-logo {
    width: 40px;
    height: 40px;
  }
  
  .job-title {
    font-size: 14px;
  }
  
  /* Forms */
  .form-control,
  .form-select {
    font-size: 12px;
    height: 40px;
  }
  
  /* Buttons */
  .site-button, .btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ============================================================================
 * DASHBOARD/ADMIN PANEL MOBILE RESPONSIVE
 * ============================================================================ */

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 991px) {
  /* Sidebar */
  #sidebar-admin-wraper {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 9999;
    transition: left 0.3s ease;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  #sidebar-admin-wraper.active {
    left: 0;
  }
  
  /* Main content */
  .wt-admin-dashboard-2,
  #content {
    margin-left: 0 !important;
  }
  
  /* Prevent body scroll when sidebar open */
  body.sidebar-open {
    overflow: hidden;
  }
  
  /* Dashboard cards */
  .dashboard-card-2 {
    margin-bottom: 15px;
  }
  
  /* Tables */
  .panel-body .table-responsive {
    overflow-x: auto;
  }
  
  /* Forms in panels */
  .panel .col-xl-4,
  .panel .col-lg-4,
  .panel .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 15px;
  }
}

@media (max-width: 767px) {
  /* Dashboard header */
  .wt-admin-right-page-header h2 {
    font-size: 1.25rem;
  }
  
  /* Dashboard stats */
  .counter {
    font-size: 1.5rem;
  }
  
  /* Job management cards */
  .manage-jobs-card {
    flex-direction: column;
    gap: 10px;
  }
  
  .manage-jobs-card .btn-group {
    width: 100%;
  }
  
  .manage-jobs-card .btn {
    flex: 1;
  }
}

/* ============================================================================
 * TOUCH-FRIENDLY IMPROVEMENTS
 * ============================================================================ */
@media (hover: none) and (pointer: coarse) {
  /* Minimum touch target size: 44x44px */
  button, .btn, .site-button,
  a[role="button"], input[type="button"],
  input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
  }
  
  /* Larger form controls */
  .form-control, .form-select {
    min-height: 44px;
    padding: 12px;
  }
  
  /* Larger clickable areas */
  .nav-link, .dropdown-item {
    padding: 12px 15px;
  }
}

/* ============================================================================
 * LANDSCAPE ORIENTATION ADJUSTMENTS
 * ============================================================================ */
@media (max-height: 600px) and (orientation: landscape) {
  /* Reduce vertical padding */
  .section-full {
    padding: 20px 0;
  }
  
  .p-t120, .p-t100, .p-t90, .p-t80, .p-t70, .p-t60, .p-t50 {
    padding-top: 20px !important;
  }
  
  .p-b120, .p-b100, .p-b90, .p-b80, .p-b70, .p-b60, .p-b50 {
    padding-bottom: 20px !important;
  }
  
  /* Compact headers */
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1.1rem; }
  
  /* Modals */
  .modal-dialog {
    margin: 5px auto;
  }
}

/* ============================================================================
 * SPECIFIC COMPONENT MOBILE FIXES
 * ============================================================================ */

/* Owl Carousel Mobile */
@media (max-width: 767px) {
  .owl-carousel .owl-item {
    padding: 0 5px;
  }
  
  .owl-nav {
    display: none;
  }
  
  .owl-dots {
    margin-top: 15px;
  }
}

/* Dropdown Mobile */
@media (max-width: 767px) {
  .dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100%;
    border: none;
    box-shadow: none;
  }
}

/* Tabs Mobile */
@media (max-width: 767px) {
  .nav-tabs {
    flex-wrap: wrap;
  }
  
  .nav-tabs .nav-link {
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* Pagination Mobile */
@media (max-width: 767px) {
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page-link {
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* Breadcrumb Mobile */
@media (max-width: 767px) {
  .breadcrumb {
    font-size: 12px;
    padding: 8px 0;
  }
  
  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 5px;
  }
}

/* Alert Mobile */
@media (max-width: 767px) {
  .alert {
    padding: 10px;
    font-size: 13px;
  }
}

/* Badge Mobile */
@media (max-width: 767px) {
  .badge {
    font-size: 11px;
    padding: 4px 8px;
  }
}

/* ============================================================================
 * UTILITY CLASSES FOR MOBILE
 * ============================================================================ */

/* Hide on mobile */
@media (max-width: 767px) {
  .d-mobile-none {
    display: none !important;
  }
}

/* Show only on mobile */
.d-mobile-block {
  display: none !important;
}

@media (max-width: 767px) {
  .d-mobile-block {
    display: block !important;
  }
}

/* Text alignment mobile */
@media (max-width: 767px) {
  .text-mobile-center {
    text-align: center !important;
  }
  
  .text-mobile-left {
    text-align: left !important;
  }
}

/* Spacing mobile */
@media (max-width: 767px) {
  .mb-mobile-3 {
    margin-bottom: 1rem !important;
  }
  
  .mt-mobile-3 {
    margin-top: 1rem !important;
  }
  
  .p-mobile-2 {
    padding: 0.5rem !important;
  }
}

/* ============================================================================
 * PERFORMANCE OPTIMIZATIONS FOR MOBILE
 * ============================================================================ */

/* Disable animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Optimize images on mobile */
@media (max-width: 767px) {
  img {
    max-width: 100%;
    height: auto;
  }
}

/* ============================================================================
 * END OF MOBILE RESPONSIVE STYLES
 * ============================================================================ */
