/**
 * Mobile Global Styles
 * Site-wide header and footer cleanup for mobile devices
 * 
 * Applies to all mobile pages when wp_is_mobile() returns true
 * Desktop completely unchanged
 */

/* ============================================
   HEADER CLEANUP
   Goal: Reduce header from ~200px to ~60px
   ============================================ */

/* Hide top header (social icons row) */
.site-header .top-header,
#masthead .top-header {
    display: none !important;
}

/* Hide social icons wrap */
.site-header .social-icons-wrap,
.top-header .social-icons-wrap {
    display: none !important;
}

/* Hide subscribe/newsletter from header (moved to footer) */
.site-header .newsletter-element,
.site-header .header-right-button-wrap,
.site-header .header-custom-button {
    display: none !important;
}

/* Hide "EST. 1992" badge if it exists */
.site-header .site-branding .site-identity-badge,
.site-header .est-badge {
    display: none !important;
}

/* Hide tagline */
.site-header .site-description {
    display: none !important;
}

/* Reduce header padding/spacing */
.site-header {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.site-header .main-header {
    padding: 0 !important;
}

.site-header .site-branding-section {
    padding: 8px 0 !important;
}

/* Make logo BIGGER for mobile visibility */
.site-header .site-branding .custom-logo,
.site-header .site-logo img,
.site-branding .custom-logo,
img.custom-logo {
    max-height: 90px !important;
    height: auto !important;
    width: auto !important;
}

/* Optimize header layout for mobile */
.site-header .site-branding {
    margin: 0 !important;
}

/* ============================================
   FOOTER CLEANUP
   Goal: Use desktop footer with minimal changes
   ============================================ */

/* FOOTER: Show main-footer (desktop version) */
.site-footer .main-footer,
#colophon .main-footer {
    display: block !important;
}

/* FOOTER: Show all footer widgets naturally */
.site-footer .main-footer .footer-widget {
    display: block !important;
}

/* Collapsible footer menu styling */
.site-footer .mobile-footer-collapsible {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
}

.site-footer .mobile-footer-collapsible summary {
    cursor: pointer;
    font-weight: 700;
    color: #ec3237 !important;
    font-size: 16px !important;
    padding: 12px 0 !important;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hide default marker */
.site-footer .mobile-footer-collapsible summary::-webkit-details-marker {
    display: none;
}

/* Add custom arrow */
.site-footer .mobile-footer-collapsible summary::after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.2s;
}

.site-footer .mobile-footer-collapsible[open] summary::after {
    transform: rotate(180deg);
}

/* Footer widget links styling */
.site-footer .mobile-footer-collapsible ul {
    list-style: none;
    padding: 0 0 8px 0;
    margin: 0;
}

.site-footer .mobile-footer-collapsible li {
    margin: 8px 0;
}

.site-footer .mobile-footer-collapsible a {
    color: #4a9eff !important;
    text-decoration: none;
    font-size: 14px;
}

/* Simplify bottom footer */
.site-footer .bottom-footer {
    padding: 12px 0 !important;
    text-align: center !important;
}

/* Bottom footer social icons - keep visible in neat rows */
.site-footer .bottom-footer .social-section,
.bottom-footer .social-icons-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    margin: 12px auto 16px auto !important;
    max-width: 300px !important;
}

/* Social icon individual items */
.site-footer .bottom-footer .social-section a,
.bottom-footer .social-icons-wrap a {
    margin: 0 !important;
    flex: 0 0 auto !important;
}

/* Subscribe button in footer */
.site-footer .footer-subscribe-button,
.site-footer a.footer-subscribe-button {
    display: inline-block !important;
    padding: 10px 24px !important;
    background-color: #ec3237 !important;
    color: #fff !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-align: center !important;
    margin: 16px auto 12px auto !important;
}

/* Copyright - centered */
.site-footer .bottom-footer .site-info,
.site-footer .bottom-footer .copyright-section {
    text-align: center !important;
    font-size: 13px !important;
    margin: 8px 0 0 0 !important;
}

/* Reduce footer padding */
.site-footer {
    padding-top: 0 !important;
}

/* ============================================
   HEADER ADS REMOVAL (already in plugin)
   These are backup rules in case ads slip through
   ============================================ */

.site-header .ads-banner,
.site-header .header-ads-banner {
    display: none !important;
}

/* ============================================
   MOBILE MENU OPTIMIZATION
   ============================================ */

/* Ensure menu toggle is visible and clickable */
.site-header .menu-toggle {
    display: block !important;
    z-index: 999 !important;
}

/* Search icon optimization */
.site-header .search-icon {
    display: block !important;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Reduce animation complexity on mobile */
.site-header *,
.site-footer * {
    transition: none !important;
    animation: none !important;
}

/* Optimize font sizes for mobile */
.site-header .site-title {
    font-size: 20px !important;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Ensure interactive elements are touch-friendly */
.site-header a,
.site-footer a {
    min-height: 44px !important;
    min-width: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Exception for text links */
.site-header .site-title a,
.site-footer .copyright-section a {
    min-height: auto !important;
    min-width: auto !important;
    display: inline !important;
}

/* ============================================
   BACK TO TOP BUTTON
   Keep visible if exists
   ============================================ */

#back-to-top,
.back-to-top {
    display: block !important;
}
