/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

/* Custom Properties */
:root {
    --primary-color: #8e44ad; /* Deep purple */
    --secondary-color: #e74c3c; /* Vibrant red */
    --background-color: #2c3e50; /* Dark navy */
    --text-color: #ecf0f1; /* Light gray */
    --accent-color: #11d711; /* Bright blue */
    --btn-color: #2980b9; /* Blue button */
    --btn-hover-color: #791472; /* Green button hover */
    --transition-speed: 0.3s;
    --border-radius: 10px;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Body Styles */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--background-color);
    padding: 10px 15px;
    z-index: 100;
    transition: background-color var(--transition-speed);
    box-shadow: var(--shadow);
}

.header .logo {
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.menu-icon {
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    display: none;
}

.navbar {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 10px;
    border-radius: var(--border-radius);
    transition: color var(--transition-speed);
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Home Section */
.home {
    padding-top: 120px; /* Increased padding-top */
    text-align: center;
    background-color: var(--background-color);
}

.home h1 {
    padding-top: 50px;
    font-size: 3rem;
    color: var(--primary-color);
}

.home p {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.home .btn {
    background-color: var(--btn-color);
    color: var(--text-color);
    padding: 12px 24px;
    font-size: 1.2rem;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed);
}

.home .btn:hover {
    background-color: var(--btn-hover-color);
}

/* Section Styles */
.section {
    padding: 100px 20px;
    color: var(--text-color);
}

.section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

/* About Section */
.about img {
    width: 100%;
    max-width: 600px;
    border-radius: var(--border-radius);
    margin-top: 20px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    transition: transform var(--transition-speed);
    box-shadow: var(--shadow);
}

.portfolio-item img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.portfolio-item:hover {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(44, 62, 80, 0.8);
    color: var(--text-color);
    text-align: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-item {
    background-color: #34495e;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform var(--transition-speed);
}

.service-item:hover {
    transform: scale(1.05);
}

.service-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Footer Styles */
.footer {
    background-color: #34495e;
    padding: 20px;
    text-align: center;
    color: var(--text-color);
    border-top: 1px solid var(--primary-color);
}

/* Scroll-to-Top Button */
.scroll-to-top {
    display: none; /* Initially hidden */
    color: var (--text-color);
    background-color: var(--primary-color);
    padding: 10px;
    border-radius: 50%;
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 1.5rem;
    transition: background-color var(--transition-speed);
    cursor: pointer;
}

.scroll-to-top:hover {
    background-color: var(--btn-hover-color);
}

/* Show scroll-to-top button when user scrolls down */
body.scrolled .scroll-to-top {
    display: block;
}

/* Contact Section Styles */
.contact {
    padding: 80px 20px; /* Padding for the section */
    color: var(--text-color);
}

.contact h2 {
    font-size: 2.5rem; /* Larger font size for the heading */
    color: var(--primary-color);
    margin-bottom: 40px; /* Space below the heading */
    text-align: center;
}

#contact-form {
    max-width: 600px; /* Form width */
    margin: 0 auto; /* Centering the form */
    background-color: rgba(255, 255, 255, 0.1); /* Transparent background */
    padding: 30px; /* Form padding */
    border-radius: var(--border-radius); /* Rounded corners */
    box-shadow: var(--shadow); /* Subtle shadow */
}

.input-group {
    margin-bottom: 20px; /* Space between input groups */
}

.input-group label {
    display: block; /* Labels above inputs */
    margin-bottom: 8px; /* Space between label and input */
    font-weight: bold; /* Bold labels */
    color: var(--text-color);
}

.input-group input, .input-group textarea {
    width: 100%; /* Full width inputs and textareas */
    padding: 10px; /* Padding inside inputs and textareas */
    border-radius: var(--border-radius); /* Rounded corners */
    border: 1px solid var(--text-color); /* Light border */
    background-color: transparent; /* Transparent background */
    color: var (--text-color); /* Text color */
    transition: border-color var(--transition-speed); /* Smooth transition */
}

.input-group input:focus, .input-group textarea:focus {
    outline: none; /* No default focus outline */
    border-color: var(--primary-color); /* Highlight border on focus */
}

textarea {
    resize: none; /* Prevent resizing text area */
}

.btn {
    display: block; /* Make button full-width */
    margin: 20px auto 0; /* Margin above and centered button */
    padding: 12px 24px; /* Button padding */
    font-size: 1.2rem; /* Button font size */
    background-color: var(--btn-color); /* Button color */
    color: var(--text-color); /* Button text color */
    border-radius: var(--border-radius); /* Button rounded corners */
    border: none; /* Remove default border */
    transition: background-color var(--transition-speed); /* Smooth transition */
    cursor: pointer; /* Pointer cursor */
}

.btn:hover {
    background-color: var(--btn-hover-color); /* Button hover color */
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    /* Toggle Menu Icon */
    .menu-icon {
        display: block;
    }

    /* Responsive Navbar */
    .navbar {
        display: none;
        flex-direction: column;
        background-color: var(--background-color);
        padding: 10px 20px;
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        z-index: 1001;
    }

    .navbar.active {
        display: flex;
    }

    /* Adjust padding for smaller screens */
    .section {
        padding: 60px 20px;
    }

    /* Single-column grid for portfolio and services */
    .portfolio-grid, .services-grid {
        grid-template-columns: 1fr;
    }
}

