/* Basic Reset and Setup */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #ddd;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../static/lamp-6924294_640.jpg');
    background-size: cover;
    background-attachment: fixed; /* Optional: Keep the background fixed */
    overflow-x: hidden;
}

/* Typography */
.writingone {
    font-family: "Bebas Neue", serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.5px;
}

h1,
h2,
h3 {
    color: #eee;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.8rem;
    color: #ffab00;
}

/* Header and Navigation (Consistent with hrhome.css) */
header {
    background-color: rgba(0, 0, 0, 0.9);
    position: sticky;
    top: 0;
    z-index: 100;
}

#menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

#logo img {
    width: 50px;
    height: 50px;
    filter: invert(1) grayscale(100%) contrast(200%);
}

#menu ul {
    list-style: none;
    display: flex; /* Default for larger screens */
    margin: 0;
    padding: 0;
}

#menu ul li {
    margin-left: 1.5rem;
}

#menu ul li a {
    text-decoration: none;
    color: #afafaf;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

#menu ul li a:hover {
    color: white;
}

#userid {
    margin-left: auto !important;
}

#mobile-menu-toggle {
    background: none;
    color: #afafaf;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: none; /* Hidden by default on larger screens */
    z-index: 101; /* Ensure it's above other elements if needed */
}

/* Services Page Styles */
#services-page {
    padding: 4rem 2rem;
}

.services-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-in-out;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-heading {
    margin-bottom: 1rem;
    color: #ffab00;
}

.service-description {
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-block;
    background-color: #ffab00;
    color: black;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.service-link:hover {
    background-color: #e09b00;
}

/* Footer (Consistent with hrhome.css) */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #000;
    color: #afafaf;
    font-size: 0.9rem;
}

/* Responsive Design for Mobile Menu and Layouts */
@media (max-width: 768px) {
    html {
        font-size: 15px; /* Slightly reduce base font size for mobile */
    }

    #menu {
        flex-wrap: wrap; /* Allow items to wrap */
        padding: 1rem; /* Adjust padding for smaller screens */
        height: auto; /* Allow height to adjust if items wrap */
    }

    #menu #logo {
        margin-right: auto; /* Push logo to the left, mobile toggle to the right */
    }

    /* Hide the regular nav links and prepare for mobile dropdown */
    #menu ul {
        display: none; /* Hide by default on mobile */
        flex-direction: column; /* Stack items vertically */
        position: absolute; /* Position relative to the header */
        top: 70px; /* Adjust based on your header's actual height */
        left: 0;
        width: 100%; /* Take full width of the screen */
        background-color: rgba(0, 0, 0, 0.95); /* Semi-transparent overlay */
        padding: 1rem 0; /* Vertical padding for menu items */
        text-align: center;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Subtle shadow */
        z-index: 99; /* Ensure it's below sticky header but above content */
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; /* Smooth slide/fade */
        transform: translateY(-100%); /* Start off-screen upwards */
        opacity: 0;
        pointer-events: none; /* Disable interaction when hidden */
    }

    /* Show the mobile menu when 'active' class is toggled by JS */
    #menu ul.active {
        display: flex; /* Make it visible */
        transform: translateY(0); /* Slide into view */
        opacity: 1;
        pointer-events: all; /* Enable interaction */
    }

    #menu ul li {
        margin: 0.75rem 0; /* Vertical spacing for menu items */
        width: 100%; /* Each list item takes full width */
    }

    #menu ul li a {
        padding: 10px 0; /* Increase clickable area for touch */
        display: block; /* Make the whole area of the list item clickable */
    }

    #userid {
        margin-left: 0 !important; /* Override desktop auto-margin */
    }

    /* Display the mobile toggle button */
    #mobile-menu-toggle {
        display: block; /* Show the hamburger icon on small screens */
    }

    /* Services page specific responsive adjustments */
    #services-page {
        padding: 2rem 1rem; /* Adjust overall padding for smaller screens */
    }

    .services-section {
        grid-template-columns: 1fr; /* Stack service cards vertically */
        gap: 1.5rem; /* Reduce gap between cards */
    }

    .service-card {
        padding: 1.5rem; /* Adjust padding inside cards */
    }

    .service-heading {
        font-size: 2rem; /* Smaller heading for mobile */
    }

    .service-description {
        font-size: 0.95rem; /* Slightly smaller description text */
    }
}