
/* ========================================
   MOBILE & RESPONSIVE FIXES
   ======================================== */

/* Prevent horizontal overflow globally */
html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Prevent images from stretching outside screen */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix Bootstrap row overflow */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ========================================
   NAVBAR FIXES
   ======================================== */

.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Better mobile tap spacing */
.navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
}

/* Mobile Navbar */
@media (max-width: 991.98px) {

    .navbar {
        position: relative;
    }

    /* FIXED navbar toggler */
    .navbar-toggler {
        margin-left: auto;
        border: none;
        box-shadow: none !important;
    }

    .navbar-collapse {
        margin-top: 1rem;
        background: #ffffff;
        padding: 1rem;
        border-radius: 1rem;
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.05);
    }

    .navbar-nav {
        margin-top: 0.5rem;
    }

    .nav-item {
        text-align: left;
    }

    /* Dropdown fixes */
    .dropdown-menu {
        border: none;
        background: transparent;
        padding-left: 1rem;
    }

    .dropdown-item {
        padding: 0.5rem 1rem;
        white-space: normal;
    }
}

/* ========================================
   HERO SECTION FIXES
   ======================================== */

.hero-section
.hero-header {
    padding: 2rem 0;
    min-height: auto;
}

/* Mobile Hero Fixes */
@media (max-width: 768px) {

    .hero-section .display-1,
    .hero-header .display-1,
    .hero-section .display-3,
    .hero-header h1 {

        font-size: 2rem !important;
        line-height: 1.2;
        word-break: break-word;
    }

    .hero-section .lead,
    .hero-header .lead {
        font-size: 1rem !important;
    }

    .hero-section .btn,
    .hero-header .btn {

        display: block;
        width: 100%;
        margin: 0.5rem 0 !important;
        text-align: center;
    }

    .hero-section .mt-4,
    .hero-header .mt-4 {

        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Fix breadcrumb alignment */
    .hero-section .text-end,
    .hero-header .text-end {

        text-align: center !important;
        margin-top: 1.5rem;
    }
}

/* ========================================
   BREADCRUMB FIXES
   ======================================== */

.breadcrumb {
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-bottom: 0;
    padding: 0.5rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
}

@media (max-width: 767.98px) {

    .breadcrumb {
        justify-content: center !important;
        margin-top: 1rem;
    }

    .breadcrumb-item {
        font-size: 0.85rem;
    }

    .breadcrumb-item a {
        display: inline-block;
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }
}

/* ========================================
   CONTAINER FIXES
   ======================================== */

/* SAFE mobile padding */
@media (max-width: 576px) {

    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}

/* ========================================
   BUTTONS & CARDS
   ======================================== */

.btn,
.incident-card,
.feature-card,
.service-card {

    max-width: 100%;
    word-break: break-word;
}

/* ========================================
   SERVICES GRID
   ======================================== */

.services-grid {
    padding: 0 0.5rem;
}

.services-grid .service-item {
    margin-bottom: 1rem;
}

/* ========================================
   TAGLINE SECTION
   ======================================== */

.fullscreen-tagline {

    margin: 2rem 0;
    padding: 2rem 1rem;
    text-align: center;
}

.fullscreen-tagline h2 {

    font-size: 1.8rem;
    word-break: break-word;
}

@media (max-width: 768px) {

    .fullscreen-tagline {

        padding: 2rem 1rem !important;
        margin: 2rem 0 !important;
    }

    .fullscreen-tagline h2 {

        font-size: 1.6rem !important;
        line-height: 1.3;
    }

    .fullscreen-tagline p {

        font-size: 1rem !important;
        padding: 0 0.5rem;
    }
}

@media (max-width: 576px) {

    .fullscreen-tagline h2 {
        font-size: 1.5rem;
    }
}

/* ========================================
   SECTION TITLE FIXES
   ======================================== */

@media (max-width: 768px) {

    .section-title,
    .text-center.mb-5,
    .services-section .text-center {

        text-align: center !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .section-title h1,
    .text-center.mb-5 h1,
    .services-section h1 {

        font-size: 1.8rem !important;
        word-break: break-word;
    }

    .section-title .text-uppercase,
    .services-section .text-primary {

        display: inline-block;
        white-space: normal;
    }
}

/* ========================================
   FORM SPACING
   ======================================== */

@media (max-width: 768px) {

    .bg-primary.p-5,
    .bg-light.p-5 {

        padding: 1.5rem !important;
    }

    .row.g-5 {
        --bs-gutter-y: 1.5rem;
    }
}

