/* UNIVERSAL MOBILE FOUNDATION - Gallery Quality Responsiveness */
/* Applies to ALL pages automatically */

* {
  box-sizing: border-box;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.container {
  padding: 0 20px;
  max-width: 100%;
}

/* ENHANCED MOBILE TYPOGRAPHY */
@media (max-width: 768px) {
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.75rem !important; }
  h3 { font-size: 1.5rem !important; }
  h4 { font-size: 1.25rem !important; }
  
  .section {
    padding: 60px 0 !important;
  }
  
  .section-title {
    font-size: 1.8rem !important;
  }
}

/* ENHANCED MOBILE BUTTONS */
@media (max-width: 768px) {
  .btn {
    padding: 14px 28px !important;
    font-size: 0.95rem !important;
    width: 100% !important;
  }
  
  .btn i {
    margin-left: 6px !important;
  }
}

/* ENHANCED MOBILE CARDS */
@media (max-width: 768px) {
  .card {
    padding: 25px !important;
    margin-bottom: 20px;
  }
  
  .content-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  
  .content-image {
    order: -1;
  }
}

/* TOP CONTACT HIDE @992px - INDEX MATCHING */
@media (max-width: 992px) {
  .top-contact { display: none !important; }
}

/* INTAKE CTA SECTION RESPONSIVE */
@media (max-width: 768px) {
  .intake-cta-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  
  .intake-cta-grid > div:first-child {
    order: -1;
  }
  
  .intake-cta-grid > div:first-child > div {
    height: 250px !important;
  }
  
  .intake-cta-grid h2 {
    font-size: 1.8rem !important;
  }
  
  .intake-cta-grid p {
    font-size: 1rem !important;
  }
}

@media (max-width: 576px) {
  .intake-cta-grid > div:first-child > div {
    height: 200px !important;
  }
  
  .intake-cta-grid h2 {
    font-size: 1.5rem !important;
  }
}

/* UNIVERSAL RESPONSIVE TABLES → CARDS */
table:not(.no-responsive) {
  width: 100% !important;
}

/* RESPONSIVE TABLES → CARDS */
@media (max-width: 768px) {
  table.responsive-table,
  table:not(.no-responsive) {
    border: 0;
  }
  
  table.responsive-table thead,
  table:not(.no-responsive) thead {
    display: none;
  }
  
  /* This tables style commented because the make the tb header short lets pick the other style on phone dispaly */
  /* table.responsive-table tr,
  table:not(.no-responsive) tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  } */
  
  /* table.responsive-table td,
  table:not(.no-responsive) td {
    display: block;
    text-align: left !important;
    border: none;
    padding: 12px 12px 12px 50px !important;
    position: relative;
    font-size: 14px;
  } */
  
  table.responsive-table td::before,
  table:not(.no-responsive) td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: #6B1423;
    position: absolute;
    left: 12px;
    font-size: 13px;
  }
  
  table.responsive-table td:first-child::before,
  table:not(.no-responsive) td:first-child::before {
    content: "" !important;
    font-weight: normal;
  }
}

/* PROGRESSIVE GRIDS (Gallery Quality) */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-auto { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

@media (max-width: 992px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 20px; }
}

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .section { padding: 40px 0; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.3rem; }
}

/* RESPONSIVE IMAGES */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* FOOTER MATCHING GALLERY - EXACT gallery.css replica */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

@media (max-width: 480px) {
  footer .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  footer .footer-column, 
  footer .footer-about { 
    text-align: left !important; 
  }
  footer .footer-social { 
    justify-content: flex-start !important; 
  }
  footer .footer-bottom { 
    text-align: left !important; 
  }
  
  /* Match gallery.css EXACT spacing */
  footer {
    padding: 60px 0 25px !important;
  }
  
  .footer-grid {
    gap: 30px !important;
    margin-bottom: 50px !important;
  }
}

/* UNIVERSAL LINK TO ALL HTML */
@media all {
  table:not(.no-responsive) { width: 100%; }
  .responsive-table td { position: relative; }
}

/* about welcome section on phone display */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
/*  stats count section on phone display */
@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 10px;
  }
}
/* Blog display raws on phone */
@media (max-width: 1000px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }


}

/* COMPLETE MOBILE NAV - how dropdown behaves on phone style */
        @media (max-width: 992px) {
            .top-contact { display: none; }
            .mobile-toggle { 
                display: block !important; 
                cursor: pointer !important; 
                z-index: 9999 !important; 
            }
            nav > menu { 
                display: none !important; 
                pointer-events: none !important; 
            }
            nav > menu.show { 
                display: flex !important; 
                flex-direction: column !important;
                position: absolute !important; 
                top: 100% !important; 
                left: 50% !important;
                right: 50% !important;
                transform: translateX(-50%) !important;
                width: 90vw !important;
                max-width: 400px !important;
                margin: 0 auto !important;
                background: white !important; 
                box-shadow: 0 8px 30px rgba(0,0,0,0.2) !important;
                border-radius: 12px !important;
                pointer-events: auto !important;
                z-index: 9998 !important;
            }
            nav menuitem > menu {
                pointer-events: auto !important;
                position: static !important;
                opacity: 1 !important; 
                visibility: visible !important; 
                box-shadow: none !important;
                display: none !important;
            }
            nav menuitem.show > menu {
                display: block !important;
            }
            nav > menu.show menuitem > a:not(.header-btn),
            nav > menu.show menuitem > menu a {
                pointer-events: auto !important;
                cursor: pointer !important;
                justify-content: center !important;
                text-align: center !important;
                padding: 12px 20px !important;
            }
            nav > menu.show menuitem:last-child a.header-btn {
                margin: 20px auto !important;
                display: block !important;
                width: fit-content !important;
            }
            .footer-grid { grid-template-columns: 1fr 1fr; }
            .stats-grid { grid-template-columns: 1fr 1fr; }
        }
        @media (max-width: 576px) {
            .footer-grid { grid-template-columns: 1fr; }
            .page-header h1 { font-size: 2rem; }
            .stats-grid { grid-template-columns: 1fr; }
            
        }



        /* MOBILE NAVIGATION FOR DIFFERENT SCREEN SIZES DIFFERENT FROM ABOVE STYLES */
         @media (max-width: 375px) {
            .footer-grid { grid-template-columns: 1fr; }
            .page-header h1 { font-size: 2rem; }
            .stats-grid { grid-template-columns: 1fr 1fr; }
            .team-grid { grid-template-columns: 1fr 1fr; }
            .section-header h2 { font-size: 1.8rem; }
            .content-section { padding: 25px; }
            .motto-box { padding: 35px; }
        }
        @media (max-width: 400px) {
            .footer-grid { grid-template-columns: 1fr; }
            .page-header h1 { font-size: 1.5rem; }
            .page-header p { font-size: 1rem; }
            .stats-grid { grid-template-columns: 1fr 1fr; }
            .team-grid { grid-template-columns: 1fr 1fr; }
            .section-header h2 { font-size: 1.5rem; }
            .about-content h2 { font-size: 1.4rem; }
            .about-content h2 span { font-size: 1.2rem; }
            .about-content { padding: 20px; }
            .content-section { padding: 20px; font-size: 0.95rem; }
            .list-item { margin-bottom: 12px; }
            .motto-text { font-size: 1.5rem; }
            .motto-box { padding: 25px; }
            .read-more-btn { padding: 12px 24px; font-size: 0.9rem; }
        }
/* Different screens fit */
             /* @media (max-width: 1000px) {
            .footer-grid { grid-template-columns: 1fr; }
            .page-header h1 { font-size: 2rem; }
            .stats-grid { grid-template-columns: 1fr 1fr; }
            .team-grid { grid-template-columns: 1fr 1fr; }
            .section-header h2 { font-size: 1.8rem; }
            .content-section { padding: 25px; }
            .motto-box { padding: 35px; }
        } */
        /* media (max-width: 6000px) {
            .footer-grid { grid-template-columns: 1fr; }
            .page-header h1 { font-size: 1.5rem; }
            .page-header p { font-size: 1rem; }
            .stats-grid { grid-template-columns: 1fr 1fr; }
            .team-grid { grid-template-columns: 1fr 1fr; }
            .section-header h2 { font-size: 1.5rem; }
            .about-content h2 { font-size: 1.4rem; }
            .about-content h2 span { font-size: 1.2rem; }
            .about-content { padding: 20px; }
            .content-section { padding: 20px; font-size: 0.95rem; }
            .list-item { margin-bottom: 12px; }
            .motto-text { font-size: 1.5rem; }
            .motto-box { padding: 25px; }
            .read-more-btn { padding: 12px 24px; font-size: 0.9rem; }
            
        } */


        


/* Library Search - Desktop Styles (already have) */
.library-search { 
    background: var(--light); 
    padding: 30px; 
    border-radius: 10px; 
    margin-bottom: 40px; 
}
.search-box { 
    display: flex; 
    gap: 15px; 
}
.search-box input { 
    flex: 1; 
    padding: 14px 20px; 
    border: 1px solid var(--border); 
    border-radius: 5px; 
    font-size: 1rem; 
}
.search-box button { 
    padding: 14px 10px; 
    background: var(--secondary); 
    color: var(--white); 
    border: none; 
    border-radius: 5px; 
    font-weight: 600; 
    cursor: pointer; 
    white-space: nowrap;
    min-width: 120px;
}

/* Tablet - 992px and below */
@media (max-width: 992px) {
    .library-search { 
        padding: 25px; 
        margin-bottom: 30px; 
    }
    .search-box input { 
        padding: 13px 18px; 
        font-size: 0.95rem; 
    }
    .search-box button { 
        padding: 13px 16px; 
        min-width: 110px;
        font-size: 0.95rem;
    }
}

/* Mobile Large - 768px and below */
@media (max-width: 768px) {
    .library-search { 
        padding: 20px; 
        margin-bottom: 25px; 
        border-radius: 8px;
    }
    .search-box { 
        flex-direction: column; 
        gap: 12px; 
    }
    .search-box input { 
        padding: 15px 18px; 
        font-size: 1rem; 
        border-radius: 8px;
    }
    .search-box button { 
        padding: 15px 24px; 
        width: 100%; 
        min-width: auto;
        font-size: 1rem;
        border-radius: 8px;
    }
}

/* Mobile Small - 640px and below */
@media (max-width: 640px) {
    .library-search { 
        padding: 18px; 
        margin-bottom: 20px; 
        border-radius: 12px;
    }
    .search-box input { 
        padding: 16px 20px; 
        font-size: 1.05rem; 
        height: 50px;
    }
    .search-box button { 
        padding: 16px 28px; 
        font-size: 1.05rem; 
        height: 50px;
    }
}

/* Extra Small Phones - 480px and below */
@media (max-width: 480px) {
    .library-search { 
        padding: 16px; 
        margin: 0 -12px 20px -12px; 
        border-radius: 0;
        border-bottom: 3px solid var(--secondary);
    }
    .search-box { 
        gap: 10px; 
    }
    .search-box input { 
        padding: 18px 20px; 
        font-size: 1.1rem; 
        height: 52px;
    }
    .search-box button { 
        padding: 18px 30px; 
        font-size: 1.1rem; 
        height: 52px;
    }
}
