/* ========================================
   ADDITIONAL RESPONSIVE FIXES
   For all screen sizes to prevent breaking
   ======================================== */

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Fix container overflow issues */
.container,
.container-fluid {
    overflow-x: hidden;
}

/* Ensure rows don't overflow */
.row {
    margin-left: -15px;
    margin-right: -15px;
}

[class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* ========================================
   HERO SECTION FIXES
   ======================================== */

/* Prevent hero images from breaking layout */
.ed-hero-section {
    overflow: hidden;
    position: relative;
}

.ed-right-items {
    max-width: 100%;
    overflow: hidden;
}

.ed-hero-image,
.ed-hero-imag-2 {
    max-width: 100%;
}

.ed-hero-image img,
.ed-hero-imag-2 img {
    max-width: 100%;
    height: auto;
}

/* Fix floating elements */
.client-counter-box,
.counter-box {
    max-width: 100%;
}

/* Hero shapes positioning */
.hero-shape-1,
.hero-shape-2,
.hero-shape-3,
.hero-shape-4,
.hero-shape-5 {
    max-width: 120px;
}

@media (min-width: 1600px) {

    .hero-shape-1,
    .hero-shape-2,
    .hero-shape-3,
    .hero-shape-4,
    .hero-shape-5 {
        max-width: 150px;
    }
}

/* ========================================
   ABOUT SECTION FIXES
   ======================================== */

.ed-about-section {
    overflow: hidden;
}

.ed-about-image {
    position: relative;
    max-width: 100%;
}

.ed-about-image img {
    max-width: 100%;
    height: auto;
}

.ed-about-image-2,
.ed-about-image-3 {
    max-width: 200px;
}

.ed-about-image-2 img,
.ed-about-image-3 img {
    max-width: 100%;
    height: auto;
}

/* Counter area responsive */
.ed-counter-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.ed-counter-item {
    flex: 1;
    min-width: 150px;
}

/* ========================================
   COURSES SECTION FIXES
   ======================================== */

.ed-courses-section {
    overflow: hidden;
}

.ed-courses-box-items {
    max-width: 100%;
    margin-bottom: 30px;
}

.ed-courses-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.ed-courses-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

@media (min-width: 1600px) {
    .ed-courses-image img {
        height: 280px;
    }
}

.ed-courses-box-items:hover .ed-courses-image img {
    transform: scale(1.05);
}

/* ========================================
   WHY CHOOSE US SECTION FIXES
   ======================================== */

.ed-why-choose-us-section {
    overflow: hidden;
}

.ed-choose-image {
    position: relative;
    max-width: 100%;
}

.ed-choose-image img {
    max-width: 100%;
    height: auto;
}

.ed-choose-image-2,
.ed-choose-image-3 {
    max-width: 180px;
}

.ed-counter-item.float-bob-x {
    max-width: 250px;
}

/* Icon items responsive */
.ed-choose-icon {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ed-icon-items {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.ed-icon-items .icon {
    flex-shrink: 0;
}

.ed-icon-items .content {
    flex: 1;
}

/* ========================================
   TESTIMONIAL SECTION FIXES
   ======================================== */

.ed-testimonial-section {
    overflow: hidden;
}

.ed-testimonial-box-items {
    max-width: 100%;
    padding: 40px;
}

@media (min-width: 1600px) {
    .ed-testimonial-box-items {
        padding: 50px;
    }
}

.ed-testimonial-box-items h4 {
    font-size: 18px;
    line-height: 32px;
}

@media (min-width: 1600px) {
    .ed-testimonial-box-items h4 {
        font-size: 22px;
        line-height: 38px;
    }
}

/* Client info responsive */
.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.client-image {
    flex-shrink: 0;
}

.client-image img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   BLOG/NEWS SECTION FIXES
   ======================================== */

.ed-news-section1 {
    overflow: hidden;
}

.ed-news-box-items {
    max-width: 100%;
}

.ed-news-box-items .ed-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.ed-news-box-items .ed-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ed-news-box-items:hover .ed-image img {
    transform: scale(1.05);
}

/* ========================================
   DISCOUNT/CTA SECTION FIXES
   ======================================== */

.ed-discount-section {
    overflow: hidden;
}

.discount-box-items {
    max-width: 100%;
    padding: 60px 40px;
    text-align: center;
}

@media (min-width: 1600px) {
    .discount-box-items {
        padding: 80px 100px;
    }
}

.discount-box-items h2 {
    font-size: 40px;
    line-height: 1.3;
}

@media (min-width: 1600px) {
    .discount-box-items h2 {
        font-size: 60px;
    }
}

.btn-box {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   SWIPER SLIDER FIXES
   ======================================== */

.swiper {
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
}

/* Array buttons */
.array-button {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.array-prev,
.array-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ========================================
   FOOTER FIXES
   ======================================== */

.footer-section {
    overflow: hidden;
}

.footer-widgets-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

@media (min-width: 1600px) {
    .footer-widgets-wrapper {
        gap: 60px;
    }
}

/* ========================================
   GENERAL UTILITY FIXES
   ======================================== */

/* Ensure text doesn't overflow */
h1,
h2,
h3,
h4,
h5,
h6,
p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fix aspect ratios for all images */
.ed-image img,
.ed-courses-image img,
.ed-news-box-items img {
    object-fit: cover;
}

/* Ensure buttons are responsive */
.theme-btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Fix grid gaps */
.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

@media (min-width: 1600px) {
    .g-4 {
        --bs-gutter-x: 2rem;
        --bs-gutter-y: 2rem;
    }
}

/* Prevent content from being too wide */
@media (min-width: 1920px) {
    .section-title h2 {
        max-width: 800px;
    }

    .ed-hero-content h1 {
        max-width: 700px;
    }

    .ed-hero-content p {
        max-width: 600px;
    }
}

/* Fix floating animations on large screens */
@media (min-width: 1600px) {

    .float-bob-x,
    .float-bob-y {
        animation-duration: 3s;
    }
}