/* FOOTER RESPONSIVE CSS */
/* Override footer grid layout based on screen size */

/* DESKTOP - Keep 4 columns */
@media (min-width: 1024px) {
    footer[style*="background: #F6F2EB"] {
        background: #F6F2EB !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
        gap: 40px !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 60px 24px !important;
    }
    
    div[style*="grid-column: 1 / -1"] {
        grid-column: 1 / -1 !important;
    }
}

/* TABLET - 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    footer[style*="background: #F6F2EB"] {
        background: #F6F2EB !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 30px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 40px 20px !important;
    }
    
    div[style*="grid-column: 1 / -1"] {
        grid-column: 1 / -1 !important;
        text-align: center !important;
    }
    
    h3 {
        font-size: 14px !important;
    }
    
    p {
        font-size: 13px !important;
    }
}

/* MOBILE - 1 column */
@media (max-width: 767px) {
    footer[style*="background: #F6F2EB"] {
        background: #F6F2EB !important;
        padding: 0 !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
        display: block !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 20px 12px !important;
    }
    
    div[style*="grid-column: 1 / -1"] {
        grid-column: auto !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }
    
    footer div > div {
        margin-bottom: 30px !important;
        padding-bottom: 20px !important;
        border-bottom: 1px solid #e9decc;
    }
    
    footer div > div:last-child {
        border-bottom: none !important;
    }
    
    /* HEADINGS */
    h3 {
        font-size: 14px !important;
        margin: 0 0 16px !important;
        color: #111827 !important;
    }
    
    /* TEXT */
    p {
        font-size: 12px !important;
        line-height: 1.6 !important;
        margin: 0 0 16px !important;
        color: #555 !important;
    }
    
    /* LISTS */
    ul {
        display: block !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    ul li {
        display: block !important;
        margin-bottom: 8px !important;
    }
    
    ul li a {
        font-size: 12px !important;
        display: block !important;
        color: #555 !important;
        text-decoration: none !important;
    }
    
    /* LINKS */
    a {
        font-size: 12px !important;
        display: block !important;
        margin-bottom: 8px !important;
        color: #555 !important;
        text-decoration: none !important;
    }
    
    /* LOGO */
    footer img {
        height: 40px !important;
        margin: 0 auto 20px !important;
        display: block !important;
    }
    
    /* SUBSCRIBE FORM */
    div[style*="display:flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    input[placeholder="Your Email"],
    input[type="email"] {
        width: 100% !important;
        padding: 10px 12px !important;
        font-size: 12px !important;
        border-radius: 4px !important;
    }
    
    button[type="submit"] {
        width: 100% !important;
        padding: 10px 16px !important;
        font-size: 16px !important;
        border-radius: 4px !important;
    }
    
    /* SOCIAL ICONS */
    div[style*="display:flex; gap:12px"] {
        justify-content: center !important;
        gap: 8px !important;
        margin-top: 20px !important;
    }
    
    div[style*="display:flex; gap:12px"] a {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* MOBILE XS - Extra small */
@media (max-width: 479px) {
    div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
        padding: 15px 10px !important;
    }
    
    h3 {
        font-size: 13px !important;
    }
    
    p, a {
        font-size: 11px !important;
    }
    
    footer img {
        height: 35px !important;
    }
}

/* BOTTOM BAR */
div[style*="border-top: 1px solid #e9decc"] {
    padding: 15px 12px !important;
    text-align: center !important;
}

div[style*="border-top: 1px solid #e9decc"] p {
    font-size: 11px !important;
    margin: 0 !important;
}

@media (min-width: 768px) {
    div[style*="border-top: 1px solid #e9decc"] {
        padding: 20px 24px !important;
    }
    
    div[style*="border-top: 1px solid #e9decc"] p {
        font-size: 14px !important;
    }
}

/* GENERAL FOOTER FIXES */
footer {
    width: 100%;
    overflow-x: hidden;
}

footer * {
    box-sizing: border-box;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #dc2626 !important;
}

/* ============================================================
   REAL FIX BELOW — matches actual Tailwind classes in
   footer.blade.php (the rules above use inline style="..."
   selectors that don't exist in this footer, so they never
   matched anything). This block is what actually works.
   ============================================================ */
@media (max-width: 767px) {
    /* Main 2-column layout -> stack */
    footer .flex.w-full.gap-20 {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    /* Left column (logo/address/phone/email) full width */
    footer > div > div > div.flex.flex-col.gap-6 {
        width: 100% !important;
    }
    /* Right side: Quick Links / Products / Solutions -> 1 column stacked */
    footer .grid.grid-cols-3 {
        display: block !important;
    }
    footer .grid.grid-cols-3 > div {
        margin-bottom: 24px !important;
        padding-bottom: 16px !important;
        border-bottom: 1px solid #e5decb;
    }
    footer .grid.grid-cols-3 > div:last-child {
        border-bottom: none !important;
    }
    /* Headings */
    footer h3 {
        font-size: 14px !important;
    }
    /* Links/lists */
    footer ul li a {
        font-size: 13px !important;
    }
    /* Address/contact text */
    footer .text-sm {
        font-size: 13px !important;
    }
    /* Bottom legal bar -> stack */
    footer .flex.items-center.justify-between {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
    }
}
@media (max-width: 479px) {
    footer h3 {
        font-size: 13px !important;
    }
    footer .text-sm,
    footer ul li a {
        font-size: 12px !important;
    }
}