:root {
    --primary-color: #1a73e8; /* A modern blue */
    --text-color: #333;
    --background-color: #f9f9f9;
    --light-gray: #e0e0e0;
}
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6; /* Improved line spacing for readability */
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600; /* Slightly bolder headings */
    line-height: 1.2;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
}

#main-header, #main-nav, #main-footer {
    background-color: var(--light-gray); /* Light background */
    padding: 10px 0;
}

#main-footer {
    position: fixed; /* Fix the footer to the viewport */
    bottom: 0; /* Align the footer to the bottom */
    left: 0; /* Align the footer to the left */
    width: 100%; /* Ensure the footer spans the entire width */
    background-color: var(--light-gray); /* Or any background color you prefer */
    padding: 10px 0;
    z-index: 100; /* Ensure the footer is above other elements */
}

/* Add padding to the bottom of the main content to prevent overlap */
main {
    padding-bottom: 60px; /* Adjust this value based on the footer's height */
    flex: 1;
}

#main-nav a {
    margin-right: 15px;
    text-decoration: none;
    color: var(--text-color);
}

#main-footer .social-links a {
    margin-left: 10px;
    text-decoration: none;
    color: var(--text-color);
    margin-top: 10px; /* Add some space between the paragraph and social links */
}

#main-footer .container {
    text-align: center; /* Center the text content */
}

#main-footer .social-links {
    margin-top: 10px; /* Add some space between the paragraph and social links */
}

#main-footer .social-links a img {
    width: 24px; /* Adjust icon size as needed */
    height: 24px;
    margin-left: 10px; /* Adjust spacing between icons */
    vertical-align: middle; /* Align icons vertically */
}
#main-footer .social-links a {
    display: inline-block; /* allows for adjusting of margins */
}

/* Dark Mode Styles */
body.dark-mode {
    --text-color: #e0e0e0;
    --background-color: #121212;
    --light-gray: #333;
}

body.dark-mode #main-header, body.dark-mode #main-nav, body.dark-mode #main-footer {
    background-color: #222;
}

body.dark-mode #main-nav a, body.dark-mode #main-footer .social-links a {
    color: #ccc;
}

body.dark-mode #theme-toggle img {
    filter: invert(100%); /* Invert to white in dark mode */
}

/* Home Page Styles */
#home {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: linear-gradient(rgba(57, 57, 57, 0.5), rgba(0, 0, 0, 0.5)), url('https://hirro.co.uk/wp-content/uploads/2019/05/professional-wordpress-theme-by-indigothemes-musicmacho-pro-hero-background.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    background-attachment: fixed; /* Parallax effect */
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color); /* Button color */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #1565c0; /* Darker button color on hover */
}

/* Add general button styling that will be used across the site*/
.btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

/* Dark Mode Styles for Home Page */
body.dark-mode #home {
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('assets/images/hero-bg-dark.jpg');
    background-attachment: fixed; /* Parallax effect */
}

body.dark-mode .btn {
    background-color: #669df6;
}

body.dark-mode .btn:hover {
    background-color: #4374d9;
}

/* About Me Page Styles */
#about {
    padding: 50px 0;
}

#about h2 {
    text-align: center;
    margin-bottom: 30px;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.about-image {
    flex: 1 1 300px;
    margin-right: 30px;
    max-width: 300px;
}

.about-image img {
    width: 100%;
    border-radius: 5px;
}

.about-text {
    flex: 1 1 500px;
}

/* Dark Mode Styles for About Me Page */
body.dark-mode #about {
    background-color: #222;
    color: #fff;
}

/* Portfolio Page Styles */
#portfolio {
    padding: 50px 0;
}

#portfolio h2 {
    text-align: center;
    margin-bottom: 30px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
}

.portfolio-item img {
    width: auto; /* Display image at its natural width */
    height: auto; /* Display image at its natural height */
    display: block;
    transition: transform 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Dark Mode Styles for Portfolio Page */
body.dark-mode #portfolio {
    background-color: #222;
    color: #fff;
}

body.dark-mode .portfolio-overlay {
    background-color: rgba(0, 0, 0, 0.9);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
}

/* Services Page Styles */
#services {
    padding: 50px 0;
}

#services h2 {
    text-align: center;
    margin-bottom: 30px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.service-item {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
    margin-bottom: 10px;
}

/* Dark Mode Styles for Services Page */
body.dark-mode #services {
    background-color: #222;
    color: #fff;
}

body.dark-mode .service-item {
    border-color: #444;
}

/* Testimonials Page Styles */
#testimonials {
    padding: 50px 0;
}

#testimonials h2 {
    text-align: center;
    margin-bottom: 30px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.testimonial-card {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.testimonial-author {
    margin-top: 15px;
    font-style: italic;
}

/* Dark Mode Styles for Testimonials Page */
body.dark-mode #testimonials {
    background-color: #222;
    color: #fff;
}

body.dark-mode .testimonial-card {
    border-color: #444;
}

/* Contact Page Styles */
#contact {
    padding: 50px 0;
}

#contact h2 {
    text-align: center;
    margin-bottom: 30px;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.contact-form {
    flex: 1 1 500px;
    margin-right: 20px;
}

.contact-info {
    flex: 1 1 300px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-group textarea {
    resize: vertical;
}

/* Dark Mode Styles for Contact Page */
body.dark-mode #contact {
    background-color: #222;
    color: #fff;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background-color: #333;
    border-color: #444;
    color: #fff;
}

/* 404 Page Styles */
#404 {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#404 h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

#404 p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* Dark Mode Styles for 404 Page */
body.dark-mode #404 {
    background-color: #222;
    color: #fff;
}

/* Hover Effects */
#main-nav a:hover,
#main-footer .social-links a:hover {
    color: #007bff; /* Change link color on hover */
    transition: color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3; /* Darker button color on hover */
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Loading Animations */
body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

/* Add a simple fade in animation to the hero section */
#home .hero {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

body.loaded #home .hero {
    opacity: 1;
    transform: translateY(0);
}

/* Add a simple fade in animation to the about section */
#about {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

body.loaded #about {
    opacity: 1;
    transform: translateY(0);
}

/* Add similar animations to the other sections */
#portfolio, #services, #testimonials, #contact, #404 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

body.loaded #portfolio, body.loaded #services, body.loaded #testimonials, body.loaded #contact, body.loaded #404 {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    .about-content,
    .contact-content {
        flex-direction: column;
        align-items: center;
    }

    .about-image,
    .contact-form,
    .contact-info {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .portfolio-grid,
    .services-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

#main-header .container {
    display: flex;
    justify-content: space-between; /* Distribute space between elements */
    align-items: center; /* Vertically align items */
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

#theme-toggle img {
    width: 24px; /* Adjust icon size as needed */
    height: 24px;
    filter: none; /* Reset any previous filters */
}