/* General Body and HTML Settings */
html, body {
    overflow-x: hidden; /* Prevent horizontal scrolling */
    max-width: 100%; /* Ensure the content does not exceed the viewport width */
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #FFF;
    background-color: #1a1a1a;
}

/* Sticky Header for All Screen Sizes */
#header {
    position: sticky;
    top: 0;
    z-index: 1000; /* Ensures the header stays on top of other content */
    width: 100%;
    background-color: rgba(51, 51, 51, 1); /* Maintains background color */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px; /* Adds padding for consistency */
    transition: all 0.3s ease; /* Smooth transition for all changes */
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.7); /* Adds shadow for depth */
}


#logo {
    display: block;
    max-width: 100%;
    height: auto;
    padding-bottom: 20px;
    padding-top: 20px;
    transition: transform 0.3s ease;
}

#header.small-header {
    padding: 10px 20px; /* Smaller padding */
    height: 50px; /* Smaller height */
    font-size: 90%; /* Smaller font size */
}

#header.small-header #logo {
    transform: scale(0.8); /* Smaller logo */
}

#header.small-header nav ul li a {
    font-size: 18px; /* Smaller font size for nav links */
}

a {
    color: #e6b800;   
    text-decoration: none; 
    transition: color 0.3s ease; 
}

/* Hover state of the link */
a:hover {
    color: white;         
}

/* Active (pressed) state of the link */
a:active {
    color: #FFCC00;       /* Text color when the link is clicked */
    position: relative;
    top: 1px;           /* Optionally makes the link appear to be pressed down */
}

/* Navigation Menu Styling */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin: 0 10px;
    padding: 3px 3px;
    display: inline;
    transition: font-size 0.3s ease;
    margin-right: 20px;
    padding-right: 20px;

}

nav ul li a {
    color: #FFF;
    text-decoration: none;
    font-size: 26px;
}

nav ul li a:hover, nav ul li a:focus {
    color: #FFCC00;
}

#home {
    position: relative;
    background-image: url('../images/cover4.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh; /* Maintain full height */
    padding-top: 70px; /* Use padding instead of margin */
}

/* Section Styling */
section {
    padding: 60px 50px;
    scroll-margin-top: 140px;
    min-height: auto; /* Adjust this value based on the height of your fixed header */
}

.section.services {
    padding: 20px;
    background-color: #2a2a2a;
}

/* Accordion Styling */
.accordion-header {
    background-color: #333;
    color: #FFF;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 22px;
}

.accordion-content {
    display: none;
    background-color: #444;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.accordion-header.active + .accordion-content {
    display: block;
}

.section.contact {
    background-color: #2a2a2a;
    box-shadow: 0px 10px 35px rgba(255, 255, 255, 0.7);
}

.section-projects {
    background-color: #2a2a2a;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #333;
    border-radius: 5px;
}

.section-title h2 {
    font-size: 36px;
}

.prj-image-slider {
    max-width: 1200px; /* Adjust this to your desired width */
    margin: 0 auto; /* Center the slider */
    overflow: hidden;
}

.prj-image {
    width: 100%;
    height: auto;
}

/* Project Boxes and Images */
.project-box {
    position: relative; /* Add this line */
    width: 25%;
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0px 8px rgb(0, 0, 0);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.project-box img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border-radius: 5px;
}

.project-box:hover {
    transform: translateY(-5px);
}

.projects-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    padding-bottom: 20px;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px; /* Reduce padding to fit within the box */
    color: var(--bg-color);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden; /* Ensure content stays within the overlay */
    box-sizing: border-box; /* Include padding in the element's width and height */
    max-height: 100%; /* Ensure it doesn't exceed the box height */
}

.project-box:hover .project-overlay {
    transform: translateY(0); /* Slide the overlay up to be visible */
}

.project-title {
    font-size: 1rem; /* Base font size */
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    text-align: center;
    padding: 5px 0; /* Add some padding for better readability */
}

.project-description {
    display: none; /* Hide the description in the overlay */
}

.price-emphasis {
    font-size: 1.8rem; /* Adjust the size for emphasis */
    font-weight: bold;
    color: #FFCC00; /* A color that stands out */
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    z-index: 9998;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #2a2a2a;
    margin: auto;
    padding: 20px;
    border-radius: 5px;
    width: 100%;
    max-width: 1920px;
    display: flex;
}

.popup-left {
    width: 70%;
    position: relative;
}

.popup-left img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.popup-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%); /* Center the arrows vertically */
    z-index: 9999;
}

.prev-arrow, .next-arrow {
    cursor: pointer;
    font-size: 100px;
    color: #e6b800;
}

.prev-arrow {
    align-self: flex-start; /* Align to the top left */
}

.next-arrow {
    align-self: flex-start; /* Align to the top right */
}

.popup-right {
    width: 30%;
    padding-left: 20px;
}

.popup-right h3 {
    margin-bottom: 10px;
}

/* Styling for Text in Popup */
.popup-right p {
    background-color: #2a2a2a; /* Dark background to contrast with text */
    padding: 10px 15px; /* Adds padding around the text */
    border-radius: 5px; /* Rounds the corners of the background */
    margin-bottom: 10px; /* Adds space below each paragraph */
    font-size: 22px; /* Slightly smaller font size for better fit */
    line-height: 1.6; /* Increases line height for readability */
    color: #FFF; /* Ensures the text is white and readable */
}

.popup-right p span {
    display: inline-block;
    vertical-align: top;
    margin-right: 5px; /* Adds space between the icon and text */
}

.popup-right p span.icon {
    color: #FFCC00; /* Makes the checkmark icons stand out */
    font-size: 18px; /* Slightly larger icon size for emphasis */
}

.popup-right p {
    /*display: flex;*/
    align-items: flex-start; /* Aligns icons with the start of the text */
    gap: 10px; /* Adds space between multiple items in a list */
    margin: 10px 0; /* Adds margin to separate the lines more */
}

.close {
    position: absolute;
    top: 0%;
    right: 20px;
    cursor: pointer;
    font-size: 80px;
    color: #e6b800;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px;
}

footer p {
    margin-bottom: 0px;
}

/* Miscellaneous */
h1 {
    font-size: 65px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    font-size: 42px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

h3 {
    font-size: 28px;
    font-weight: normal;
    text-align: left;
    margin-bottom: 10px;
}


.centered-title {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: fit-content; /* Ensure that the element takes only as much space as its content */
}

p {
    font-size: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #FFCC00;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.7);
}
.btn:hover {
    background-color: #e6b800;
    transform: translateY(-3px);
}

/* Service Grid */
.service-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 45px;
}

.service-item {
    flex-basis: calc(47.333% - 50px);
    text-align: center;
    padding: 30px;
    background-color: #333;
    border-radius: 10px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(120px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.service-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-item:hover {
    transform: translateY(-10px) !important; /* Use !important to ensure hover effect takes precedence */
}

.service-icon {
    font-size: 48px;
    color: #FFCC00;
    margin-bottom: 20px;
}

.service-item h3 {
    margin-bottom: 15px;
    color: #fff;
    text-align: center;
}

/* Contact */
.contact p {
    padding-bottom: 20px;
}

.section.contact .fa-facebook-square {
    margin-right: 5px;
    color: #4267B2;
}

.section.contact .fa-phone {
    margin-right: 5px;
    color: #FFCC00;
}

.section.contact .fa-envelope {
    margin-right: 5px;
    color: #ffffff;
}

/* Overlay */
.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.overlay h1 {
    font-size: 42px;
    animation: fadeInUp 1s ease-out;
    color: #ffffff;
    text-shadow: 4px 4px 4px #1a1a1a;
}

.overlay p {
    animation: fadeInUp 1s ease-out 0.5s both;
    font-size: 25px;
    color: #ffffff;
    text-shadow: 2px 2px 2px #1a1a1a;
}

.signature {
    text-align: right;
    color: #252525;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #header {
        padding: 10px 0;
    }

    #logo {
        width: 480px; /* Adjust logo size for mobile */
    }

    nav ul li a {
        font-size: 20px; /* Reduce the font size for menu items */
    }
    
    #home {
        background-size: cover; /* Adjust background size for smaller screens */
        background-position: center top;
        height: auto; /* Let content determine height on small screens */
        padding-top: 400px;
    }
 
    .overlay {
        top: 35%; /* Adjust the top position to 35% for small screens and mobile */
        transform: translate(-50%, -35%); /* Adjust the translate to center properly */
    }

    .overlay h1 {
        font-size: 24px; /* Smaller font size for smaller screens */
    }

    .overlay p {
        font-size: 16px;
    }

    section {
        padding: 40px 20px; /* Reduce padding on small screens */
    }

    .btn {
        padding: 10px 20px; /* Slightly smaller button */
        font-size: 14px;
    }

    .project-title {
        font-size: 0.75rem;
    }
    .project-box {
        width: calc(50% - 10px);
        margin-bottom: 10px;
    }

    .section.services {
        margin-bottom: 0; /* Remove any extra bottom margin */
        padding-bottom: 0; /* Remove extra padding */
    }
    
    .section-title {
        margin-top: 0; /* Adjust title margin to reduce space */
    }

    .service-item {
        flex-basis: calc(100% - 0px);
    }

    .popup-left {
    order: -1; /* Move image to the top */
    width: 100%;
    text-align: center;
    }

    .popup-right {
    width: 100%;
    padding-top: 20px;
    text-align: left;
    }
    
}

@media (max-width: 480px) {
    #logo {
        width: 350px; /* Further adjust logo size */
    }

    nav ul {
        display: flex;
        justify-content: space-between; /* Ensures items are evenly spaced */
        padding: 0 5px; /* Adds minimal padding on the sides */
    }

    nav ul li {
        margin: 0 2px; /* Further reduces the margin between the items */
    }

    nav ul li a {
        font-size: 13px; /* Smaller font size for smaller screens */
        padding: 5px 5px; /* Reduces padding to fit content */
    }

    #home {
        background-size: cover; /* Adjust background size for smaller screens */
        background-position: center top;
        height: auto; /* Let content determine height on small screens */
        padding-top: 400px;
    }

    .overlay {
        top: 35%; /* Adjust the top position to 35% for small screens and mobile */
        transform: translate(-50%, -35%); /* Adjust the translate to center properly */
    }

    .overlay h1 {
        font-size: 20px;
    }

    .overlay p {
        font-size: 14px;
    }

    section {
        padding: 40px 20px; /* Reduce padding on small screens */
    }

    .btn {
        padding: 8px 16px; /* Even smaller button */
        font-size: 12px;
    }

    .projects-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between; /* Distributes space evenly */
        padding: 10px;
    }
    
    .project-box {
        flex: 1 1 calc(33.333% - 10px); /* Each project box takes up one-third of the row */
        margin-bottom: 10px;
        border-radius: 5px;
        overflow: hidden;
        box-sizing: border-box; /* Ensure padding and borders are included in the element's width */
    }

    .project-title {
        font-size: 0.8rem;
        font-weight: bold;
        color: #ffffff;
        text-align: center;
        margin-top: 5px;
    }

    .popup-content {
        display: flex;
        flex-direction: column; /* Stack elements vertically */
        padding: 10px;
    }

    .popup-left {
        width: 100%;
        order: -1; /* Ensures the image appears first */
    }

    .popup-left img {
        width: 100%; /* Ensures the image takes the full width */
        border-radius: 5px;
    }

    .popup-right {
        width: 100%;
        padding-top: 20px;
        text-align: left;
    }
    
    .popup-right p {
        font-size: 14px;
    }

}

@media (max-width: 945px) {
    h1 {
        font-size: 55px;
    }
    
    h2 {
        font-size: 30px;
    }

    .overlay p {
        font-size: 18px;
    }
    
    h3 {
        font-size: 22px;
        text-align: center;
    }
    
    p {
        font-size: 16px;
    }

    .content-flex {
        flex-direction: column;
        align-items: center;
    }

    .prj-image {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .text-content {
        text-align: left;
    }

    .overlay h1 {
        font-size: 25px;
        color: #ffffff;
        text-shadow: 4px 4px 4px #1a1a1a;
    }

    .project-title {
        font-size: 0.8rem;
    }
    .project-box {
        width: calc(100% / 2 - 10px);
    }

    .popup-content {
        display: flex;
        flex-direction: column; /* Stack elements vertically */
        padding: 10px;
    }

    .popup-left {
        width: 100%;
        order: -1; /* Ensures the image appears first */
    }

    .popup-left img {
        width: 100%; /* Ensures the image takes the full width */
        border-radius: 5px;
    }

    .popup-right {
        width: 100%;
        padding-top: 20px;
        text-align: left;
    } 

    .popup-right p {
        font-size: 14px;
    }

}

@media (max-width: 1300px) {
    header {
        flex-direction: column; /* Stack logo and menu vertically */
        justify-content: center; 
        align-items: center;
    }

    #logo {
        padding-bottom: 0px;
        padding-top: 0px;
    }

    nav ul {
        flex-direction: row; /* Keeps menu horizontal */
        justify-content: center; /* Center the menu items */
        width: 100%; /* Full width */
    }

    nav ul li {
        display: block; /* Stack items vertically */
        text-align: center; /* Center text within menu items */
    }

    #menu {
        padding-bottom: 0px;
    }

    .project-title {
        font-size: 0.9rem;
    }
    .project-box {
        width: calc(100% / 3 - 10px);
    }

    .popup-right p {
        font-size: 16px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 13px;  /* for vertical scrollbars */
    height: 13px; /* for horizontal scrollbars */
}

::-webkit-scrollbar-track {
    background-color: #303030; /* light grey background for the track */
}

::-webkit-scrollbar-thumb {
    background-color: #696969; /* dark grey handle */
    border-radius: 6px; /* round corners on the handle */
}

::-webkit-scrollbar-thumb:hover {
    background-color: #777777; /* slightly darker grey on hover */
}

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
