/*
   LAYOUT FIXES: Container boundaries and responsive spacing
   Create this as layout-fixes.css (since you already added the link to it)
*/

/* Fix horizontal scrollbar by ensuring proper container boundaries */
html, body {
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Fix the main container structure */
.main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure the showSideForm row doesn't break container boundaries */
.row.justify-content-between.gy-4 {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* Fix container structure - add missing container wrapper */
.main > .row.justify-content-between.gy-4 {
    margin: 40px auto 0;
    max-width: 1200px; /* Limit max width */
    padding: 0 15px; /* Add padding for mobile */
}

/* Left content column adjustments */
.col-lg-7.d-flex.align-items-center {
    align-items: flex-start !important;
    padding-right: 30px; /* Reduce gap on large screens */
}

/* Right sidebar column adjustments */
.col-lg-4 {
    padding-left: 15px; /* Reduce gap on large screens */
}

/* RESPONSIVE FIXES */

/* Large screens (1200px and up) - Reduce the gap between content and form */
@media (min-width: 1200px) {
    .row.justify-content-between.gy-4 {
        gap: 40px; /* Control the gap between columns */
    }

    .col-lg-7.d-flex.align-items-center {
        flex: 0 0 58%; /* Slightly smaller content area */
        max-width: 58%;
        padding-right: 20px;
    }

    .col-lg-4 {
        flex: 0 0 38%; /* Slightly larger form area */
        max-width: 38%;
        padding-left: 0;
    }
}

/* Medium screens (992px to 1199px) - Better spacing */
@media (min-width: 992px) and (max-width: 1199px) {
    .main > .row.justify-content-between.gy-4 {
        max-width: 100%;
        padding: 0 30px;
    }

    .col-lg-7.d-flex.align-items-center {
        padding-right: 20px;
    }

    .col-lg-4 {
        padding-left: 10px;
    }
}

/* Small to medium screens (768px to 991px) - Stack and center content */
@media (max-width: 991px) {
    .main > .row.justify-content-between.gy-4 {
        flex-direction: column;
        align-items: center;
        text-align: center; /* Center text content */
        padding: 0 20px;
        margin-top: 20px;
    }

    .col-lg-7.d-flex.align-items-center,
    .col-lg-4 {
        flex: none;
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin-bottom: 30px;
    }

    /* Center the content sections */
    .about .row.position-relative {
        justify-content: center;
        text-align: center;
    }

    .about .col-lg-7:not(.about-img) {
        display: flex;
        justify-content: center;
    }

    .about .our-story {
        max-width: 600px; /* Limit width for better readability */
        margin: 0 auto;
        text-align: left; /* Keep text left-aligned for readability */
    }
}

/* Very small screens (up to 767px) - Mobile optimization */
@media (max-width: 767px) {
    .main > .row.justify-content-between.gy-4 {
        padding: 0 15px;
        margin-top: 15px;
    }

    .about .our-story {
        padding: 20px;
        max-width: 100%;
    }

    .contact-us-form {
        margin-top: 20px;
    }
}

/* Fix specific layout issues with about section */
.about.section {
    width: 100%;
    max-width: 100%;
}

.about .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.about .row.position-relative {
    margin: 0;
    width: 100%;
}

/* Fix image responsiveness */
.about .about-img img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Projects section adjustments to prevent overflow */
.projects.section {
    width: 100%;
    overflow-x: hidden;
}

.projects .container {
    max-width: 100%;
    padding: 0 15px;
}

.projects .isotope-container {
    margin: 0;
    width: 100%;
}

/* Portfolio items responsive grid */
.projects .portfolio-item {
    margin-bottom: 20px;
}

@media (max-width: 991px) {
    .projects .col-lg-4 {
        flex: 0 0 50%; /* 2 columns on tablet */
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .projects .col-lg-4 {
        flex: 0 0 100%; /* 1 column on mobile */
        max-width: 100%;
    }
}

/* Contact form improvements */
.contact-us-form {
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure all form elements stay within bounds */
.contact-us-form .row {
    margin: 0;
}

.contact-us-form .col-md-6,
.contact-us-form .col-md-4,
.contact-us-form .col-md-12 {
    padding-left: 8px;
    padding-right: 8px;
}

/* Fix button centering */
.contact-us-form .form-group:last-child {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Sticky form behavior on larger screens */
@media (min-width: 992px) {
    .contact-us-form {
        position: sticky;
        top: 20px;
        height: fit-content;
    }
}

/* Page title responsiveness */
.page-title {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.page-title .container {
    max-width: 100%;
    padding: 0 15px;
}
/*
   HOMEPAGE SPECIFIC FIXES
   Add this to your existing layout-fixes.css file
*/

/* Homepage layout adjustments */
.index-page .main {
    padding-top: 0;
}

.index-page .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.index-page .row {
    margin-top: 40px;
    align-items: flex-start;
}

/* Hero carousel fixes */
#section-fqREP4OWmC-carousel {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

#section-fqREP4OWmC-carousel .carousel-item {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

#section-fqREP4OWmC-carousel .carousel-item.active {
    opacity: 1;
}

#section-fqREP4OWmC-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Ensure carousel controls are visible */
#section-fqREP4OWmC-carousel .carousel-control-prev,
#section-fqREP4OWmC-carousel .carousel-control-next {
    z-index: 10;
    opacity: 0.8;
}

#section-fqREP4OWmC-carousel .carousel-control-prev:hover,
#section-fqREP4OWmC-carousel .carousel-control-next:hover {
    opacity: 1;
}

/* Hero info section positioning */
.hero .info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 100%;
    text-align: center;
    color: white;
}

/* Ensure content appears immediately */
.index-page .about.section,
.index-page .projects.section {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Fix AOS animations on homepage */
.index-page [data-aos] {
    opacity: 1;
    transform: none;
    transition-delay: 0s;
}

/* Portfolio filters spacing */
.portfolio-filters {
    margin-bottom: 30px;
    justify-content: center;
}

.portfolio-filters li {
    margin: 0 10px 10px 10px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-filters li:hover,
.portfolio-filters li.filter-active {
    background: var(--accent-color);
    color: white;
}

/* Ensure images load properly */
.portfolio-content img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
}

/* Gallery spacing */
#covers-gallery {
    margin-bottom: 40px;
}

#gutter-guards {
    margin-top: 40px;
}

/* Responsive adjustments for homepage */
@media (max-width: 991px) {
    .index-page .container-fluid {
        padding: 0 20px;
    }

    .index-page .row {
        flex-direction: column;
        margin-top: 20px;
    }

    .index-page .col-lg-8,
    .index-page .col-lg-4 {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 30px;
    }

    /* Adjust hero height on mobile */
    #section-fqREP4OWmC-carousel,
    #section-fqREP4OWmC-carousel .carousel-item {
        height: 60vh;
        min-height: 400px;
    }
}

@media (max-width: 576px) {
    .portfolio-content img {
        height: 200px;
    }

    .portfolio-filters li {
        margin: 0 5px 10px 5px;
        padding: 6px 12px;
        font-size: 14px;
    }
}
/* Get Started section styling */
.get-started {
    padding: 80px 0;
    background-color: #ffffff;
}

.get-started .content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 20px;
}

.get-started .content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--default-color);
}

/* Section titles */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 20px;
    position: relative;
}

.section-title h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.section-title p {
    font-size: 1.1rem;
    color: color-mix(in srgb, var(--default-color), transparent 20%);
}

/* Portfolio info styling improvements */
.portfolio-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.portfolio-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.portfolio-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

/* Benefits section styling */
#benefits {
    background-color: #f8f9fa;
    padding: 80px 0;
}

#benefits ul {
    list-style: none;
    padding: 0;
}

#benefits ul li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 0;
}

#benefits ul li i {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Call to action section */
#cta {
    padding: 80px 0;
}

#cta h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--heading-color);
}

#cta p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--default-color);
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
    border-color: color-mix(in srgb, var(--accent-color), transparent 20%);
    transform: translateY(-2px);
}

/* Homepage specific contact form styling */
.index-page .contact-us-form {
    background: var(--background-color);
    border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.index-page .contact-us-form h3 {
    color: var(--heading-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .get-started {
        padding: 60px 0;
    }

    .get-started .content h3 {
        font-size: 2rem;
        text-align: center;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    #benefits,
    #cta {
        padding: 60px 0;
    }

    #cta h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .get-started .content h3 {
        font-size: 1.8rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .portfolio-info h4 {
        font-size: 1rem;
    }

    .portfolio-info p {
        font-size: 0.8rem;
    }
}