/* Responsive Enhancements for All Devices */

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
}

/* Flexible containers */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* Touch-friendly primary controls (do not force every inline link to 44×44) */
@media (max-width: 767px) {
    button:not(.meanmenu-reveal),
    .btn,
    input[type="submit"],
    input[type="button"],
    .default-btn-one,
    .default-btn-two,
    .portal-btn,
    .cookie-consent button,
    .footer-enterprise-search-btn {
        min-height: 44px;
    }
    .top-header .right-info .heder-btn > a,
    .top-header .right-info .sign-in-btn > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 14px;
    }
}

/* Improve table responsiveness */
@media (max-width: 767px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Ensure video embeds are responsive */
iframe, embed, object, video {
    max-width: 100%;
}

/* Fix for very small devices (320px) */
@media (max-width: 374px) {
    .section-title h2 {
        font-size: 22px !important;
    }
    
    .hero-slider .hero-slider-item .slider-content h1 {
        font-size: 22px !important;
    }
    
    .default-btn-one, .default-btn-two {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
}

/* Tablet landscape optimization (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Large desktop optimization (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
}

/* =============================================================================
   Layout: alignment, cards, and sections across viewports
   ============================================================================= */

html {
    -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Bootstrap 5: restore zero gutter rows used by theme markup (e.g. law-card strip) */
.row.no-gutters {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    margin-left: 0;
    margin-right: 0;
}
.row.no-gutters > [class*="col"] {
    padding-left: 0;
    padding-right: 0;
}

.card-contant {
    width: 100%;
    max-width: 100%;
}

/* Law card strip: equal-height cells, no horizontal overflow */
.law-card-area .card-contant .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.law-card-area .card-contant .row > [class*="col"] {
    display: flex;
    min-width: 0;
}
.law-card-area .low-card {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100%;
}
.law-card-area .low-card p {
    flex: 1 1 auto;
    max-width: 100%;
}

/* Service grid: prevent flex children from overflowing */
.service-area .row > [class*="col"],
.blog-area .row > [class*="col"],
.attorney-area .row > [class*="col"] {
    min-width: 0;
}
.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.service-card > a:first-child {
    display: block;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
}
.service-card a img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
}
.service-card .service-text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}
.service-card .service-text p {
    flex: 1 1 auto;
}

/* Headings and hero copy: wrap long words */
.section-title h2,
.section-title p,
.page-content h2,
.hero-slider .hero-slider-item .slider-content h1,
.hero-slider .hero-slider-item .slider-content p {
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.hero-slider .hero-slider-item .slider-content {
    width: 100%;
    max-width: min(600px, 100%);
}

@media (max-width: 767px) {
    .hero-slider .hero-slider-item .slider-content {
        max-width: 100%;
    }
    .slider-btn {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .slider-btn .default-btn-one,
    .slider-btn .default-btn-two {
        width: 100%;
        text-align: center;
    }
}

/* About page choose cards: avoid cramped text beside icon on phones */
@media (max-width: 575px) {
    .choose-area.about-page-area .choose-card {
        padding-left: 0;
        padding-top: 86px;
        text-align: center;
    }
    .choose-area.about-page-area .choose-card i {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

/* Fun fact cards: reduce horizontal padding on small screens */
@media (max-width: 767px) {
    .signle-fun-fact {
        padding: 28px 20px;
    }
}

/* Top header: flex wrap for icons + CTAs on narrow widths */
.top-header .right-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px 10px;
}
@media (max-width: 767px) {
    .top-header .right-info {
        justify-content: center;
        margin-top: 6px;
    }
}
.top-header .row > [class*="col"] {
    min-width: 0;
}

/* Enterprise footer: ribbon social row centered on tablet/mobile */
@media (max-width: 991px) {
    .footer-enterprise-social {
        justify-content: center;
    }
}

/* Enterprise footer: balanced alignment on small screens */
@media (max-width: 575.98px) {
    .footer-enterprise-brand {
        text-align: center;
    }
    .footer-enterprise-logo-link {
        display: inline-block;
    }
    .footer-enterprise-tagline {
        margin-left: auto;
        margin-right: auto;
    }
    .footer-enterprise-col-title,
    .footer-enterprise-links,
    .footer-enterprise-contact {
        text-align: center;
    }
    .footer-enterprise-links a {
        display: inline-block;
    }
    .footer-enterprise-social {
        justify-content: center;
        width: 100%;
    }
    .footer-enterprise-ribbon-inner {
        align-items: center;
    }
    .footer-enterprise-search {
        width: 100%;
        max-width: 100%;
    }
}

/* Safe area + gutter on notched phones */
@media (max-width: 575px) {
    .container {
        padding-left: max(12px, env(safe-area-inset-left, 0px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
    }
}

/* Tables inside content areas */
.table-responsive,
.services-details-area .services-details,
.case-details-tab {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
