/* Mobile Styles - Max-width 900px to ensure Desktop is unaffected */
@media (max-width: 900px) {

  /* =========================
       NAVBAR
       ========================= */
  .navbar {
    padding: 15px 20px;
    /* Smaller padding */
  }

  .logo img {
    height: 35px;
    /* Slightly smaller logo */
  }

  .nav-links {
    /* Dropdown style for mobile */
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    display: none;
    /* Hidden by default */
    z-index: 1000;
    border-top: 1px solid #f0f0f0;
  }

  /* Shown when 'active' class is added by script.js */
  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    /* Show hamburger */
    color: #333;
  }

  /* =========================
       HERO SECTION
       ========================= */
  .hero-section {
    padding: 40px 20px;
    /* Reduced padding */
    text-align: center;
  }

  .hero-container {
    flex-direction: column;
    /* Stack vertically */
    gap: 40px;
  }

  .hero-left h1 {
    font-size: 32px;
    /* Smaller heading */
    line-height: 1.25;
    margin-bottom: 15px;
  }

  .hero-left .subtext {
    font-size: 17px;
    margin: 25px auto 25px;
    /* Center align */
  }

  .hero-right {
    justify-content: center;
    width: 100%;
    margin-top: 2.5rem;
  }

  .hero-right img {
    width: 100%;
    max-width: 350px;
    /* Limit image size */
    margin: 0 auto;
  }

  /* Hide floating icons on mobile cleanliness */
  .floating-icon {
    display: none;
  }

  /* =========================
       DAMAGE SECTION
       ========================= */
  .damage-section {
    padding: 40px 20px;
  }

  .damage-section h2 {
    font-size: 28px;
    line-height: 1.3;
  }

  .damage-subtext {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .damage-content {
    flex-direction: column;
    gap: 40px;
  }

  .damage-image-wrapper {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .damage-full-img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .dotted-circle img {
    width: 100%;
    height: auto;
  }

  .damage-points {
    margin-top: 0;
    text-align: center;
    max-width: 100%;
  }

  .point-item {
    margin-bottom: 30px;
    text-align: center;
    /* Center align points on mobile */
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .circle-item,
  .lost-email {
    margin-left: 0 !important;
    /* Reset desktop offsets */
  }

  .point-item h4 {
    margin-top: 10px;
  }

  /* =========================
       ASSISTANT SECTION
       ========================= */
  .assistant-section {
    padding: 40px 20px;
  }

  .assistant-box {
    padding: 30px 20px;
    flex-direction: column;
    gap: 30px;
  }


  .assistant-left ul {
    display: inline-block;
    text-align: left;
    /* Keep list left-aligned but centered block */
    padding-left: 20px;
  }

  .assistant-box .imp {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
  }

  /* =========================
       VIDEO SECTION
       ========================= */

  .vedio-width {
    width: 100% !important;
    height: auto;
  }

  .video-section {
    padding: 40px 20px;
  }

  .video-subtext {
    font-size: 18px;
    padding: 0 10px;
  }

  .video-container iframe {
    height: 200px;
    width: 300px;
    /* Reduced height for mobile */
  }

  /* =========================
       EDGE SECTION
       ========================= */
  .estipay-edge-section {
    padding: 40px 20px;
  }

  .edge-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  /* UNBOX .edge-left so its children (h2 and .edge-features) become flex items of .edge-container */
  .edge-left {
    display: contents;
  }

  /* ORDER 1: Header */
  .edge-left h2 {
    order: 1;
    font-size: 27px;
    text-align: center;
    margin-bottom: 20px;
  }

  /* ORDER 2: Image (Moved to top below header) */
  .edge-right-img {
    order: 2;
    display: flex !important;
    justify-content: center;
    width: 100%;
    margin-bottom: 30px;
  }

  .edge-right-img img {
    width: 100% !important;
    max-width: 300px !important;
    /* Adjusted to match typical mobile width */
    height: auto !important;
    margin: 0 !important;
  }

  /* ORDER 3: Features Cards */
  .edge-features {
    order: 3;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
    /* Clean card look */
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  .feature-item img {
    margin-bottom: 15px;
    width: 50px;
    height: auto;
  }

  .feature-item h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #111;
  }

  .feature-item p {
    color: #666;
    font-size: 14px;
  }

  /* Remove old wrong class if present */
  .edge-right {
    display: none;
  }

  /* =========================
       IMPACT SECTION
       ========================= */
  .impact-section {
    padding: 60px 20px;
    background: #fff;
    /* Ensure white bg */
  }

  .impact-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  /* UNBOX .impact-right so its children become flex items of .impact-container */
  .impact-right {
    display: contents;
  }

  /* ORDER 1: Header */
  .impact-right h2 {
    order: 1;
    text-align: center;
    font-size: 32px;
    margin-bottom: 5px;
  }

  /* ORDER 2: Subtext */
  .impact-subtext {
    order: 2;
    text-align: center;
    font-size: 16px;
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
    padding: 0 10px;
  }

  /* ORDER 3: Image (Moved to middle) */
  .impact-left-img {
    order: 3;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
  }

  .impact-left-img img {
    width: 100%;
    max-width: 320px;
    /* Adjusted size */
    height: auto;
    margin: 0 auto;
    display: block;
  }

  /* ORDER 4: Metrics Header (Hidden on mobile usually but let's see) */
  .metrics-header {
    order: 4;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    padding: 0 10px;
  }

  .before-head {
    text-align: center;
    margin-right: 0rem;
  }

  .after-head {
    text-align: center;
  }

  /* ORDER 5: Metrics Table */
  .metrics-table {
    order: 5;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .metric-row {
    display: grid;
    /* Grid for alignment */
    grid-template-columns: 1fr 1fr 1fr;
    /* Before - Arrow - After */
    align-items: center;
    text-align: center;
    background: transparent;
    /* Cleaner look */
    /* If we want the title above, we might need grid-template-areas or column flex */
    /* Let's try the specific mobile card look from image: */
    /* Image shows: Title Left, Before -> After Right? OR Title Top. */
    /* Looking at image:
       Label Left (Claim Approval Time)
       Right side: Value -> Value
    */
    /* Actually image shows: Label (Left)  [Value -> Value] (Right) aligned? */
    /* Wait, the image shows:
       Label (Row 1)
       [Value] -> [Value] (Row 2, or same row?)
       
       Actually looking closely at the provided image:
       It has a header "Before" "After"
       Then rows:
       "Claim Approval Time"   Months -> Days
       
       This is a 3-column layout on mobile might be tight.
       Let's try a clean stacked card or row.
       
       Image actually shows: 
       Title Row
       Before -> After
    */
    /* But standard mobile is usually row based. Let's stick to a clean row with title on top */
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    /* White background cards if needed, or transparent */
    padding: 15px 0;
    border-bottom: 1px solid #eee;
  }

  .metric-row:last-child {
    border-bottom: none;
  }

  /* Reset grid specific styling from desktop if needed */

  /* Let's try to match the image exactly if possible. 
     The image shows:
     Label (Far Left) ... Before (Middle) -> After (Right)
     Actually looking at "Impact Metrics" image:
     It has a header row: Before       After
     Row 1: Claim Approval Time     Months -> Days
     
     This is a grid.
  */

  .metric-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.2fr 1fr;
    /* Title, Before, Arrow, After */
    align-items: center;
    text-align: center;
    gap: 5px;
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
  }

  /* On really small screens, title might wrap. Use flex column for rows if needed. 
     But let's try to keep it row based as per image suggestion of "table" look */

  .metric-title {
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #333;
  }

  .metric-before {
    background: #FFF5EC;
    /* Orange tint */
    color: #F57C21;
    font-weight: 600;
    padding: 8px 4px;
    border-radius: 6px;
    font-size: 13px;
  }

  .metric-after {
    background: #EAF7F1;
    /* Green tint */
    color: #0E8C62;
    font-weight: 600;
    padding: 8px 4px;
    border-radius: 6px;
    font-size: 13px;
  }

  .metric-arrow {
    color: #0E8C62;
    /* Teal arrow */
    font-weight: bold;
    transform: none;
    /* Reset rotation */
  }

  /* =========================
       COMPLIANCE SECTION
       ========================= */
  .compliance-overlay-section {
    padding: 60px 20px;
    /* More padding for importance */
    text-align: center;
    background-size: cover;
    margin-left: 0%;
  }

  .compliance-content {
    max-width: 100%;
    padding: 0;
  }

  .compliance-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .comp-desc {
    font-size: 15px;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.6;
  }

  .comp-points {
    display: flex;
    /* Override ul default */
    flex-direction: row;
    /* Stack icons */
    gap: 30px;
    padding: 0;
    list-style: none;
    /* Remove bullets */
    align-items: center;
    /* Center items */
    margin-top: 30px;
  }

  .comp-points li {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 600;
    gap: 15px;
    color: #111;
    /* Ensure text is dark */
  }

  .comp-points li img {
    width: 60px;
    /* Ensure icons are visible size */
    height: auto;
  }

  /* =========================
       FOOTER (REFINED FOR MOBILE MATCHING)
       ========================= */
  .footer {
    padding: 40px 20px 30px;
    background-color: #009067;
    /* Adjusted to match image closer */
    color: #fff;
    text-align: center;
  }

  .footer-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  /* REORDERING MAGIC using display: contents */
  .footer-brand {
    display: contents;
    /* Ungroup children so they become flex items of container */
  }

  .footer-logo {
    order: 1;
    margin-bottom: 20px;
    justify-content: center;
  }

  /* The columns (Company, Support, Stay up to date) should come next */
  .footer-column {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  /* Specific targeting to ensure "Stay up to date" has its own spacing if needed */
  .footer-column:last-child {
    margin-bottom: 10px;
  }

  /* Social Icons below columns */
  .social-icons {
    order: 3;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
  }

  /* Copyright at the very bottom */
  .footer-brand p {
    order: 4;
    font-size: 13px;
    opacity: 0.9;
    color: #e6f7f1;
    margin: 0;
  }

  .footer-column h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
  }

  .footer-column a {
    color: #e6f7f1;
    margin-bottom: 12px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
  }

  .footer-logo img {
    height: 40px;
    filter: brightness(0) invert(1);
  }

  .social-icons a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    /* Slightly visible circle */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    transition: background 0.3s;
  }

  .social-icons a:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  /* Newsletter Box Styling */
  .subscribe-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    /* Translucent green */
    border-radius: 8px;
    /* Rounded corners */
    padding: 5px 15px;
    width: 90%;
    max-width: 350px;
    margin: 0 auto;
  }

  .subscribe-box input {
    background: transparent;
    border: none;
    color: #fff;
    flex: 1;
    padding: 10px 0;
    font-size: 15px;
    outline: none;
  }

  .subscribe-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
  }

  .subscribe-box button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
  }

  .assistant-right-logo img {
    width: 50%;
    max-width: 100%;
    display: block;
    margin: 0 auto;
  }

}