/**
 * Ablaze Electronics - Centralized Responsive & Shared Component Stylesheet
 * Unifies mobile typography, shared form elements, hero sections, grids, and components.
 */

/* ---------------------------------------------
   1. Shared Form & Interactive Controls
   --------------------------------------------- */
.form-group label {
    font-size: 14px;
    font-weight: 700;
    color: #1a0850;
    margin-bottom: 6px;
    font-family: var(--font-heading), 'Oswald', sans-serif;
}

.form-control-custom {
    width: 100%;
    height: 50px;
    padding: 12px 18px;
    font-size: 16px; /* 16px prevents iOS safari auto-zoom on input focus */
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    background: #ffffff;
    border-color: #1a0850;
    box-shadow: 0 0 0 3px rgba(26, 8, 80, 0.12);
    outline: none;
}

textarea.form-control-custom {
    height: auto;
    min-height: 140px;
    line-height: 1.6;
    resize: vertical;
    padding-top: 14px;
    padding-bottom: 14px;
}

/* ---------------------------------------------
   2. Global Mobile Safety & Fluid Foundations
   --------------------------------------------- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

img, iframe, video {
    max-width: 100%;
}

/* Universal Hero Breadcrumb Wrapping */
.hero-breadcrumb-bar {
    flex-wrap: wrap;
    row-gap: 6px;
}

/* ---------------------------------------------
   3. Tablet Breakpoint (max-width: 991.98px)
   --------------------------------------------- */
@media (max-width: 991.98px) {
    /* Offset body content so it is not obscured by fixed mobile navbar */
    body {
        padding-top: 62px !important;
    }

    #site-header {
        position: static !important;
    }

    /* Fixed Navbar on Mobile Devices */
    #nav,
    #nav.nav-sticky {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 2px solid var(--color-primary) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
        z-index: 9999 !important;
        transition: all 0.3s ease;
    }

    #nav .navbar,
    #nav.nav-sticky .navbar {
        background: transparent !important;
        padding: 8px 16px;
        transition: none;
    }

    #nav .navbar .navbar-brand img,
    #nav.nav-sticky .navbar .navbar-brand img {
        max-height: 44px;
        transition: none;
    }

    #nav .navbar-toggler {
        border-color: rgba(26, 8, 80, 0.15);
        padding: 6px 10px;
        border-radius: 6px;
    }

    #nav .navbar-toggler:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(255, 214, 98, 0.35);
    }

    #nav .navbar-collapse {
        margin-top: 10px;
        border-top: 1px solid #f1f5f9;
        padding: 10px 0 16px;
        max-height: calc(100vh - 75px);
        overflow-y: auto;
        background: #ffffff;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
    }

    /* Completely kill the desktop floating underline pseudo-element */
    #nav .navbar-light .nav-link::after {
        display: none !important;
        content: none !important;
    }

    /* Clean, touch-friendly mobile nav links */
    #nav .navbar-light .nav-link {
        padding: 12px 16px;
        min-height: 44px;
        font-size: 15px;
        letter-spacing: 1px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        border-left: 3px solid transparent;
        display: flex;
        align-items: center;
        transition: all 0.25s ease;
    }

    #nav .navbar-light .nav-link:hover,
    #nav .navbar-light .nav-link.active {
        color: #1a0850;
        background: rgba(26, 8, 80, 0.04);
        border-left-color: #1a0850;
        font-weight: 700;
    }

    #nav .navbar-collapse.collapsing {
        transition: height 0.3s ease;
    }

    /* Forms container on tablets */
    .contact-form-card,
    .career-form-card {
        padding: 32px 24px;
    }

    /* Medium Screen / Tablet Image & Card Sizing (768px - 991.98px) */
    .services-center-img {
        max-width: 280px !important;
        max-height: 250px !important;
        margin: 20px auto !important;
        display: block !important;
    }

    .service-image {
        max-height: 250px !important;
        border-radius: 14px !important;
        overflow: hidden !important;
    }

    .service-image img {
        max-height: 250px !important;
        object-fit: cover !important;
    }

    .product-img {
        height: 190px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .product-img img {
        max-height: 180px !important;
        object-fit: contain !important;
    }

    .process-col {
        padding: 24px 16px !important;
    }

    .process-col .process-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
        margin-bottom: 12px !important;
    }

    .work-gallery-main img {
        max-height: 270px !important;
    }

    .project-img-wrap {
        height: 180px !important;
    }

    .featured-img-wrap {
        max-height: 280px !important;
        overflow: hidden !important;
    }

    .featured-img-wrap img {
        max-height: 280px !important;
        object-fit: cover !important;
    }
}

/* ---------------------------------------------
   4. Mobile Breakpoint (max-width: 767.98px)
   --------------------------------------------- */
@media (max-width: 767.98px) {
    /* Unified Subpage Hero Styling */
    .about-hero,
    .works-hero,
    .services-header,
    .products-hero,
    .blogs-hero,
    .career-hero,
    .contact-hero {
        padding: 48px 0 42px !important;
        min-height: auto !important;
    }

    .about-hero h1,
    .works-hero h1,
    .services-header h1,
    .products-hero__title,
    .blogs-hero__title,
    .career-hero__title,
    .contact-hero__title {
        font-size: clamp(24px, 6.5vw, 34px) !important;
        line-height: 1.25 !important;
        margin-bottom: 14px !important;
    }

    .hero-breadcrumb-bar {
        font-size: 13px !important;
        margin-bottom: 16px !important;
    }

    .hero-tag,
    .works-hero-tag,
    .products-hero__pill,
    .blogs-hero__badge,
    .career-hero__pill,
    .contact-hero__pill {
        font-size: 11px !important;
        padding: 5px 12px !important;
        margin-bottom: 14px !important;
    }

    .hero-subtext,
    .career-hero__subtitle,
    .contact-hero__subtitle,
    .products-hero__subtitle,
    .blogs-hero__subtitle {
        font-size: 14px !important;
        line-height: 1.6 !important;
        max-width: 100% !important;
    }

    /* =============================================
       Homepage Mobile Sizing & Card Refinements
       ============================================= */

    /* 1. Universal Section Headers */
    .section-header {
        margin: 0 auto 20px auto !important;
        padding-bottom: 14px !important;
    }

    .section-header h1 {
        font-size: 28px !important;
        letter-spacing: 2px !important;
    }

    .section-header p {
        font-size: 15px !important;
    }

    .section-header::after {
        width: 60px !important;
        left: calc(50% - 30px) !important;
    }

    .section-header::before {
        width: 30px !important;
        left: calc(50% - 15px) !important;
    }

    /* 2. Hero Section (#header) */
    #header {
        padding: 25px 0 35px !important;
        min-height: auto !important;
    }

    #header .header-img {
        margin-bottom: 20px !important;
        text-align: center !important;
    }

    #header .header-img .hero-visual {
        max-width: 270px !important;
        aspect-ratio: 4/3 !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 25px rgba(26, 8, 80, 0.15) !important;
    }

    #header .iso-badge {
        bottom: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        padding: 4px 12px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    #header .iso-badge i {
        font-size: 13px !important;
    }

    #header .iso-badge span {
        font-size: 10.5px !important;
    }

    #header .header-tag {
        font-size: 10.5px !important;
        letter-spacing: 1.5px !important;
        padding: 4px 12px !important;
        margin-bottom: 14px !important;
    }

    #header .hero-headline,
    #header .header-content .hero-title,
    #header .header-content h1,
    #header .header-content h2 {
        font-size: 26px !important;
        line-height: 1.22 !important;
        margin-bottom: 16px !important;
    }

    #header .hero-headline__accent,
    #header .header-content .hero-title-accent,
    #header .header-content h2 span:not(.hero-decade-badge) {
        font-size: 26px !important;
    }

    #header .header-content p {
        font-size: 13.5px !important;
        line-height: 1.55 !important;
        margin-bottom: 18px !important;
        max-width: 100% !important;
    }

    #header .header-content .btn {
        padding: 9px 22px !important;
        font-size: 13px !important;
        letter-spacing: 1.5px !important;
    }

    #header .header-secondary-link {
        font-size: 13px !important;
        margin-top: 10px !important;
    }

    #header .header-stats {
        margin-top: 24px !important;
        display: flex !important;
        justify-content: center !important;
        gap: 12px !important;
    }

    #header .header-stats .stat-item {
        padding-right: 12px !important;
        margin-right: 0 !important;
        text-align: center !important;
    }

    #header .header-stats .stat-number {
        font-size: 22px !important;
    }

    #header .header-stats .stat-label {
        font-size: 10px !important;
        letter-spacing: 0.5px !important;
    }

    /* 3. Mini Features Bar (#feature-mini) */
    #feature-mini {
        margin-top: -20px !important;
    }

    #feature-mini .container {
        padding: 4px !important;
        border-radius: 10px !important;
        border-width: 2px !important;
    }

    #feature-mini .feature-col-5 {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
    }

    #feature-mini .feature-col-5:last-child {
        border-bottom: none !important;
    }

    #feature-mini .feature-item {
        padding: 14px 6px !important;
    }

    #feature-mini .feature-item i {
        font-size: 22px !important;
        margin-bottom: 4px !important;
    }

    #feature-mini .feature-item h3 {
        font-size: 14px !important;
        margin-bottom: 2px !important;
    }

    #feature-mini .feature-item p {
        font-size: 11.5px !important;
    }

    /* 4. Services Feature Section (#feature) */
    #feature {
        padding: 35px 0 !important;
    }

    #feature .product-feature {
        padding: 16px !important;
        margin-bottom: 14px !important;
        border-radius: 10px !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04) !important;
    }

    #feature .product-icon {
        width: 42px !important;
    }

    #feature .product-icon i {
        font-size: 24px !important;
    }

    #feature .product-content {
        width: calc(100% - 42px) !important;
    }

    #feature .product-feature h2 {
        font-size: 15.5px !important;
        font-weight: 700 !important;
        margin-bottom: 4px !important;
    }

    #feature .product-feature p {
        font-size: 12.5px !important;
        line-height: 1.5 !important;
        color: #64748b !important;
    }

    #feature .services-center-img {
        max-width: 240px !important;
        max-height: 180px !important;
        margin: 15px auto !important;
        display: block !important;
        border-radius: 8px !important;
    }

    /* 5. Stay Safe / Newsletter Banner (#newsletter) */
    #newsletter {
        margin: 35px 0 !important;
        padding: 28px 15px !important;
        text-align: center !important;
        border-radius: 10px !important;
    }

    #newsletter img {
        display: none !important;
    }

    #newsletter h2 {
        font-size: 19px !important;
        margin-bottom: 12px !important;
        padding-bottom: 10px !important;
    }

    #newsletter h2::after {
        left: calc(50% - 35px) !important;
        width: 70px !important;
    }

    .newsletter-cta-btn {
        padding: 10px 22px !important;
        font-size: 13.5px !important;
        display: inline-block !important;
    }

    /* 6. Who We Are / Process Section (#process) */
    #process {
        padding: 35px 0 20px 0 !important;
    }

    #process .process-col {
        padding: 20px 14px !important;
        margin-bottom: 16px !important;
        border-radius: 10px !important;
    }

    #process .process-col i {
        font-size: 38px !important;
        margin-bottom: 8px !important;
    }

    #process .process-col h2 {
        font-size: 16px !important;
        font-weight: 700 !important;
        margin-bottom: 4px !important;
    }

    #process .process-col p {
        font-size: 12.5px !important;
        line-height: 1.5 !important;
        color: #64748b !important;
    }

    #process .youtube-player {
        border-radius: 10px !important;
        margin-top: 15px !important;
        border-width: 2px !important;
    }

    #process .youtube-player .video-overlay {
        padding: 6px 14px !important;
        bottom: 10px !important;
    }

    #process .youtube-player .video-overlay h3 {
        font-size: 15px !important;
    }

    #process .youtube-player .video-overlay p {
        font-size: 11px !important;
    }

    #process .youtube-player .play {
        width: 44px !important;
        height: 44px !important;
        margin-left: -22px !important;
        margin-top: -22px !important;
    }

    /* 7. Product Catalog Cards (#products) */
    #products {
        padding: 30px 0 35px 0 !important;
    }

    #productsGridRow > div {
        margin-bottom: 14px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    #products .product-single {
        padding: 16px 14px !important;
        border-radius: 10px !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04) !important;
    }

    #products .product-title {
        margin-bottom: 8px !important;
    }

    #products .product-title h2 {
        font-size: 15.5px !important;
        font-weight: 700 !important;
        margin-bottom: 2px !important;
    }

    #products .product-title p {
        font-size: 11.5px !important;
        color: #64748b !important;
    }

    #products .product-single .product-img {
        height: 140px !important;
        margin-bottom: 10px !important;
    }

    #products .product-img img {
        max-height: 125px !important;
    }

    #products .product-footer .btn {
        padding: 6px 16px !important;
        font-size: 12.5px !important;
        letter-spacing: 0.5px !important;
        width: 100% !important;
        border-radius: 6px !important;
    }

    .product-extra {
        display: none !important;
    }

    .product-extra.show {
        display: block !important;
    }

    .products-mobile-toggle-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 15px;
        margin-bottom: 25px;
    }

    .btn-products-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: #1a0850;
        color: #ffd662;
        font-family: var(--font-heading), 'Oswald', sans-serif;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        padding: 12px 28px;
        border-radius: 50px;
        border: none;
        box-shadow: 0 6px 20px rgba(26, 8, 80, 0.2);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-products-toggle:hover,
    .btn-products-toggle:focus {
        background: #26145f;
        color: #ffffff;
        transform: translateY(-2px);
    }

    /* 8. Client Logo Marquee (#testimonial) */
    .clients-section {
        padding: 24px 0 !important;
    }

    .cr-item {
        padding: 8px 12px !important;
        height: 80px !important;
    }

    .cr-item img {
        width: 65px !important;
        height: 65px !important;
        padding: 6px !important;
        border-width: 2px !important;
    }

    /* 9. Contact Us Section (#contact) */
    #contact {
        padding: 25px 0 !important;
    }

    #contact .contact-container {
        border-radius: 14px !important;
        border: 1.5px solid rgba(26, 8, 80, 0.12) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
        overflow: hidden !important;
        margin: 0 auto !important;
        max-width: 480px !important;
    }

    #contact .contact-container > .row {
        display: flex !important;
        flex-direction: column-reverse !important;
    }

    #contact .contact-info-col {
        padding: 0 !important;
    }

    #contact .contact-info {
        padding: 24px 20px 20px !important;
        border-top: none !important;
        text-align: center !important;
        background: #ffffff !important;
    }

    #contact .contact-info h2 {
        font-size: 20px !important;
        font-weight: 700 !important;
        letter-spacing: 0.8px !important;
        margin-bottom: 6px !important;
        padding-bottom: 8px !important;
    }

    #contact .contact-info h2::after {
        width: 36px !important;
        height: 2px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    #contact .contact-info p {
        font-size: 13px !important;
        line-height: 1.5 !important;
        color: #64748b !important;
        margin-bottom: 16px !important;
        max-width: 100% !important;
    }

    #contact .contact-meta-items {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
        background: #f8fafc !important;
        padding: 12px 14px !important;
        border-radius: 10px !important;
        border: 1px solid #f1f5f9 !important;
    }

    #contact .contact-meta-items h3 {
        font-size: 13px !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        color: #334155 !important;
        line-height: 1.4 !important;
    }

    #contact .contact-meta-items h3 i {
        color: #1a0850 !important;
        font-size: 14px !important;
        width: 16px !important;
        text-align: center !important;
        flex-shrink: 0 !important;
    }

    #contact .contact-meta-items h3 a {
        color: #1a0850 !important;
        font-weight: 700 !important;
        text-decoration: none !important;
    }

    #contact .contact-info .btn {
        background: #1a0850 !important;
        color: #ffd662 !important;
        border: none !important;
        padding: 11px 28px !important;
        border-radius: 50px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        letter-spacing: 1px !important;
        text-transform: uppercase !important;
        box-shadow: 0 4px 15px rgba(26, 8, 80, 0.2) !important;
        width: 100% !important;
        max-width: 260px !important;
        margin: 0 auto 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s ease !important;
    }

    #contact .contact-info .btn:hover {
        background: #26145f !important;
        color: #ffffff !important;
        transform: translateY(-2px) !important;
    }

    #contact .contact-info .social {
        margin-top: 6px !important;
        display: flex !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    #contact .contact-info .social a {
        width: 34px !important;
        height: 34px !important;
        font-size: 13px !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        color: #1a0850 !important;
        transition: all 0.2s ease !important;
    }

    #contact .contact-info .social a:hover {
        background: #ffd662 !important;
        color: #1a0850 !important;
        border-color: #ffd662 !important;
    }

    #contact .contact-map-col {
        padding: 0 !important;
        min-height: auto !important;
    }

    #contact .contact-map-col iframe {
        min-height: 180px !important;
        height: 180px !important;
        border-radius: 0 !important;
        border: none !important;
        border-top: 1px solid #f1f5f9 !important;
        display: block !important;
    }

    /* Form Fields & Actions */
    .btn-contact-submit,
    .btn-career-submit {
        width: 100% !important;
        height: 50px !important;
        font-size: 15px !important;
    }

    .captcha-box-wrapper {
        gap: 8px;
    }

    .captcha-code-badge {
        font-size: 16px;
        padding: 8px 14px;
        min-width: 90px;
    }

    /* Google Maps Responsive Frame */
    .contact-map-frame iframe {
        height: 250px !important;
    }

    /* Modern Mobile Footer Alignment (Small Logo, Side-by-Side Links) */
    .main-footer {
        padding: 45px 0 0;
        text-align: left;
    }

    .main-footer .footer-logo-wrapper {
        display: inline-block;
        max-width: 125px;
        padding: 4px 10px;
        margin-bottom: 12px;
    }

    .main-footer .footer-logo-img {
        max-height: 30px;
    }

    .main-footer .footer-col-brand {
        margin-bottom: 25px;
    }

    .main-footer p.footer-about {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 12px;
        text-align: justify;
        text-justify: inter-word;
    }

    .main-footer .footer-cert-badge {
        font-size: 11px;
        padding: 3px 10px;
    }

    .main-footer .footer-col-links {
        margin-bottom: 22px;
    }

    .main-footer .footer-col-quick {
        padding-right: 8px;
    }

    .main-footer .footer-col-important {
        padding-left: 8px;
    }

    .main-footer .footer-title {
        font-size: 14.5px;
        margin-bottom: 14px;
        letter-spacing: 1px;
    }

    .main-footer ul.footer-links li {
        margin-bottom: 8px;
    }

    .main-footer ul.footer-links li a {
        font-size: 13px;
    }

    .main-footer .footer-col-contact {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 22px;
        margin-top: 6px;
    }

    .main-footer .footer-social-strip {
        justify-content: flex-start;
        gap: 8px;
    }

    .main-footer .footer-bottom-bar {
        margin-top: 25px;
        padding: 18px 0;
        text-align: center;
    }

    .main-footer .footer-legal-nav {
        justify-content: center;
        margin-top: 8px;
        gap: 8px;
    }
}

/* ---------------------------------------------
   5. Small Mobile Breakpoint (max-width: 575.98px)
   --------------------------------------------- */
@media (max-width: 575.98px) {
    .contact-info-card {
        padding: 26px 18px 22px;
    }

    .contact-card-icon {
        width: 54px;
        height: 54px;
        font-size: 20px;
        margin-bottom: 12px;
    }

    .contact-card-title {
        font-size: 19px;
    }

    .tech-spec-table th,
    .tech-spec-table td {
        font-size: 13px !important;
        padding: 10px 10px !important;
    }
}
