/* Universal styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    /* Subtle grid background */
    background-color: #111;
    background-image: linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
                      linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed; /* Ensures background stays fixed */
    color: #fff;
    display: flex; /* Use flexbox for main layout */
    justify-content: flex-start; /* Aligns content to start, making space for sidebar */
    align-items: center; /* Vertically centers the content (services-container) on desktop */
    min-height: 100vh; /* Ensures body takes full viewport height */
    overflow-x: hidden; /* Prevents horizontal scrollbar from sidebar toggle */
    padding-left: 260px; /* Space for the fixed sidebar on desktop */
    position: relative; /* Needed for positioning hamburger and sidebar */
}

/* HAMBURGER BUTTON STYLES */
.hamburger {
    display: none; /* Hidden by default on desktop */
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    width: 30px;
    height: 22px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: orange;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger animation when active */
aside.active + .hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

aside.active + .hamburger span:nth-child(2) {
    opacity: 0;
}

aside.active + .hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ASIDE (SIDEBAR) STYLES */
aside {
    width: 240px;
    height: 100vh;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1a1a1a;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.03);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: left 0.3s ease;
}

.logo {
    margin-bottom: 2rem;
}
.logo img {
    width: 50px;
    height: auto;
}

nav ul {
    list-style: none;
    width: 100%;
}
nav ul li {
    margin: 1rem 0;
}
nav ul li a {
    color: #ccc;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.2rem 0;
    transition: color 0.3s;
}
nav ul li a.active,
nav ul li a:hover {
    color: orange;
    background: none;
}

nav hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
    width: 100%;
}
.socials {
    margin-top: auto;
    display: flex;
    gap: 1rem;
}
.socials a {
    color: #ccc;
    font-size: 1.2rem;
    transition: color 0.3s;
}
.socials a:hover {
    color: orange;
}

/* SERVICES CONTAINER STYLES */
.services-container {
    margin-top: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    max-width: auto;
    width: 100%; /* Ensures it respects max-width */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    padding: 2rem;
    transition: transform 0.3s ease;
    backdrop-filter: blur(8px);

    /* Landing Page Animation */
    opacity: 0; /* Start invisible */
    transform: translateY(20px); /* Start slightly below */
    animation: fadeInSlideUp 1s ease-out forwards; /* Apply animation */
    animation-delay: 0.5s; /* Delay for better effect after sidebar is stable */
}

h2 {
    color: orange;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.service-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* ADDED: Hover effects transitions */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

/* ADDED: .service-box:hover rules */
.service-box:hover {
    transform: translateY(-8px); /* More pronounced lift effect on hover */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4); /* Deeper, more noticeable shadow */
    background: rgba(255, 255, 255, 0.06); /* Slightly brighter background */
}

.service-box i {
    font-size: 3rem;
    color: orange;
    margin-bottom: 1rem;
}

.service-box h3 {
    color: #eee;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.service-box p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Back button styles */
.back-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.6rem 1.2rem;
    background-color: orange;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background 0.3s;
}

.back-text {
    margin-left: 0;
    transition: margin-left 0.3s;
}

.back-btn:hover {
    background-color: #eaa31f;
}

.back-btn:hover .back-text {
    margin-left: 6px;
}

/* Keyframe for initial animation (re-added) */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* RESPONSIVE STYLES */
@media (max-width: 768px) {
    body {
        padding-left: 2rem; /* Reset padding for mobile */
        flex-direction: column; /* Stack elements vertically */
        align-items: center; /* Center content horizontally */
        justify-content: flex-start; /* Align content to top on mobile */
    }

    /* Show hamburger on mobile */
    .hamburger {
        display: flex;
    }

    /* Hide sidebar by default on mobile */
    aside {
        left: -240px;
        height: 100%;
        box-shadow: none;
        background:#1a1a1a;
    }

    /* Show sidebar when active on mobile */
    aside.active {
        left: 0;
    }

    /* When sidebar is active, push the main content to the right */
    body.sidebar-open .services-container {
        transform: translateX(240px);
    }

    /* Mobile specific adjustments for .services-container */
    .services-container {
        margin-right: 30px;
        padding: 1.5rem;
        backdrop-filter: blur(8px);
    }

    .services-grid {
        grid-template-columns: 1fr; /* Stack services vertically on small screens */
    }
}