/* ============================================================
   Meinra Mechanics Ltd — Public Website Styles
   Color Palette:
     Primary   #C00000  (deep red)
     Secondary #222222
     Accent    #F5A623  (amber)
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --meinra-red:    #C00000;
    --meinra-dark:   #222222;
    --meinra-amber:  #F5A623;
    --meinra-light:  #f8f9fa;
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    color: #333;
    line-height: 1.7;
}

/* Enforce Bootstrap danger to match brand red */
.bg-danger,
.btn-danger,
.badge.bg-danger { background-color: var(--meinra-red) !important; }

.btn-danger          { border-color: var(--meinra-red) !important; }
.btn-danger:hover    { background-color: #a00000 !important; }
.btn-outline-danger  { color: var(--meinra-red) !important; border-color: var(--meinra-red) !important; }
.btn-outline-danger:hover { background-color: var(--meinra-red) !important; color: #fff !important; }
.text-danger         { color: var(--meinra-red) !important; }
.border-danger       { border-color: var(--meinra-red) !important; }

/* ── Typography ───────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; }

.section-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--meinra-red);
    margin-bottom: 8px;
}

.section-heading {
    font-weight: 800;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--meinra-dark);
    margin-bottom: 1rem;
}

/* ── Navbar ───────────────────────────────────────────────── */
#mainNavbar {
    background: #fff;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
    transition: box-shadow .3s;
    z-index: 1030;
}

/* Logo icon */
.navbar-brand .logo-icon {
    width: 44px; height: 44px;
    background: var(--meinra-red);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(192,0,0,.35);
    transition: transform .25s;
}
.navbar-brand:hover .logo-icon { transform: rotate(-15deg) scale(1.08); }

/* Phone chip */
.nav-phone-chip {
    border: 1px solid #eee;
    border-radius: 50px;
    padding: 6px 14px 6px 8px;
    transition: border-color .2s, background .2s;
}
.nav-phone-chip:hover { border-color: var(--meinra-red); background: #fff6f6; }
.nav-phone-icon {
    width: 32px; height: 32px;
    background: var(--meinra-red);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px;
    flex-shrink: 0;
}

/* Hamburger toggler */
.navbar-toggler:focus { box-shadow: none; }
.toggler-line {
    display: block;
    width: 24px; height: 2px;
    background: #333;
    border-radius: 2px;
    margin: 5px 0;
    transition: transform .3s, opacity .3s, background .2s;
}
.navbar-toggler[aria-expanded="true"] .toggler-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--meinra-red);
}
.navbar-toggler[aria-expanded="true"] .toggler-line:nth-child(2) {
    opacity: 0;
}
.navbar-toggler[aria-expanded="true"] .toggler-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--meinra-red);
}

/* Nav links — desktop */
#mainNavbar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #444 !important;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .3px;
    padding: 10px 14px !important;
	margin-bottom:10px;
    text-decoration: none;
    transition: color .2s;
    white-space: nowrap;
}

/* Icon hidden on desktop by default, shown on mobile */
#mainNavbar .nav-link .nav-icon {
    font-size: 13px;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity .2s, width .2s;
}

/* Animated underline */
#mainNavbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 3px;
    background: var(--meinra-red);
    border-radius: 2px 2px 0 0;
    transition: width .25s ease, left .25s ease;
}
#mainNavbar .nav-link:hover {
    color: var(--meinra-red) !important;
}
#mainNavbar .nav-link:hover::after {
    width: 70%; left: 15%;
}

/* Active state */
#mainNavbar .nav-link.nav-active {
    color: var(--meinra-red) !important;
    font-weight: 700;
}
#mainNavbar .nav-link.nav-active::after {
    width: 80%; left: 10%;
}
#mainNavbar .nav-link.nav-active .nav-icon {
    opacity: 1;
    width: auto;
}

/* Active background badge (desktop only) */
@media (min-width: 992px) {
    #mainNavbar .nav-link.nav-active span {
        background: #fff0f0;
        border-radius: 20px;
        padding: 3px 10px;
    }
}

/* CTA button */
.nav-cta-btn {
    background: var(--meinra-red);
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .3px;
    /* padding: 5px 20px; */
	margin-bottom:5px;
    border-radius: 50px;
    border: 2px solid var(--meinra-red);
    white-space: nowrap;
    transition: background .2s, color .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 3px 10px rgba(192,0,0,.30);
}
.nav-cta-btn:hover {
    background: #a00000;
    border-color: #a00000;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(192,0,0,.40);
}
.nav-cta-btn.nav-cta-active {
    background: #800000;
    border-color: #800000;
    box-shadow: 0 2px 8px rgba(192,0,0,.5) inset;
}

/* ── Mobile nav ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
    #mainNavbar {
        padding: 8px 0;
    }
    #mainNavbar .nav-link {
        padding: 12px 16px !important;
        font-size: 15px;
        border-radius: 10px;
        margin: 2px 8px;
        gap: 10px;
    }
    #mainNavbar .nav-link .nav-icon {
        opacity: 1;
        width: auto;
        font-size: 16px;
    }
    #mainNavbar .nav-link::after { display: none; }
    #mainNavbar .nav-link:hover,
    #mainNavbar .nav-link.nav-active {
        background: #fff0f0;
        color: var(--meinra-red) !important;
    }
    .nav-cta-btn {
        margin: 8px 8px 12px;
        display: block;
        text-align: center;
        border-radius: 12px;
        padding: 12px 20px;
        font-size: 15px;
    }
    #navMenu { border-top: 1px solid #f0f0f0; margin-top: 8px; }
}

.nav-phone { font-size: 16px; }

/* ── Hero Carousel ────────────────────────────────────────── */
.hero-section { position: relative; }

/* Slide image: full viewport height on desktop, fixed 70vh min */
.hero-slide-img {
    height: 92vh;
    min-height: 560px;
    object-fit: cover;
    object-position: center;
}

/* Dark gradient overlay on every slide */
.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(34,34,34,.80) 0%, rgba(192,0,0,.55) 100%);
    z-index: 1;
}

/* Caption container — stretch to fill slide */
.carousel-item { position: relative; }
.carousel-caption {
    position: absolute;
    inset: 0;
    padding: 0 5%;
    z-index: 2;
    /* Override Bootstrap's bottom-only positioning */
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
}
.hero-caption-content { max-width: 680px; }

/* Indicator buttons styling */
.carousel-indicators [data-bs-target] {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.6);
    background-color: transparent;
    margin: 0 4px;
    transition: all .25s;
}
.carousel-indicators .active {
    background-color: var(--meinra-red);
    border-color: var(--meinra-red);
    width: 28px;
    border-radius: 5px;
}

/* Scroll-down bounce */
@keyframes bounce {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}
.animate-bounce { animation: bounce 1.4s infinite; }

.text-white-75 { color: rgba(255,255,255,0.75) !important; }
.min-vh-50     { min-height: 50vh; }
.lh-tight      { line-height: 1.2; }

/* ── Page Hero (inner pages) ─────────────────────────────── */
/* Individual pages now inject their own background image via inline styles.
   This rule provides a safe fallback for any page that doesn't. */
.page-hero {
    background: linear-gradient(135deg, var(--meinra-red) 0%, #800000 50%, #1a1a1a 100%);
    min-height: 280px;
}

/* ── Cards & Hover ────────────────────────────────────────── */
.card { border-radius: 12px; }
.hover-lift {
    transition: transform .25s ease, box-shadow .25s ease;
}
.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.13) !important;
}

/* ── Service icon ─────────────────────────────────────────── */
.service-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: rgba(192,0,0,0.08);
    display: flex; align-items: center; justify-content: center;
}
.service-icon-lg {
    border-radius: 12px;
}

/* ── Why Choose Us icon badge ─────────────────────────────── */
.why-icon-badge {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(192,0,0,0.08);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ── Brand logos grid ─────────────────────────────────────── */
.brand-logos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.brand-chip {
    padding: 8px 18px;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    transition: border-color .2s, color .2s;
}
.brand-chip:hover { border-color: var(--meinra-red); color: var(--meinra-red); }

/* ── News / articles ──────────────────────────────────────── */
.news-thumb { border-radius: 12px 12px 0 0; overflow: hidden; }
.bg-danger-soft { background-color: rgba(192,0,0,0.1); }
.object-fit-cover { object-fit: cover; }

/* ── Product cards ────────────────────────────────────────── */
.product-card { border-radius: 12px; overflow: hidden; }
.product-img  { overflow: hidden; }

/* ── CTA Banner ───────────────────────────────────────────── */
.cta-banner {
    background: linear-gradient(135deg, #800000, var(--meinra-red), #b00000);
}

/* ── Footer ───────────────────────────────────────────────── */
footer { background: #1a1a1a !important; }
.hover-link:hover { color: #fff !important; text-decoration: underline !important; }

/* ── Scroll down arrow animation ──────────────────────────── */
.animate-bounce {
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

/* ── Article content ──────────────────────────────────────── */
.article-content h2,
.article-content h3,
.article-content h4 { font-weight: 700; margin-top: 1.5rem; color: var(--meinra-dark); }
.article-content p  { color: #555; line-height: 1.9; }

/* ── Forms ────────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: var(--meinra-red);
    box-shadow: 0 0 0 .2rem rgba(192,0,0,0.15);
}

/* ── Pagination ───────────────────────────────────────────── */
.page-link          { color: var(--meinra-red); }
.page-item.active .page-link { background: var(--meinra-red); border-color: var(--meinra-red); }

/* ── Stats bar border helper ──────────────────────────────── */
.border-danger-dark { border-color: rgba(255,255,255,0.2) !important; }

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 767px) {
    .hero-section  { min-height: 85vh; }
    .page-hero     { min-height: 160px; }
    .cta-banner .btn { width: 100%; }
}
