/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: auto;
}

/* Header Styles */
header {
    background-color: #0a3d62;
    padding: 20px 0;
}

header .logo h1 {
    color: #fff;
    font-weight: 700;
}

header nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
}

header nav ul li {
    margin-left: 30px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

header nav ul li a:hover {
    color: #38ada9;
}

/* Hero Section Styles */
.hero {
    background-image: url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 61, 98, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 24px;
    margin-bottom: 30px;
}

.hero .btn {
    background-color: #38ada9;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.hero .btn:hover {
    background-color: #079992;
}

/* About Us Section */
.about-us {
    padding: 60px 0;
    background-color: #fff;
}

.about-us h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 36px;
    color: #0a3d62;
}

.about-us p {
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
}

/* Portfolio Section */
.portfolio {
    padding: 60px 0;
}

.portfolio h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 36px;
    color: #0a3d62;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-gap: 20px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s;
}

.portfolio-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 61, 98, 0.8);
    color: #fff;
    opacity: 0;
    transition: opacity 0.5s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.portfolio-item h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.portfolio-item p {
    font-size: 16px;
}

/* Contact Us Section */
.contact-us {
    padding: 60px 0;
    background-color: #fff;
}

.contact-us h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 36px;
    color: #0a3d62;
}

.contact-form {
    max-width: 600px;
    margin: auto;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-bottom: 2px solid #ccc;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #0a3d62;
}

.form-group label {
    position: absolute;
    left: 15px;
    top: 15px;
    color: #999;
    font-size: 16px;
    transition: all 0.3s;
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -20px;
    font-size: 14px;
    color: #0a3d62;
}

.contact-form .btn {
    background-color: #38ada9;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form .btn:hover {
    background-color: #079992;
}

/* Footer Styles */
footer {
    background-color: #0a3d62;
    color: #fff;
    padding: 20px 0;
}

footer p {
    text-align: center;
    margin-bottom: 10px;
}

footer .social-links {
    text-align: center;
}

footer .social-links a {
    color: #fff;
    margin: 0 10px;
    font-size: 18px;
    transition: color 0.3s;
}

footer .social-links a:hover {
    color: #38ada9;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header nav ul {
        flex-direction: column;
        align-items: center;
    }

    header nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 18px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation Styles */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animations to sections */
.about-us, .portfolio, .contact-us {
    opacity: 0;
    animation: fadeInUp 1s forwards;
}

@media (prefers-reduced-motion: no-preference) {
    .about-us, .portfolio, .contact-us {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Logo styling */
.logo img.logo-image {
    height: 60px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

/* Styling "Call Us" button similar to "Get in Touch" button */
header nav ul li .btn {
    background-color: #38ada9;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

/* Portfolio hover bug fix and enhancements */
.portfolio-grid div {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-grid div:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
}

/* Animated Gradient Background for Hero Section */
@keyframes gradientBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero {
    background: linear-gradient(135deg, #38ada9, #0a3d62, #4d648d);
    background-size: 200% 200%;
    animation: gradientBackground 15s ease infinite;
    color: #fff;
    display: flex;
    align-items: center;
    position: relative;
    height: 80vh;
}

/* Portfolio Image 1:1 Aspect Ratio */
.portfolio-item {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio */
}

.portfolio-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images maintain aspect ratio without stretching */
}

/* Improved Animated Gradient Background for Hero Section */
@keyframes gradientBackgroundEnhanced {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 50%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 50%; }
    100% { background-position: 0% 50%; }
}

.hero {
    background: linear-gradient(135deg, #38ada9, #0a3d62, #4d648d, #2b5876);
    background-size: 300% 300%;
    animation: gradientBackgroundEnhanced 20s ease infinite;
}

/* Mobile-Friendly Adjustments */
@media (max-width: 768px) {
    /* Header adjustments for mobile */
    header .container {
        flex-direction: column;
        align-items: center;
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
    }

    header nav ul li {
        margin: 10px 0;
    }

    /* Hero Section adjustments for better mobile view */
    .hero h2 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .hero p {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .hero .btn {
        padding: 12px 20px;
        font-size: 16px;
    }

    /* About Us and Portfolio Sections */
    .about-us, .portfolio, .contact-us {
        padding: 40px 20px;
    }

    .about-us h2, .portfolio h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .about-us p, .portfolio p {
        font-size: 16px;
    }

    /* Portfolio grid adjustments */
    .portfolio-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns on smaller screens */
        gap: 10px;
    }

    /* Contact Form adjustments */
    form input, form textarea, form button {
        width: 100%;
        font-size: 16px;
        padding: 10px;
    }

    /* Footer adjustments */
    footer {
        text-align: center;
        padding: 20px 10px;
    }
}

/* Hero Section Parallax Background */
.hero {
    background-image: url('images/portfolio/hero_background.jpeg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}


/* Responsive styling for hero background */
.hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Adjustments for mobile screens */
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        background-position: top;
    }
}
