
/* Global Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f7;

}

/* --- HEADER FIX --- */
header {
    width: 100vw; /* Full viewport width */
background: rgba(209, 209, 214, 0.5);
    backdrop-filter: blur(5px);
    border-bottom: 2px solid #bbb;
    padding: 20px 0 10px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
}
/* Make sure content starts below the fixed header */



/* Main Content */
main {
    flex-grow: 1;
    overflow-y: auto;

}

/* Hamburger Menu Styles */
.hamburger-menu {
    position: absolute;
    top: 20px;
    left: 20px;
    cursor: pointer;
    z-index: 1001;
}
.hamburger-menu button {
    background: none;
    border: none;
    cursor: pointer;
}
.hamburger-menu img {
    width: 35px;
    height: 35px;
}



.hamburger-menu div {
    width: 30px;
    height: 3px;
    background-color: #404040;
    margin: 6px 0;
    transition: 0.4s;
}










.hidden {
    display: none;
}



#container {

    display: flex;
    flex-direction: column;
    width: 100vw;
    padding-top: 80px; 
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 100px; 

}















/* Header Section */
    
.logo img {
    height: 80px;
}
.search-container {
    margin-top: 15px;
    position: relative;
    width: 600px;
    margin-left: auto;
    margin-right: auto;
}
#googleSearch {
    width: 100%;
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ccc;
    font-size: 16px;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
#googleSearch:focus {
    border-color: #999;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}
/* Social Toggle */
.social-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}
.social-toggle button {
    background: none;
    border: none;
    cursor: pointer;
}
.social-toggle img {
    width: 35px;
    height: 35px;
}
#socialMenu {
    position: absolute;
    top: 45px;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    display: flex;
    gap: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 999;
}
#socialMenu.hidden {
    display: none;
}

/* Category Headings + Wrapper */
.category {
    text-align: center; /* centers the .category-inner wrapper */
    margin: 10px 0;
min-width:640px;
}
.category-inner {
    display: inline-block; /* shrinks/grows to fit its content */
    text-align: left;      /* or center, as you prefer for inside content */
    margin-bottom: 10px;
}
.category-inner h2, .category-heading {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #404040;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    text-align: center; /* heading text alignment */
}
/* Category grid for icon cards (flex) */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* centers the icon cards */
    gap: 20px;               /* spacing between cards */
}
/* Each icon card becomes its own card */
.icon-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    width: 90px;
    min-height: 100px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    color: #404040;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 10px 5px 10px;
}
.icon-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.icon-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 0px;
    display: block;
}
.icon-card span {
    display: block;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    color: inherit;
}
.icon-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
/* More Tools Button */
.more-tools {
    text-align: center;
    margin-top: 30px;
}
.more-tools button {
    padding: 10px 20px;
    font-size: 16px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
/* Modal Styles for Other Tools */
    
.modal-overlay.hidden {
    display: none;
}
.modal-content .close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    
}
.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
    margin-top: 10px;
    justify-items: center;
    justify-content: center;
}

.modal-overlay.show {
    top: 15px;
}
/* Updated Modal Styles for Slide-in Effect */
    

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-overlay.show 
    /* Darker Header Styling */
    

    /* Ensure Header Spans Full Width */
    

    /* Fix Modal Position and Alignment */
    

    .modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
/* Ensure Header Spans Full Width */
    

    /* Fix Modal Positioning and Slide-in Effect */
    

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-overlay.show 
    /* Ensure Header Spans Full Width */
    

    /* Fix Modal Positioning and Slide-in Effect */
    

    .modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-overlay.show 
    /* Ensure Header Spans Full Width */
    


/* Fix Modal Positioning and Slide-in Effect */
    

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-overlay.show 
    /* Ensure Main Content is Positioned Below Fixed Header */

main {
    padding-top: 20px;
}
/* Prevent Unnecessary Scrolling */
html, body {
    overflow-x: hidden;
    overflow-y: auto;
}

main {
    padding-bottom: 20px; /* Add some space at the bottom to avoid cutoff */
}


/* --- MODAL FIX --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(150, 150, 150, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1100; /* Ensure modal is on top */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: #f5f5f7;
    width: 600px;
    padding: 20px;
    border-radius: 10px;
    position: absolute;
    top: -150px; /* Start off-screen */
    left: 50%;
    transform: translateX(-50%);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: top 0.4s ease-in-out;
}
.modal-overlay.show .modal-content {
    top: 15px; /* Slide into correct position */
}

#closeModal {
  cursor: pointer;
  pointer-events: auto;
}
