@media screen and (min-width: 981px) {
  .isMobile:not(.isDesktop), .isTablet:not(.isDesktop) {display:none!important;}
}

@media screen and (max-width: 980px) {
  body.home #main, body.search #main, body.user #main, body.item #main, body.user-public-profile #main {width:68%;}
  #sidebar, body.search #sidebar {width:30%;}
  body.user #sidebar {width:28%;margin-right:2%;}
  .wrapper {width:100%;max-width:100%;}
  .item-photos .main-photo {width:calc(100% - 92px);}
  #home-cats a {width:calc(25% - 12px);margin:0 12px 12px 0;}
}

@media screen and (min-width: 768px) and (max-width: 980px) {
  .isDesktop:not(.isTablet), .isMobile:not(.isTablet) {display:none!important;}
  #sidebar .g-recaptcha {transform: scale(0.86); transform-origin: 0 0;}
}

@media screen and (min-width: 768px) {
  .resp-toogle, .fixed-layout .fixed-close {display: none;}
}

@media screen and (max-width: 767px) {
  body.osc-has-admin-header header {margin-top:46px;}
  .item-post .meta[data-type="CHECKBOX"] {padding-left:0;padding-right:0;}
  .isDesktop:not(.isMobile), .isTablet:not(.isMobile) {display:none!important;}
  footer #subdomains-list a {max-width:50%;}
  body.subdomain-navigation {padding-top:0;}
  body.subdomain-navigation header {position:relative;height:auto;top:auto;left:auto;}
  body.subdomain-navigation.sd-with-icon #subdomains-list {padding-left:0px;padding-right:0px;}
  body.subdomain-navigation.sd-with-icon #subdomains-list a {max-width:104px;}
  body.item.item-post #main {width:100%;}
  body.item-post #error_list {width:100%;margin-left:0;}
  #home-regs .wrap > div:nth-of-type(1n+10) {display: block;}
  header {height:64px;padding:8px 16px;position:fixed;top:0;left:0;z-index:100;box-shadow:var(--shadow-md);}
  body {padding-top:64px;}
  header #logo img {height:40px;margin:4px 0;}
  .menu-icon {width:44px;height:44px;position:absolute;right:4px;top:2px;padding:12px 10px;border-radius:var(--radius);border:none;transition:var(--transition);display:flex;align-items:center;justify-content:center;}
  .menu-icon:active, .menu-icon:focus {background:var(--bg-light);}
  .menu-icon > div {display:inline-block;position:relative;width:22px;height:16px;}
  .menu-icon span {position:absolute;left:0;width:100%;height:2px;border-radius:100px;background:var(--text-primary);top:0;transition:var(--transition);}
  .menu-icon span.l2 {top:50%;margin-top:-1px;}
  .menu-icon span.l3 {bottom:0;top:auto;}
  .menu-icon.opened span.l1 {top: 7px; transform: rotate(45deg);background:var(--primary);}
  .menu-icon.opened span.l2 {opacity:0;}
  .menu-icon.opened span.l3 {top: 7px; transform: rotate(-45deg);background:var(--primary);}
  header .nav {display:none;position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: var(--bg-card); z-index: 99;height:initial;overflow-y: auto;padding:8px 0;}
  header .nav a:hover, header .nav a.active, header .nav a.publish, header .nav a.publish:hover {box-shadow:none;background:var(--bg-light);color:var(--text-primary);border:none;transform:none;}
  header .nav a, header .nav a.active, body.user #sidebar a {clear:both;width:100%;text-align:left;margin:0;padding:16px 24px;border-bottom:1px solid var(--border-color);border-radius:0;color:var(--text-primary);height:auto;font-size:16px;}
  header .nav a.publish {background:linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);color:#fff;margin:12px 16px;width:calc(100% - 32px);text-align:center;border-radius:var(--radius);border:none;}
  body.user #sidebar a {float:left;}
  body.user #sidebar {background:var(--bg-card);padding:0;box-shadow:none;border-radius:0;}
  .show-menu-btn {width: 100%; margin: 0 0 15px 0;}
  #item-content .price {display: inline-block; margin: 0 0 20px 0; font-weight: 700; font-size: 28px; line-height: 32px; color: var(--primary);background:var(--primary-bg);padding:16px 20px;border-radius:var(--radius);}
  #sidebar .filters {background:var(--bg-card);padding:16px;border-radius:var(--radius);box-shadow:var(--shadow-sm);}
  .refine {padding:0;}
  .alert_form {padding:20px;border-radius:var(--radius);}
  .fixed-layout {display:none;position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:50;background:var(--bg-card);padding:24px;overflow-y:auto;}
  .fixed-layout .fixed-close {position:fixed;top:12px;z-index:51;right:16px;cursor:pointer;background:var(--text-primary);width:40px;height:40px;text-align:center;font-size:18px;color:#fff;border-radius:var(--radius-full);display:flex;align-items:center;justify-content:center;}
  .fixed-layout .fixed-close i {line-height:1;}
  .fixed-layout .fixed-close:hover, .fixed-layout .fixed-close:active {background:var(--primary);}
  .fixed-layout .btn {width:auto!important;padding-left:24px!important;padding-right:24px!important;}
  .resp-toogle {display: block;}
  .listing-card-list.listing-grid {width:calc(100% + 16px);margin-left:-8px;margin-right:-8px;}
  .listing-grid .listing-card, .similar_ads .listing-grid .listing-card {width: calc(50% - 16px);margin:0 8px 16px 8px;}
  .listing-card {padding:16px;margin-bottom:12px;}
  .main-search > .cell.c2 {display:none;}
  .main-search > .cell.c1 {width:65%;}
  .main-search > .cell.c3 {width:35%;}
  #sidebar .btn.show-contact-btn {margin-top:16px;}
  body.home #main, #main, body.home #main, body.search #main, body.user #main, body.home #main, body.search #main, body.user #main, body.item #main, body.user-public-profile #main {width:100%}
  body.home #sidebar, #sidebar, #sidebar, body.search #sidebar, body.user #sidebar {width:100%;}
  #home-regs .wrap > div {width:50%;clear:none;padding-right:12px;}
  #home-cats {padding:20px 16px 16px 20px;border-radius:var(--radius);}
  #home-cats a {width:calc(33.33% - 10px);margin:0 10px 10px 0;min-height:110px;padding:14px 6px 12px 6px;}
  #home-cats a .icon i {font-size:28px;line-height:40px;}
  #home-cats a strong {font-size:12px;line-height:15px;}
  footer .box {text-align:center;}
  footer .box > a {float:none;margin:0 8px 10px 8px;}
  footer .copy, footer .language {margin:16px 0 0 0;width:100%;text-align:center;float:none;}
  .home-latest {margin:0 0 16px 0;}
  .form-container-box {padding:16px 0 0 0;}
  #related-searches {margin-top:16px;padding-top:16px;}
  .counter-search {margin:0 0 12px 0;}
  body.search .list-header .actions {float:left;width:100%;}
  .show-filters-btn {float:left;padding:10px 16px;height:44px;border-radius:var(--radius);}
  .btn.see_by {clear:none;}
  .see_by ul a {width: 100%; white-space: initial;}
  .item #comments {margin-bottom:16px;padding:20px;border-radius:var(--radius);}
  #useful_info {margin-bottom:0;}
  section {padding-bottom:24px;padding-top:16px;}
  body.item-post #content {text-align:center;}
  body.item-post #content #main {max-width:520px;text-align:left;float:none;display:inline-block;}
  .item.item-post .form-horizontal label:not(.osp-chk) {padding:0;margin:0 0 4px 0;text-align:left;width:100%;}
  .item.item-post .form-horizontal .controls {width:100%;}
  .item-post .form-horizontal .control-group.img, .item.item-post h1, .item.item-post h2, .item-post .pblbt, .form-horizontal .controls.recpt {padding-left:0;}
  .item-post .form-horizontal .controls.checkbox {margin-left:0;}
  ul.user_menu li {display:inline-block;width:100%;margin:0;}
  form.search h1 {font-size:28px;margin:24px 0 20px 0;}
  .paginate {gap:4px;margin:24px 0;}
  .paginate a,.paginate span {height:40px;min-width:40px;font-size:13px;}
  body.search h1 {font-size:22px;line-height:28px;}

  /* Modern Home Page - Mobile */
  .home-categories {padding:32px 16px 40px 16px;}
  .home-locations {padding:40px 16px;}
  .section-header {margin-bottom:28px;}
  .section-header h2 {font-size:22px;}
  .section-subtitle {font-size:14px;}
  .categories-grid {grid-template-columns:repeat(auto-fill, minmax(140px, 1fr));gap:14px;}
  .category-card {padding:20px 12px 18px 12px;}
  .category-icon {width:52px;height:52px;margin-bottom:12px;}
  .category-icon i {font-size:22px;}
  .category-info strong {font-size:13px;}
  .category-count {font-size:12px;}
  .locations-grid {grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));gap:12px;}
  .location-card {padding:14px 16px;gap:10px;}
  .location-card i {font-size:16px;}
  .location-name {font-size:14px;}
  .location-count {font-size:12px;padding:3px 8px;}

  /* Hero Section - Mobile */
  .hero-section {padding:50px 16px 40px 16px;}
  .hero-title {font-size:28px;line-height:1.2;margin-bottom:12px;}
  .hero-subtitle {font-size:15px;margin-bottom:24px;}
  .search-box {flex-direction:column;padding:12px;gap:10px;border-radius:16px;}
  .search-input-wrapper {width:100%;min-width:auto;}
  .search-input-wrapper input {font-size:15px;padding:12px 12px 12px 40px;}
  .search-input-wrapper i {left:14px;font-size:16px;}
  .search-btn {width:100%;padding:14px 20px;border-radius:10px;font-size:15px;}
  .quick-categories {margin-top:20px;gap:8px;justify-content:center;}
  .quick-label {display:none;}
  .quick-categories a {padding:6px 14px;font-size:12px;}
  .hero-stats {margin-top:32px;padding:16px 20px;gap:16px;}
  .stat-number {font-size:22px;}
  .stat-label {font-size:11px;}
  .stat-divider {height:30px;}

  /* Categories Section - Mobile */
  .categories-section {padding:40px 16px;}
  .section-title {margin-bottom:24px;flex-direction:column;gap:12px;text-align:center;}
  .section-title h2 {font-size:22px;}
  .view-all {font-size:13px;}
  .categories-grid {display:grid;grid-template-columns:repeat(2, 1fr);gap:12px;}
  .category-item {padding:16px 12px;border-radius:12px;}
  .category-icon-wrap {width:48px;height:48px;margin-bottom:10px;}
  .category-icon-wrap i {font-size:20px;}
  .category-name {font-size:13px;}
  .category-badge {font-size:10px;padding:2px 6px;}

  /* Locations Section - Mobile */
  .locations-section {padding:40px 16px;}
  .locations-flex {gap:10px;justify-content:center;}
  .location-chip {padding:10px 16px;font-size:13px;}
  .location-chip i {font-size:12px;}
  .location-chip em {font-size:11px;padding:2px 6px;}

  /* CTA Section - Mobile */
  .cta-section {padding:40px 16px;}
  .cta-box {flex-direction:column;text-align:center;padding:28px 20px;gap:20px;}
  .cta-content h3 {font-size:20px;margin-bottom:8px;}
  .cta-content p {font-size:14px;}
  .cta-button {padding:14px 28px;font-size:15px;}

  /* Recent Listings Section - Mobile */
  .recent-listings-section {padding:40px 16px;}
  .recent-listings-section .section-title {margin-bottom:24px;flex-direction:column;gap:12px;text-align:center;}
  .recent-listings-section .section-title h2 {font-size:22px;}
  .recent-listings-section .listing-card-list {grid-template-columns:repeat(2, 1fr);gap:12px;}

  /* Login Page - Mobile */
  .login-page {min-height:calc(100vh - 100px);padding:20px 16px;}
  .login-card {padding:30px 24px;border-radius:16px;}
  .login-icon {width:70px;height:70px;}
  .login-icon i {font-size:28px;}
  .login-header h1 {font-size:24px;}
  .login-header p {font-size:14px;}
  .login-form .remember-row {flex-direction:column;align-items:flex-start;gap:12px;}
  .login-btn {padding:14px 20px;font-size:15px;}

  /* Login page mobile menu - ensure readable text colors */
  body.login-modern header .nav {background:var(--bg-card);}
  body.login-modern header .nav a {color:var(--text-primary) !important;}
  body.login-modern header .nav a:hover {color:var(--primary) !important;}
  body.login-modern header .nav a.publish {color:#fff !important;}
}


@media screen and (max-width: 490px) {
  /* Modern Home Page - Small Mobile */
  .categories-grid {grid-template-columns:repeat(2, 1fr);gap:12px;}
  .category-card {padding:18px 10px 16px 10px;}
  .category-icon {width:48px;height:48px;margin-bottom:10px;}
  .category-icon i {font-size:20px;}
  .category-info strong {font-size:12px;}
  .locations-grid {grid-template-columns:1fr;gap:10px;}
  .location-card {padding:12px 14px;}

  /* Hero Section - Small Mobile */
  .hero-section {padding:40px 12px 32px 12px;}
  .hero-title {font-size:24px;}
  .hero-subtitle {font-size:14px;margin-bottom:20px;}
  .search-box {padding:10px;border-radius:14px;}
  .search-input-wrapper input {font-size:14px;padding:10px 10px 10px 36px;}
  .search-btn {padding:12px 16px;font-size:14px;}
  .quick-categories {flex-wrap:wrap;}
  .quick-categories a {padding:5px 12px;font-size:11px;}
  .hero-stats {gap:12px;padding:14px 16px;}
  .stat-number {font-size:20px;}
  .stat-divider {height:24px;}

  /* Categories/Locations/CTA - Small Mobile */
  .categories-section, .locations-section, .cta-section {padding:32px 12px;}
  .section-title h2 {font-size:20px;}
  .category-item {padding:14px 10px;}
  .category-icon-wrap {width:44px;height:44px;}
  .category-icon-wrap i {font-size:18px;}
  .category-name {font-size:12px;}
  .locations-flex {flex-direction:column;align-items:stretch;}
  .location-chip {justify-content:space-between;}
  .cta-box {padding:24px 16px;}
  .cta-content h3 {font-size:18px;}
  .cta-button {width:100%;text-align:center;}

  .item-post select, .item-post input[type="text"], .item-post .meta select, .item-post .meta input, .item-post ul.checkbox-list {width:100%;}
  .item-post input[type="text"]#price {width:calc(100% - 100px);}
  .main-search > .cell button {padding-left:8px;padding-right:8px;}
  .main-search > .cell button i {display:none;}
  .listing-card-list.listing-grid, body.search .listing-grid {width:calc(100% + 16px);margin-left:-8px;margin-right:-8px;}
  .listing-grid .listing-card, .similar_ads .listing-grid .listing-card, body.search .listing-grid .listing-card, .similar_ads .listing-grid .listing-card {width: calc(50% - 16px);margin:0 8px 16px 8px;}
  #home-regs .wrap > div {width:100%;padding-right:0;}
  .see_by span {display:none;}
  .show-filters-btn {width:100%;margin:0 0 10px 0;}
  .doublebutton {float:left;}
  .doublebutton a {float:left;margin:0 5px 0 0;}
  .item-photos .thumbs {width:50px;}
  .item-photos .main-photo {width:calc(100% - 60px);}
  .form-horizontal label {width:100%;text-align:left;line-height:16px;margin:0 0 2px 0;padding:0;font-weight:bold;}
  .form-horizontal .controls {width:100%;}
  .form-horizontal .actions {padding:0;}
  .item #comments h3 {font-weight:normal;}
  .item #comments .header > h3 {padding-bottom:15px;}
  .item #comments input[type="text"], .item #comments textarea {width:100%;}
  .item #comments .reply-text {padding-left:0;}
  body.user .form-horizontal .controls input[type="text"], body.user .form-horizontal .controls input[type="password"], body.user .form-horizontal .controls input[type="email"], body.user .form-horizontal .controls select, body.user .form-horizontal .controls textarea {width:100%;}
  body.user .form-horizontal .control-group.bts {padding-left:0;}
  .main-search > .cell {padding-right:12px;}
  #sidebar .g-recaptcha {transform: scale(0.82); transform-origin: 0 0;}
  form[name="contact_form"] .g-recaptcha, form#item-post .g-recaptcha, .g-recaptcha {transform: scale(0.88); transform-origin: 0 0;margin-right:-50px;max-width: 260px;}

  #description .item-hook .table-attributes table td {width:100%;display:inline-block;}
  #description .item-hook .table-attributes table td:first-child {width:100%;}
  #description .item-hook .table-attributes table td:last-child {width:100%;margin-bottom:5px;}
  #custom_fields .meta strong {width:100%;}
  #custom_fields .meta > span {margin-bottom:5px;display:inline-block;width:100%;}
}