/* Fix viewport overflow */
* {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure containers adapt */
.container,
.centered-box,
.row,
section,
header,
main,
footer {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Base Section Styling */
section {
    padding: 20px 10px; /* Reduced horizontal padding */
    background-color: #f9f9f9;
    color: #062628;
}

/* Section Headings */
h2 {
    color: #138086;
    font-size: 2rem;
    margin-bottom: 20px;
}

img {
    max-width: 100%;
    height: auto;
}

/* Home Section (Intro) */
.home-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background-image: url('images/landscape3.jpeg'); /* 👈 Replace with your actual image path */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
    color: white;
    padding: 100px 40px;
    gap: 40px;
    position: relative; /* Required for overlay positioning */
}

.home-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 1;
}

.home-section > * {
    position: relative;
    z-index: 2; /* Ensure content appears above overlay */
}

.intro-text h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.intro-text h2 {
    font-size: 1.8rem;
    color: #ffffff;
}

.intro-text p {
    font-size: 1.1rem;
    margin-top: 10px;
}

.intro-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Centered Box for All Main Sections */
.centered-box {
    max-width: 1100px;     /* Increased from 850 or 900px */
    width: 100%;
    margin: 30px auto;
    padding: 30px 40px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s ease;
}

.centered-box:hover {
    transform: scale(1.01);
}

.centered-box h2 {
    font-size: 2rem;
    color: #138086;
    margin-bottom: 20px;
    text-align: left;
}

.centered-box p,
.centered-box li {
    font-size: 1.1rem;
    color: #062628;
    line-height: 1.6;
    text-align: left;
}

/* Lists */
ul {
    list-style: disc;
    padding-left: 20px;
}

/* Gallery */
.gallery {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.gallery img {
    width: 200px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    gap: 15px;
}

input, textarea {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Button */
button {
    padding: 10px;
    background-color: #42999E;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

button:hover {
    background-color: #138086;
}

/* Projects Grid (Removed as it conflicts with Bootstrap grid) */

/* Light background and hover animation for project cards */
.card {
    background-color: #f6f9f9 !important; /* light teal-gray tint */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    border: 1px solid #d9e7e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    height: auto; /* Removed fixed height to accommodate content */
    padding: 20px;
}

.card:hover, .skill-badge:hover, .achievement-item:hover {
    transition: all 0.3s ease-in-out;
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Allow full use of card height */
}

.card h5 {
    color: #138086;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.card p {
    font-size: 1rem;
    color: #062628;
    margin-bottom: 10px; /* Ensure space below description */
}

.card a {
    color: #42999E;
    font-weight: bold;
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
    color: #138086;
}

.project-tags {
    margin: 10px 0; /* Add vertical margin to separate from text and button */
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Space between badges */
}

.project-tags .skill-badge {
    padding: 6px 12px; /* Slightly reduce badge padding for compactness */
    font-size: 0.9rem; /* Reduce font size to fit more badges */
    background-color: #185054;
    color: #ffffff;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-tags .skill-badge:hover {
    background-color: #138086;
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.card-body .btn {
    margin-top: 10px; /* Add margin above the button to prevent overlap */
    align-self: flex-start; /* Align button to the left or start */
    padding: 8px 16px; /* Adjust button padding for better fit */
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.skill-badge {
    background-color: #185054; /* dark filled circle */
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: default;
}

.skill-badge:hover {
    background-color: #138086;
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.achievement-item {
    background-color: #fdfdfd;
    border-left: 5px solid #138086;
    padding: 20px 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.1);
    background-color: #f0fafa; /* very light teal shade */
}

.achievement-item h3 {
    margin: 0 0 10px;
    color: #138086;
    font-size: 1.2rem;
}

.achievement-item p {
    color: #062628;
    font-size: 1rem;
    line-height: 1.5;
}

/* Updated Gallery Styling */
.gallery {
    display: flex;
    justify-content: center; /* center the images */
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.gallery img {
    width: 280px;              /* increased size */
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.gallery img:hover {
    transform: scale(1.05);    /* zoom effect */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); /* highlight shadow */
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 70vw;   /* Reduce width */
    max-height: 80vh;  /* Reduce height */
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

.lightbox img:hover {
    transform: scale(1.02);
    cursor: zoom-out;
}

/* Internship Section */
.internship-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 20px;
}

.internship-text {
    flex: 1 1 300px;
}

.internship-text p {
    font-size: 1.1rem;
    color: #062628;
    line-height: 1.6;
}

.internship-image {
    flex: 0 0 auto;
    max-width: 300px;
    margin: 0 auto;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.internship-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.internship-image:hover img {
    transform: scale(1.05);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

/* Contact Section */
.contact-box {
    background-color: #fdfdfd;
    border-left: 5px solid #138086;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    padding: 30px 40px;
    text-align: left;
    transition: transform 0.3s ease;
}

.contact-box:hover {
    transform: scale(1.01);
    background-color: #f0fafa;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #062628;
}

.contact-info a {
    color: #138086;
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
    color: #0b5558;
}

/* Feedback Form Styling */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.feedback-form label {
    font-weight: bold;
    color: #138086;
    font-size: 1rem;
}

.feedback-form input,
.feedback-form textarea {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f9f9f9;
    color: #062628;
    transition: border-color 0.3s ease;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
    border-color: #138086;
    outline: none;
    background-color: #ffffff;
}

.feedback-form button {
    padding: 12px;
    background-color: #138086;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.feedback-form button:hover {
    background-color: #0f6f6f;
    transform: translateY(-2px);
}

/* === Mobile Responsiveness (Up to 768px screen width) === */
@media (max-width: 768px) {
    .home-section {
        flex-direction: column;
        align-items: center;
        padding: 60px 20px;
        text-align: center;
    }

    .intro-text h1 {
        font-size: 2.2rem;
    }

    .intro-text h2 {
        font-size: 1.4rem;
    }

    .intro-text p {
        font-size: 1rem;
    }

    .intro-image img {
        width: 180px;
        margin-bottom: 20px;
    }

    .gallery img {
        width: 90%;
    }

    .centered-box {
        padding: 20px 15px;
    }

    .card {
        padding: 15px;
    }

    .card h5 {
        font-size: 1.1rem;
    }

    .card p {
        font-size: 0.95rem;
    }

    .project-tags {
        gap: 4px; /* Reduce gap on mobile */
    }

    .project-tags .skill-badge {
        font-size: 0.8rem;
        padding: 4px 8px; /* Reduce badge size on mobile */
    }

    .card-body .btn {
        padding: 6px 12px; /* Adjust button padding for mobile */
    }
}