/* ========================================
   KORYDEX IoT - CRITICAL OVERFLOW FIXES
   ======================================== */

/* GLOBAL OVERFLOW PREVENTION - ULTRA STRONG */
* {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  -webkit-hyphens: auto !important;
  -moz-hyphens: auto !important;
  -ms-hyphens: auto !important;
  hyphens: auto !important;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* Hide scrollbar but keep scroll functionality */
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

body {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.container {
  max-width: 1140px !important;
  width: 100% !important;
  padding-right: 15px !important;
  padding-left: 15px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

.row {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* Prevent all images from causing overflow */
img {
  max-width: 100% !important;
  height: auto !important;
}

/* ========================================
   ABOUT SECTION - FEATURE BOX HEIGHT FIX
   ======================================== */

.about-features {
  min-height: 80px !important;
  height: 80px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 15px 20px !important;
  margin-bottom: 20px !important;
}

.about-features p {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  max-width: 70% !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

.about-features span {
  flex-shrink: 0 !important;
  width: 50px !important;
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.about-features span i {
  font-size: 24px !important;
}

/* About Feature Cards - New Design */
.about-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    min-height: 140px;
}

.about-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(190, 47, 41, 0.15);
}

.about-feature-card .feature-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF6B35 0%, #BE2F29 100%);
    border-radius: 10px;
    color: #fff;
}

.about-feature-card .feature-icon i {
    font-size: 28px;
}

.about-feature-card .feature-content {
    flex: 1;
}

.about-feature-card .feature-content h5 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.4;
}

.about-feature-card .feature-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
    line-height: 1.6;
}

/* ========================================
   TESTIMONIAL SECTION - TEXT OVERFLOW FIX
   ======================================== */

.testimonial-slide-content {
  overflow: hidden !important;
  max-width: 100% !important;
}

.testimonial-slide-content p {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  max-height: 120px !important;
  line-height: 1.6 !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
}

.single-testimonial {
  overflow: hidden !important;
  max-width: 100% !important;
  padding: 20px !important;
}

/* Move testimonial content upward inside cards */
.single-testimonial {
  padding-top: 20px !important;
}

.estimonial-top-quote {
  margin-top: -10px !important;
  margin-bottom: 5px !important;
}

.testimonial-slide-content {
  padding-top: 0 !important;
  margin-top: -5px !important;
}

.testimonial-slide-content img {
  margin-top: 5px !important;
  margin-bottom: 10px !important;
}

/* ========================================
   PORTFOLIO SECTION - GRID LAYOUT
   ======================================== */

.work-mixi {
  overflow: hidden !important;
}

.single-project-wrap {
  overflow: hidden !important;
  margin-bottom: 30px !important;
}

.single-project {
  overflow: hidden !important;
  position: relative !important;
}

.single-project img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: cover !important;
}

.poroject-content {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.poroject-content h5,
.poroject-content h5 a {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}

/* ========================================
   HERO SECTION - OVERFLOW PREVENTION
   ======================================== */

.hero-content {
  overflow: hidden !important;
  max-width: 100% !important;
}

.hero-content h1,
.hero-content h6,
.hero-content p {
  overflow: hidden !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  max-width: 100% !important;
}

/* ========================================
   SERVICE SLIDES - CONTENT OVERFLOW FIX
   ======================================== */

.service-content {
  overflow: hidden !important;
  max-width: 100% !important;
}

.service-content h4,
.service-content p {
  overflow: hidden !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  max-width: 100% !important;
}

.single-service-slide {
  overflow: hidden !important;
  padding: 30px 20px !important;
}

/* ========================================
   PRICING SECTION - OVERFLOW FIX
   ======================================== */

.pricing-area {
  padding-bottom: 80px;
  overflow: visible !important;
}

.price-content-wrap {
  margin-bottom: 30px;
  overflow: visible !important;
}

.price-content-box {
  overflow: visible !important;
  min-height: 550px;
  display: flex;
  flex-direction: column;
}

.price-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.price-list ul {
  margin-bottom: 20px;
}

/* Ensure pricing cards are fully visible */
.price-line {
  overflow: visible !important;
  margin-bottom: 30px;
}

/* ========================================
   TEAM SECTION - OVERFLOW FIX
   ======================================== */

.team-content {
  overflow: hidden !important;
  max-width: 100% !important;
}

.team-content h5,
.team-content h6,
.team-content p {
  overflow: hidden !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  max-width: 100% !important;
}

/* ========================================
   BLOG SECTION - OVERFLOW FIX
   ======================================== */

.blog-content {
  overflow: hidden !important;
  max-width: 100% !important;
}

.blog-content h4,
.blog-content h4 a {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

/* ========================================
   FOOTER SECTION - OVERFLOW FIX
   ======================================== */

.footer-wrap {
  overflow: hidden !important;
  max-width: 100% !important;
}

.footer-address,
.footer-link ul li a {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  max-width: 100% !important;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

@media (max-width: 768px) {
  .about-features {
    min-height: 70px !important;
    height: auto !important;
    padding: 12px 15px !important;
  }

  .about-features p {
    font-size: 14px !important;
  }

  .testimonial-slide-content p {
    font-size: 14px !important;
    -webkit-line-clamp: 3 !important;
    max-height: 90px !important;
  }
}

@media (max-width: 576px) {
  .about-features {
    flex-direction: row !important;
    height: auto !important;
    min-height: 60px !important;
  }

  .about-features p {
    font-size: 13px !important;
    max-width: 65% !important;
  }

  .about-features span {
    width: 40px !important;
    height: 40px !important;
  }

  .about-features span i {
    font-size: 20px !important;
  }
}

/* Ensure consistent font sizes across languages */
.section-title h3,
.section-title h3[data-i18n] {
    font-size: 36px !important;
    line-height: 1.3 !important;
}

.section-title p,
.section-title p[data-i18n] {
    font-size: 14px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .about-feature-card {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .about-feature-card .feature-icon {
        margin: 0 auto;
    }

    .section-title h3 {
        font-size: 28px !important;
    }
}

@media (max-width: 576px) {
    .section-title h3 {
        font-size: 24px !important;
    }
}

/* ========================================
   ITALIAN LANGUAGE SPECIFIC FIXES
   ======================================== */

/* Italian language text wrapping */
html[lang="it"] * {
  -webkit-hyphens: auto !important;
  -moz-hyphens: auto !important;
  hyphens: auto !important;
  word-break: break-word !important;
}

/* ========================================
   FORCE SAME FONT SIZE - English and Italian IDENTICAL
   ======================================== */

/* Hero section - main title */
.hero-area .hero-content-wrap .hero-content h1 {
  font-size: 46px !important;
  line-height: 62px !important;
}

/* Hero section - subtitle */
.hero-area .hero-content-wrap .hero-content h6 {
  font-size: 20px !important;
}

/* Section titles */
.section-title h3 {
  font-size: 36px !important;
  line-height: 1.3 !important;
}

.section-title p {
  font-size: 14px !important;
}

/* Italian language - SAME SIZE AS ENGLISH */
html[lang="it"] .hero-area .hero-content-wrap .hero-content h1 {
  font-size: 46px !important;
  line-height: 62px !important;
}

html[lang="it"] .hero-area .hero-content-wrap .hero-content h6 {
  font-size: 20px !important;
}

html[lang="it"] .section-title h3 {
  font-size: 36px !important;
  line-height: 1.3 !important;
}

html[lang="it"] .section-title p {
  font-size: 14px !important;
}

/* ========================================
   PRICING CARDS - FIX OVERFLOW ISSUE
   ======================================== */

/* Ensure pricing cards are fully visible without cutoff */
.pricing-area {
  padding-bottom: 60px;
}

.price-content-wrap {
  margin-bottom: 30px;
}

.price-line {
  margin-bottom: 30px;
}

/* ========================================
   TESTIMONIAL AREA - INCREASE HEIGHT
   ======================================== */

/* Simply increase padding to show full testimonial cards */
.testimonial-area {
  padding: 140px 0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .price-content-box {
    min-height: auto;
  }

  .testimonial-area {
    padding: 100px 0 !important;
  }
}

.mb-30 { margin-bottom: 30px; }

/* ========================================
   HIDE ALL SCROLLBARS GLOBALLY
   ======================================== */
   
/* Hide all scrollbars but keep scroll functionality */
* {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE and Edge */
}

*::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari, Opera */
  width: 0 !important;
  height: 0 !important;
}

/* Ensure sections have enough height to avoid internal scrolling */
.hero-area,
.service-area,
.about-area,
.testimonial-area,
.pricing-area,
.team-area,
.blog-area,
.prtfolio-area {
  overflow: visible !important;
  height: auto !important;
  min-height: auto !important;
}

/* Remove any fixed heights that might cause scrollbars */
.row,
.container,
.col-xl-12,
.col-lg-12 {
  height: auto !important;
  overflow: visible !important;
}
