/* ========================================================
   MOBILE MODERN CSS - El Rey de las Fumigaciones
   Only active on screens <= 768px (Phones & Tablets)
   Desktop (> 768px) remains 100% untouched.
   ======================================================== */

@media only screen and (max-width: 768px) {

  /* --- 1. Prevent right-side floating menu from covering content --- */
  .wpfm-menu-wrapper {
    display: none !important;
  }

  /* Add padding to body so bottom bar never obscures content */
  body {
    padding-bottom: 70px !important;
  }

  /* --- 2. Typography Scaling --- */
  h2 {
    font-size: 28px !important;
    line-height: 34px !important;
    margin-bottom: 15px !important;
    text-align: center;
  }
  h3 {
    font-size: 22px !important;
    line-height: 28px !important;
  }
  h4 {
    font-size: 19px !important;
    line-height: 24px !important;
  }
  h5, h6 {
    font-size: 17px !important;
    line-height: 22px !important;
  }

  /* --- 3. Header & Navigation --- */
  #header {
    padding: 12px 0 10px 0 !important;
    position: relative;
    background: #383338;
  }

  #header .container {
    position: relative;
    padding: 0 15px;
  }

  #header .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  #header .grid_4 {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
  }

  #header .grid_8 {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
  }

  #header h1 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
  }

  #header h1 img {
    max-height: 52px !important;
    width: auto !important;
    display: block;
  }

  /* Hide old desktop menu and old select dropdown */
  .sf-menu,
  select.mnav,
  .select-menu {
    display: none !important;
  }

  /* Modern Hamburger Button */
  .modern-hamburger-btn {
    display: flex !important;
    flex-direction: column;
    justify-content: space-around;
    width: 44px;
    height: 44px;
    background: #4a454a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    padding: 10px;
    box-sizing: border-box;
    z-index: 10001;
    transition: background 0.25s ease, transform 0.25s ease;
  }

  .modern-hamburger-btn:hover,
  .modern-hamburger-btn:active {
    background: #5d575d;
  }

  .modern-hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }

  /* Hamburger active state (transforms into X) */
  .modern-hamburger-btn.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .modern-hamburger-btn.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .modern-hamburger-btn.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Modern Mobile Dropdown Menu */
  .modern-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(38, 34, 38, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid #589635;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    padding: 10px 0;
    animation: slideDownMenu 0.25s ease forwards;
  }

  @keyframes slideDownMenu {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .modern-mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .modern-mobile-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .modern-mobile-menu li:last-child {
    border-bottom: none;
  }

  .modern-mobile-menu a {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #e0e0e0 !important;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
  }

  .modern-mobile-menu a:hover,
  .modern-mobile-menu a:active,
  .modern-mobile-menu li.current a {
    color: #ffffff !important;
    background: rgba(88, 150, 53, 0.35);
    padding-left: 26px;
    border-left: 4px solid #589635;
  }

  /* --- 4. Camera Slider Adjustments on Mobile --- */
  .slider_wrapper {
    margin-bottom: 20px;
  }

  .camera_caption {
    padding: 10px !important;
  }

  .camera_caption .title {
    font-size: 18px !important;
    line-height: 22px !important;
    margin-bottom: 4px !important;
  }

  .camera_caption .title1 {
    font-size: 13px !important;
    line-height: 16px !important;
    margin-bottom: 8px !important;
  }

  .camera_caption .border a.link {
    font-size: 11px !important;
    padding: 5px 12px !important;
  }

  /* --- 5. Cards & Images Modern Polish --- */
  .grid_4, .grid_6, .grid_8, .grid_12, .grid_5, .grid_7 {
    width: 100% !important;
    float: none !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .banner img,
  .thumb img,
  .article img,
  .thumb2 img,
  .section img {
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    max-width: 100%;
    height: auto;
  }

  /* --- 6. Sticky Bottom Action Bar --- */
  .modern-bottom-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60px !important;
    background: rgba(30, 27, 30, 0.96) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    padding: 0 8px !important;
    z-index: 999999 !important;
    box-sizing: border-box !important;
  }

  .modern-bottom-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    margin: 0 3px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #ffffff !important;
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    transition: transform 0.15s ease, filter 0.15s ease;
  }

  .modern-bottom-btn:active {
    transform: scale(0.96);
  }

  .modern-bottom-btn i {
    font-size: 18px;
    margin-bottom: 3px;
  }

  /* WhatsApp CABA */
  .modern-btn-wa-caba {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
  }

  /* Teléfono CABA */
  .modern-btn-call-caba {
    background: linear-gradient(135deg, #2980b9 0%, #1f618d 100%);
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.3);
  }

  /* WhatsApp MDP */
  .modern-btn-wa-mdp {
    background: linear-gradient(135deg, #1fa851 0%, #0e6b60 100%);
    box-shadow: 0 2px 8px rgba(31, 168, 81, 0.3);
  }

  /* Teléfono MDP */
  .modern-btn-call-mdp {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
  }

}
