/* ===============================================================
   MyKennel public / pre-login pages - responsive additions
   Load AFTER Bootstrap 5 and assets/css/style-fresh.css.
   This is NOT the dashboard mobile stylesheet.
   Initial page reviewed: login.aspx. Other public-page rules can
   be appended here as their markup is supplied.
   =============================================================== */

@media (max-width: 991.98px) {
    /* Header: compact top strip and a single horizontal logo/menu row */
    .topbar {
        padding: 8px 0 !important;
    }

        .topbar .topbar-wrapper {
            gap: 10px !important;
            flex-wrap: nowrap !important;
        }

        .topbar .top-contact {
            display: flex;
            align-items: center;
            gap: 9px;
            min-width: 0;
        }

            .topbar .top-contact h5 {
                margin: 0 0 2px;
                font-size: 14px;
                line-height: 1.25;
            }

            .topbar .top-contact p {
                margin: 0;
                font-size: 10px;
                line-height: 1.35;
            }

        .topbar .top-user-area {
            flex-shrink: 0;
        }

        .topbar .login-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            white-space: nowrap;
            padding: 9px 12px;
            font-size: 11px;
        }

    .navbar.navbar-expand-lg {
        min-height: 0;
        margin-bottom: 0;
        padding: 10px 0 !important;
    }

    .navbar .container-fluid {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .navbar .brand-logo {
        display: inline-flex;
        align-items: center;
        max-width: calc(100vw - 100px);
    }

        .navbar .brand-logo img {
            display: block;
            height: auto;
            max-height: 48px;
            max-width: min(205px, 100%);
            object-fit: contain;
        }

    .navbar .navbar-toggler {
        margin-left: auto;
        padding: 7px 10px;
        width: 43px;
        height: 40px;
        box-shadow: none;
    }

    .navbar #mainMenu {
        flex-basis: 100%;
        width: 100%;
    }

        .navbar #mainMenu.show, .navbar #mainMenu.collapsing {
            margin-top: 8px;
        }

        .navbar #mainMenu .navbar-nav {
            align-items: stretch;
        }

        .navbar #mainMenu .nav-link {
            padding: 11px 12px;
            font-size: 14px;
        }

    /* Login: remove excessively tall empty hero and keep panels together */
    .login-hero:empty {
        display: none !important;
    }

    .login-section {
        padding: 22px 0 34px !important;
    }

        .login-section > .container {
            width: 100%;
            max-width: 720px;
            padding-left: 15px;
            padding-right: 15px;
        }

    .login-wrapper {
        max-width: 100%;
        margin: 0 auto;
        overflow: hidden;
        border-radius: 16px;
    }

    .login-left-panel {
        height: auto !important;
        min-height: 0 !important;
        padding: 23px 22px !important;
    }

    .login-left-title {
        font-size: 23px;
        line-height: 1.25;
        margin-bottom: 10px;
    }

    .login-left-text {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    .login-feature-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 0;
        margin: 0;
        list-style: none;
    }

        .login-feature-list li {
            display: flex;
            align-items: center;
            gap: 7px;
            min-width: 0;
            margin: 0;
            font-size: 12px;
            line-height: 1.4;
        }

    .login-feature-icon {
        flex: 0 0 auto;
    }

    .login-form-panel {
        height: auto !important;
        min-height: 0 !important;
        padding: 25px 22px 28px !important;
    }

    .login-form-title {
        font-size: clamp(22px, 4vw, 28px);
        line-height: 1.25;
        margin-bottom: 9px;
    }

    .login-form-text {
        font-size: 14px;
        line-height: 1.55;
        margin-bottom: 20px;
    }

    .login-form-group {
        margin-bottom: 16px;
    }

    .login-select, .login-input, .login-forgot-input {
        box-sizing: border-box;
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        font-size: 16px !important;
    }

    .login-input-wrapper {
        min-width: 0;
        max-width: 100%;
    }

    .login-submit-btn {
        display: block;
        width: 100%;
        max-width: 100%;
        min-height: 46px;
    }

    .login-form-options {
        display: flex;
        flex-wrap: wrap;
        gap: 9px 16px;
        align-items: center;
        justify-content: space-between;
    }

    /* Footer: readable mobile columns, no huge vertical gaps */
    .footer {
        padding-top: 28px !important;
        padding-bottom: 25px !important;
    }

        .footer .container {
            max-width: 720px;
        }

        .footer .row {
            --bs-gutter-y: 22px;
        }

        .footer h5 {
            margin-bottom: 12px;
        }

        .footer p, .footer li, .footer a {
            line-height: 1.6;
            overflow-wrap: anywhere;
        }

        .footer ul {
            margin-bottom: 0;
            padding-left: 0;
        }

        .footer .social-links {
            display: flex;
            flex-wrap: wrap;
            gap: 9px;
        }

    /* Forgot-password modal must fit the phone viewport. */
    .login-forgot-modal .modal-dialog {
        margin: 12px;
        max-width: calc(100% - 24px);
    }

    .login-forgot-modal .modal-body {
        padding: 18px;
    }
}

@media (max-width: 575.98px) {
    .topbar .topbar-wrapper {
        flex-direction: column;
        align-items: stretch !important;
        gap: 7px !important;
    }

        .topbar .topbar-wrapper > div:first-child {
            justify-content: center;
        }

    .topbar .top-contact {
        justify-content: center;
        text-align: left;
    }

    .topbar .top-user-area {
        width: 100%;
    }

    .topbar .login-btn {
        width: 100%;
        min-height: 36px;
        font-size: 12px;
    }

    .navbar .brand-logo img {
        max-height: 42px;
        max-width: 182px;
    }

    .login-section {
        padding-top: 15px !important;
    }

    .login-left-panel {
        padding: 20px 18px !important;
    }

    .login-left-title {
        font-size: 21px;
    }

    .login-feature-list {
        gap: 11px 8px;
    }

        .login-feature-list li {
            font-size: 11px;
        }

    .login-form-panel {
        padding: 23px 18px 25px !important;
    }

    .login-form-title {
        font-size: 23px;
    }

    .login-form-options {
        align-items: flex-start;
    }

    .footer .row {
        --bs-gutter-y: 19px;
    }

    .footer .col-lg-3 {
        text-align: left;
    }
}

@media (max-width: 359.98px) {
    .login-feature-list {
        grid-template-columns: 1fr;
    }

    .navbar .brand-logo img {
        max-width: 160px;
    }
}

/* ===============================================================
   PUBLIC CONTACT PAGE — contact-us.aspx
   Scoped to .contact-hero / .contact-section so login and other
   public page layouts are unaffected.
   =============================================================== */
@media (max-width: 991.98px) {
    .contact-hero {
        min-height: 0 !important;
        height: auto !important;
        padding: 42px 0 !important;
        background-size: cover;
        background-position: center;
    }

        .contact-hero .container,
        .contact-section > .container {
            width: 100%;
            max-width: 720px;
            padding-inline: 16px;
        }

    .contact-hero-content {
        width: 100%;
        max-width: 560px;
        margin: 0;
        padding: 0;
    }

    .contact-title {
        font-size: clamp(26px, 5vw, 38px) !important;
        line-height: 1.18 !important;
        margin-bottom: 14px;
        overflow-wrap: normal;
    }

    .contact-subtitle {
        font-size: 15px !important;
        line-height: 1.65 !important;
        margin-bottom: 20px;
    }

    .contact-hero-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 43px;
        padding: 10px 21px;
    }

    .contact-section {
        padding: 26px 0 44px !important;
    }

        .contact-section .row.g-4 {
            --bs-gutter-x: 0;
            --bs-gutter-y: 18px;
        }

        .contact-section .col-lg-7,
        .contact-section .col-lg-5 {
            min-width: 0;
        }

    .contact-box {
        width: 100%;
        min-width: 0;
        height: auto !important;
        padding: 25px 22px !important;
        border-radius: 16px;
    }

    .contact-section-title {
        font-size: clamp(23px, 4vw, 30px) !important;
        line-height: 1.25 !important;
        margin-bottom: 10px;
    }

    .contact-section-text {
        font-size: 14px !important;
        line-height: 1.65 !important;
        margin-bottom: 20px;
    }

    .contact-form-group {
        margin-bottom: 15px !important;
    }

    .contact-input, .contact-textarea {
        display: block;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        font-size: 16px !important;
        line-height: 1.4;
        border-radius: 10px;
    }

    .contact-input {
        min-height: 48px !important;
        padding: 11px 14px !important;
    }

    .contact-textarea {
        min-height: 135px !important;
        padding: 12px 14px !important;
        resize: vertical;
    }

    .contact-submit-btn {
        display: block;
        width: 100%;
        min-height: 48px;
        padding: 12px 16px !important;
        text-align: center;
        border-radius: 10px;
    }

    .contact-info-list {
        min-width: 0;
    }

    .contact-info-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        min-width: 0;
        margin-bottom: 17px;
    }

    .contact-info-icon {
        flex-shrink: 0;
    }

    .contact-info-content {
        flex: 1 1 0;
        min-width: 0;
    }

        .contact-info-content h5 {
            font-size: 15px;
            line-height: 1.35;
            margin-bottom: 4px;
        }

        .contact-info-content p {
            font-size: 13px;
            line-height: 1.6;
            overflow-wrap: anywhere;
            word-break: normal;
            margin-bottom: 0;
        }
    /* reCAPTCHA v2 has a fixed 304px widget width; allow scrolling
     on very narrow phones rather than shrinking its iframe. */
    .contact-section .g-recaptcha {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .contact-section #msg {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 575.98px) {
    .contact-hero {
        padding: 32px 0 34px !important;
    }

        .contact-hero .container,
        .contact-section > .container {
            padding-inline: 14px;
        }

    .contact-title {
        font-size: 27px !important;
    }

    .contact-subtitle {
        font-size: 14px !important;
    }

    .contact-section {
        padding-top: 18px !important;
        padding-bottom: 35px !important;
    }

    .contact-box {
        padding: 20px 17px !important;
    }

    .contact-section-title {
        font-size: 23px !important;
    }

    .contact-section-text {
        margin-bottom: 16px;
    }

    .contact-form-group {
        margin-bottom: 12px !important;
    }

    .contact-info-item {
        gap: 10px;
        margin-bottom: 15px;
    }

    .contact-info-icon {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================================
   MYKENNEL PUBLIC HOME PAGE - MOBILE RESPONSIVE RULES
   Add after shared Login / Contact overrides in mobile-fixes.css.
   Scope selectors to homepage-specific sections and card names.
   ============================================================ */
@media (max-width: 991.98px) {
    /* Keep every homepage section inside the visible viewport. */
    .home-hero, .homepage-hero, .hero-section, .hero-slider,
    .home-services, .services-section, .home-features,
    .how-it-works, .why-choose-us, .testimonials-section,
    .testimonial-section, .home-stats, .stats-section {
        max-width: 100%;
        min-width: 0;
    }

        .home-hero .container, .homepage-hero .container,
        .home-services .container, .services-section .container,
        .home-features .container, .how-it-works .container,
        .why-choose-us .container, .testimonials-section .container,
        .testimonial-section .container, .home-stats .container,
        .stats-section .container {
            width: 100%;
            max-width: 720px;
            padding-left: 16px;
            padding-right: 16px;
        }
        /* Homepage banners/carousels: resize images rather than creating large dead areas. */
        .home-hero img, .homepage-hero img, .hero-slider img,
        .hero-section img, .carousel-inner img, .banner-slider img {
            max-width: 100%;
            height: auto;
            object-fit: cover;
        }

        .home-hero, .homepage-hero, .hero-section,
        .home-hero .carousel-item, .homepage-hero .carousel-item,
        .hero-slider .carousel-item, .banner-slider .carousel-item {
            min-height: 0 !important;
        }

            .home-hero h1, .homepage-hero h1, .hero-section h1,
            .home-hero h2, .homepage-hero h2, .hero-section h2 {
                font-size: clamp(24px, 4.5vw, 38px) !important;
                line-height: 1.2 !important;
                letter-spacing: -.025em;
            }

            .home-hero p, .homepage-hero p, .hero-section p {
                font-size: 14px !important;
                line-height: 1.55 !important;
            }
        /* Counters as two per row on phones, four per row on larger screens. */
        .home-stats .row, .stats-section .row,
        .counter-section .row, .statistics-section .row {
            --bs-gutter-x: 12px;
            --bs-gutter-y: 12px;
        }

        .home-stats [class*="col-"], .stats-section [class*="col-"],
        .counter-section [class*="col-"], .statistics-section [class*="col-"] {
            min-width: 0;
        }
        /* Service blocks and graphics should not have fixed desktop heights. */
        .home-services .card, .services-section .card,
        .home-features .card, .services-section .service-card,
        .home-services .service-card, .service-box, .feature-card,
        .home-services .service-item, .services-section .service-item {
            min-width: 0;
            max-width: 100%;
            height: auto !important;
            min-height: 0 !important;
        }

            .home-services img, .services-section img, .service-card img,
            .service-box img, .feature-card img {
                display: block;
                max-width: 100%;
                height: auto;
                object-fit: contain;
            }

        .home-services h2, .services-section h2, .home-features h2,
        .why-choose-us h2, .how-it-works h2,
        .testimonials-section h2, .testimonial-section h2 {
            font-size: clamp(22px, 4vw, 30px) !important;
            line-height: 1.25 !important;
        }

        .home-services h3, .services-section h3, .home-features h3,
        .service-card h3, .service-box h3, .feature-card h3 {
            font-size: 18px !important;
            line-height: 1.3 !important;
        }

        .home-services p, .services-section p, .home-features p,
        .how-it-works p, .why-choose-us p, .testimonial-section p {
            font-size: 14px;
            line-height: 1.6;
        }
}

@media (max-width: 575.98px) {
    /* Compact vertical rhythm for the public homepage. */
    .home-services, .services-section, .home-features,
    .how-it-works, .why-choose-us, .testimonials-section,
    .testimonial-section, .home-stats, .stats-section,
    .counter-section, .statistics-section {
        padding-top: 25px !important;
        padding-bottom: 25px !important;
    }

        .home-services .container, .services-section .container,
        .home-features .container, .how-it-works .container,
        .why-choose-us .container, .testimonials-section .container,
        .home-stats .container, .stats-section .container {
            padding-left: 15px;
            padding-right: 15px;
        }

    .home-hero h1, .homepage-hero h1, .hero-section h1,
    .home-hero h2, .homepage-hero h2, .hero-section h2 {
        font-size: 25px !important;
    }
    /* Homepage carousel nav: don't let oversized arrows cover content. */
    .home-hero .carousel-control-prev,
    .home-hero .carousel-control-next,
    .hero-slider .carousel-control-prev,
    .hero-slider .carousel-control-next,
    .homepage-hero .carousel-control-prev,
    .homepage-hero .carousel-control-next {
        width: 9%;
    }

    .home-stats [class*="col-"], .stats-section [class*="col-"],
    .counter-section [class*="col-"], .statistics-section [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .home-stats h2, .stats-section h2,
    .home-stats h3, .stats-section h3,
    .counter-section h3, .statistics-section h3 {
        font-size: 22px !important;
        line-height: 1.2 !important;
    }

    .home-stats p, .stats-section p, .counter-section p,
    .statistics-section p {
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    .home-services .card, .services-section .card,
    .home-features .card, .service-card, .service-box,
    .feature-card, .home-services .service-item,
    .services-section .service-item {
        padding: 18px !important;
        border-radius: 14px;
        margin-bottom: 12px;
    }

        .service-card img, .service-box img, .feature-card img {
            max-height: 190px;
            margin-left: auto;
            margin-right: auto;
        }

    .home-services h2, .services-section h2, .home-features h2,
    .why-choose-us h2, .how-it-works h2,
    .testimonial-section h2, .testimonials-section h2 {
        font-size: 23px !important;
        margin-bottom: 12px;
    }

    .home-services h3, .services-section h3, .service-card h3,
    .service-box h3, .feature-card h3 {
        font-size: 17px !important;
    }

    .home-services p, .services-section p, .home-features p,
    .why-choose-us p, .how-it-works p {
        font-size: 13px !important;
    }

    .home-services .btn, .services-section .btn,
    .how-it-works .btn, .testimonial-section .btn,
    .home-hero .btn, .homepage-hero .btn {
        min-height: 42px;
        font-size: 13px;
        padding: 10px 16px;
    }
}
