/* Mobile adjustments for Home Page */

/* Base styles for all mobile devices up to 768px */
@media (max-width: 768px) {
  /* Fix body padding */
  body {
    padding-top: 60px;
  }

  .aj-custom-header img {
      height: 41px !important;
      width: 45px;
      margin-left: 10px;
  }

  /* Reset hero margins */
  .home-hero {
    margin: 20px 0 !important;
    flex-direction: column;
    text-align: center;
  }

  .home-hero-section, 
  .processes-section, 
  .cpf-section, 
  .como-funciona-section {
    margin-bottom: 40px;
    border: none;
  }

  .home-hero .home-hero-illustration {
    max-width: 40rem;
    display: none !important;
    width: 100%;
    scale: 100% !important;
    background-color: transparent;
    transform: scale(1);
    height: auto;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .text-lg {
    display: none;
    width: 100%;
    font-size: 1rem;
  }

  .justify-center {
    justify-content: center;
    background: #ffffff00;
    display: grid !important;
  }

  header.aj-custom-header span, header.aj-custom-header p, .aj-container span, .aj-container p, #lista-aj span, #lista-aj p {
    display: none;
  }

  /* Header adjustments */
  .aj-custom-header {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 10px;
    width: 100%;
  }

  .aj-custom-header .container {
    padding: 10px 0;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  
  /* Brand/Logo adjustments */
  .aj-custom-header a.flex {
    font-size: 0.9rem;
  }
  
  /* Fix welcome card and buttons */
  .home-welcome-card {
    margin-top: 0;
    width: 100%;
    padding: 1.5rem !important;
  }

  .home-welcome-btn-primary,
  .home-welcome-btn-outline {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    margin: 5px 0 !important;
  }

  .header-notification-dropdown{
    position: absolute;
    top: 100%;
    margin-left: -27px;
    right: auto !important;
    background: white;
    border: 1px solid rgb(221, 221, 221);
    padding: 0px;
    z-index: 1000;
    min-width: 320px;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 4px;
  }

  header.aj-custom-header nav {
    display: flex !important;
    gap: 0rem;
    align-items: center;
  }

  img, picture, figure, svg {
      display: unset;
      max-width: 268% !important;
      height: auto;
  }

  .como-funciona-section .card {
    background: #ffffff70;
    color: var(--text-base);
    border: 1px solid var(--border-base);
    border-radius: .5rem;
    height: 112% !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  }

  .ml-3.flex.items-center {
    display: none !important;
  }

  .flex {
    place-self: anchor-center;
    display: flex;
    gap: 16px;
    font-size: 14px;
  }

  /* Search filter wrapper */
  .home-search-filter-wrapper {
    margin-right: 0 !important;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .home-search-filter-wrapper .relative {
    width: 100%;
  }

  #home-process-search {
    width: 100% !important;
  }

  .home-process-go-btn {
    width: 100% !important;
    margin-left: 0 !important;
  }

  /* Fix stats grid */
  .stats-grid .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Fix latest processes cards */
  .home-latest-card {
    flex-direction: column;
  }

  .home-latest-card > div:first-child {
    width: 100%;
    border-bottom: 1px solid var(--border-base);
  }

  .home-latest-info {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Como funciona section */
  .como-funciona-section .grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0 !important;
  }

  .home-hero h1 {
    font-size: 1.75rem;
  }
  
  /* Processo destaque title alignment */
  .processos-destaque-title {
    margin-left: 0 !important;
    text-align: center;
    margin-bottom: 15px;
  }
  
  .processes-section .flex.justify-between {
    flex-direction: column;
    align-items: center;
  }
  
  .processo-rj-form-list .container, 
  .main-wrapper .container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .aj-custom-header .home-header-menu .menu-list {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 32px) !important;
    max-width: 360px !important;
  }

  .aj-custom-header .home-header-menu .menu-list .submenu {
    position: static !important;
    right: auto !important;
    min-width: 100% !important;
    box-shadow: none !important;
    margin-top: 4px;
  }
}

/* Extra Small Devices (phones, less than 375px) */
@media (max-width: 374px) {
  .aj-custom-header img {
    height: 35px;
    width: auto;
  }

  
  
  .home-hero h1 {
    font-size: 1.5rem;
  }
}

/* Small Devices (phones, 375px to 425px) - Includes many standard iPhones */
@media (min-width: 375px) and (max-width: 425px) {
  .aj-custom-header img {
    height: 38px;
    width: auto;
  }
}

/* Medium Devices (phones, 426px to 576px) - Includes larger phones like iPhone Pro Max */
@media (min-width: 426px) and (max-width: 576px) {
  .aj-custom-header img {
    height: 41px !important;
    width: auto;
  }
  
  .home-hero h1 {
    font-size: 1.8rem;
  }
}

/* Large Devices (Tablets/Large Phones, 577px to 768px) */
@media (min-width: 577px) and (max-width: 768px) {
  .aj-custom-header img {
    height: 45px;
    width: auto;
  }
  
  .como-funciona-section .grid {
    grid-template-columns: 1fr 1fr; /* 2 columns on tablets */
  }
}

/* Common Styles (Non-media query dependent but mobile focused) */
.aj-custom-header .home-header-menu {
    position: relative;
    /* ... existing variables ... */
    --bg-base: #FFFFFF;
    --bg-base-secondary: #F7FAFC;
    --bg-base-tertiary: #EDF2F7;
    --bg-surface: #F7FAFC;
    --bg-elevated: #FFFFFF;
    --text-base: #2D3748;
    --text-base-secondary: #4A5568;
    --text-base-tertiary: #718096;
    --text-muted: #718096;
    --border-base: #E2E8F0;
    --border-base-light: #F7FAFC;
    --border-base-dark: #CBD5E0;
    --primary: #FACB1F;
    --primary-hover: #E5B200;
    --secondary: #1F4287;
    --secondary-hover: #1A3670;
    --header-block-bg: #363638;
    --content-bg: #363638;
    --content-border-color: #d8d8dc;
    --footer-bg: #363638;
    --footer-color: #FFCD24;
    --footer-border-color: #FFCD24;
    --text-color: #d8d8dc;
    --bold-color: #d8d8dc;
    --border-color: #d8d8dc;
    --theme-color: #FFCD24;
    --theme-color-two: #d8d8dc;
    --font-content: 'Open Sans', sans-serif;
    --font-heading: 'Roboto', sans-serif;
    --tw-gradient-from: rgb(250 203 31 / .18) 0%;
    --tw-gradient-via: rgb(250 203 31 / .08) 35%;
    --tw-gradient-to: transparent 100%;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to);
    -webkit-font-smoothing: subpixel-antialiased;
    -webkit-text-size-adjust: 71%;
    box-sizing: border-box;
    margin: 0;
    min-width: 123px !important;
    font-family: inherit;
    line-height: 1.6;
    overflow: visible;
    text-transform: none;
    position: relative;
    appearance: button;
    transition: all 0.3s ease-in-out;
    height: 40px !important;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

button, [type="button"], [type="reset"], [type="submit"] {
    position: relative;
    cursor: pointer;
    border: 0;
    border-radius: 4px;
    padding: 8px 10px;
    background: var(--theme-color);
    color: #363638;
    -webkit-appearance: button;
    appearance: button;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    min-width: 280px;
    border-radius: 25px;
    height: 37px !important;
}

@media (max-width: 768px) {
    header.aj-custom-header span, header.aj-custom-header p, .aj-container span, .aj-container p, #lista-aj span, #lista-aj p {
        display: none !important;
    }
}

@media (max-width: 768px) {
.fa-bell:before {
    content: "\f0f3";
    display: none !important;
}
}

@media (max-width: 768px) {
    img, picture, figure, svg {
        display: unset;
        max-width: 22px !important;
        height: unset !important;
        height: auto;
    }
}
