/* Overflow Fixes for Horizontal Scrolling */

/* Fix for horizontal scrolling issues */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Fix for container widths */
.container {
    width: 100%;
    max-width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Section padding fixes */
section {
    padding: 80px 5%;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    section {
        padding: 60px 4%;
    }
}

/* Image container fixes */
img {
    max-width: 100%;
    height: auto;
}

/* Timeline fixes */
.timeline {
    width: 100%;
    box-sizing: border-box;
}

.timeline-content {
    width: calc(50% - 30px);
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .timeline-content {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Grid fixes */
.skills-container, 
.about-container, 
.services-container, 
.projects-content {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Table fixes */
table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

/* Fix for skill items that might overflow */
.skill-item {
    width: 100%;
    box-sizing: border-box;
}

/* Header fixes */
header {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    padding-left: 5% !important;
    padding-right: 5% !important;
    box-sizing: border-box !important;
}

/* Fix the duplicate header issue in style.css */
@media (max-width: 768px) {
    header {
        padding-left: 4% !important;
        padding-right: 4% !important;
    }
}

/* Fix for the experience box that may cause overflow */
.experience-box {
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
}

/* Timeline container width fix */
.timeline-container {
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
}

/* Fix for the home section container */
.home .container {
    width: 100%;
    max-width: 1200px;
    grid-template-columns: auto 1fr 1fr;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    .home .container {
        grid-template-columns: 1fr;
        width: 100%;
    }
}

/* Fix for project boxes that might cause overflow */
.project-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.project-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Remove any negative margins that might cause overflow */
* {
    margin-left: 0;
    margin-right: 0;
}

/* Social icons container */
.social {
    box-sizing: border-box;
    width: auto;
    display: flex;
    gap: 1rem;
}

/* Service boxes fix */
.service-box {
    width: 100%;
    box-sizing: border-box;
}

/* Fixing the education and experience sections */
.education,
.experience {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
}

/* Fix for any absolute positioned elements that might cause overflow */
[style*="position: absolute"] {
    max-width: 100vw;
}

/* Fix for any fixed width elements */
[style*="width:"] {
    max-width: 100% !important;
}

/* Fix for the honors container */
.honors-container {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Ensure all flexbox containers don't overflow */
[style*="display: flex"],
[style*="display:flex"] {
    flex-wrap: wrap;
}

/* Fix for the footer */
.footer {
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    width: 100%;
    box-sizing: border-box;
}

/* Fix for the contact form */
.contact-form-container,
.contact-form {
    width: 100%;
    box-sizing: border-box;
}

/* Fix for the skill grid */
.skill-grid {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
}
