/* ==========================================================================
   MyGuwahati Master Stylesheet - Warm Light Ivory & Orange (Zero Blue)
   Absolute 100% Zero Horizontal Overflow & Mobile Perfection
   ========================================================================== */

/* 1. Design Tokens & Root Variables */
:root {
    --mg-orange: #d95300;
    --mg-orange-hover: #b84300;
    --mg-orange-light: rgba(217, 83, 0, 0.08);

    --mg-bg-page: #fdfbf7;
    --mg-bg-card: #ffffff;
    --mg-bg-input: #fbf8f3;
    --mg-bg-header: #fdfbf7;
    --mg-bg-footer: #ffffff;

    --mg-text-main: #111827;
    --mg-text-muted: #4b5563;
    --mg-text-light: #6b7280;

    --mg-border-color: #f0ece1;
    --mg-border-input: #eee8d8;

    --mg-radius-sm: 10px;
    --mg-radius-md: 16px;
    --mg-radius-lg: 24px;
    --mg-radius-pill: 50px;

    --mg-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
    --mg-shadow-md: 0 10px 30px rgba(217, 83, 0, 0.08);
    --mg-shadow-hover: 0 16px 36px rgba(217, 83, 0, 0.14);

    /* Bootstrap Overrides - Force High Contrast Warm Colors */
    --bs-primary: #d95300;
    --bs-primary-rgb: 217, 83, 0;
    --bs-body-bg: #fdfbf7;
    --bs-body-color: #111827;
    --bs-link-color: #d95300;
    --bs-link-hover-color: #b84300;
    --bs-border-color: #f0ece1;
    --bs-card-bg: #ffffff;
    --bs-card-border-color: #f0ece1;
}

[data-theme="dark"] {
    --mg-bg-page: #fdfbf7;
    --mg-bg-card: #ffffff;
    --mg-bg-input: #fbf8f3;
    --mg-bg-header: #fdfbf7;
    --mg-bg-footer: #ffffff;

    --mg-text-main: #111827;
    --mg-text-muted: #4b5563;
    --mg-text-light: #6b7280;

    --mg-border-color: #f0ece1;
    --mg-border-input: #eee8d8;

    --bs-body-bg: #fdfbf7;
    --bs-body-color: #111827;
    --bs-border-color: #f0ece1;
    --bs-card-bg: #ffffff;
}

/* 2. Global Resets & Absolute Zero-Overflow Guard */
*, *::before, *::after {
    box-sizing: border-box !important;
    max-width: 100%;
}

html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

body {
    background-color: var(--mg-bg-page) !important;
    color: var(--mg-text-main) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
}

main, section, header, footer, div, .container, .container-fluid {
    max-width: 100% !important;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

img, svg, iframe, video {
    max-width: 100% !important;
    height: auto !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--mg-text-main) !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: var(--mg-text-muted) !important;
}

a {
    color: var(--mg-text-main);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--mg-orange);
}

.text-orange {
    color: var(--mg-orange) !important;
}

.bg-orange {
    background-color: var(--mg-orange) !important;
}

.bg-orange-light {
    background-color: var(--mg-orange-light) !important;
}

/* 3. Animations */
@keyframes mgFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mg-animate-fade {
    animation: mgFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 4. Header Navigation */
.mg-header-nav {
    background-color: var(--mg-bg-header);
    border-bottom: 1px solid var(--mg-border-color);
    padding: 0.85rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    width: 100%;
}

.mg-logo-text {
    font-size: clamp(1.25rem, 4vw, 1.55rem);
    font-weight: 800;
    color: var(--mg-orange) !important;
    text-decoration: none;
    letter-spacing: -0.03em;
}

.mg-logo-text span {
    color: var(--mg-text-main) !important;
}

.mg-nav-link {
    color: var(--mg-text-main) !important;
    font-size: 0.925rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    position: relative;
    transition: all 0.25s ease;
}

.mg-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--mg-orange);
    transition: all 0.25s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.mg-nav-link:hover::after {
    width: 70%;
}

.mg-nav-link:hover {
    color: var(--mg-orange) !important;
}

.mg-icon-btn {
    background: transparent;
    border: none;
    color: var(--mg-text-main);
    font-size: 1.15rem;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mg-icon-btn:hover {
    background-color: var(--mg-orange-light);
    color: var(--mg-orange);
}

/* 5. Orange Buttons */
.btn-mg-orange {
    background-color: var(--mg-orange) !important;
    border-color: var(--mg-orange) !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: var(--mg-radius-pill) !important;
    padding: 0.65rem 1.6rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(217, 83, 0, 0.22);
}

.btn-mg-orange:hover, .btn-mg-orange:focus {
    background-color: var(--mg-orange-hover) !important;
    border-color: var(--mg-orange-hover) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(217, 83, 0, 0.38);
}

/* 6. Fluid Hero Section */
.mg-hero-section {
    padding: clamp(2rem, 5vw, 4.5rem) 1rem clamp(1.75rem, 4vw, 3.5rem);
    text-align: center;
    background: radial-gradient(circle at top center, rgba(217, 83, 0, 0.05) 0%, transparent 70%);
    width: 100%;
}

.mg-hero-pill-badge {
    background: #fff4ec;
    border: 1px solid #ffd6b8;
    color: var(--mg-orange);
    font-size: 0.775rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    max-width: 100%;
    text-align: center;
}

.mg-hero-title {
    font-size: clamp(1.7rem, 4.5vw + 0.7rem, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--mg-text-main) !important;
    margin-top: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.22;
}

.wavy-accent {
    color: var(--mg-orange) !important;
    position: relative;
    display: inline-block;
    border-bottom: 3px solid var(--mg-orange);
    border-radius: 3px;
    padding-bottom: 1px;
}

.mg-hero-search-box {
    max-width: 620px;
    width: 100%;
    margin: 1.5rem auto 2.25rem;
    background: #ffffff;
    border: 1px solid var(--mg-border-input);
    border-radius: var(--mg-radius-pill);
    padding: 6px 8px 6px 18px;
    display: flex;
    align-items: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
}

.mg-hero-search-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
    color: var(--mg-text-main) !important;
    background: transparent;
}

.mg-hero-stat-item {
    background: #ffffff;
    border: 1px solid var(--mg-border-color);
    border-radius: var(--mg-radius-md);
    padding: 0.85rem 0.75rem;
    text-align: center;
    box-shadow: var(--mg-shadow-sm);
    transition: all 0.25s ease;
}

.mg-hero-stat-num {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--mg-text-main) !important;
}

.mg-hero-stat-txt {
    font-size: 0.75rem;
    color: var(--mg-text-muted) !important;
    font-weight: 500;
}

/* 7. Category Grid Cards */
.mg-cat-tile {
    background: var(--mg-bg-card);
    border: 1px solid var(--mg-border-color);
    border-radius: var(--mg-radius-md);
    padding: 1.2rem 0.6rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    box-shadow: var(--mg-shadow-sm);
    min-height: 105px;
}

.mg-cat-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--mg-shadow-hover);
    border-color: var(--mg-orange);
}

.mg-cat-icon-sq {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.mg-cat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mg-text-main) !important;
    line-height: 1.2;
}

.cat-bg-orange  { background: #ffedd5; color: #ea580c; }
.cat-bg-amber   { background: #fef3c7; color: #d97706; }
.cat-bg-peach   { background: #ffe4e6; color: #e11d48; }
.cat-bg-pink    { background: #fce7f3; color: #db2777; }
.cat-bg-purple  { background: #f3e8ff; color: #9333ea; }
.cat-bg-teal    { background: #ccfbf1; color: #0d9488; }
.cat-bg-green   { background: #dcfce7; color: #16a34a; }
.cat-bg-terracotta { background: #fff4ec; color: #d95300; }

/* 8. Listing & Business Cards */
.mg-provider-card {
    background: var(--mg-bg-card);
    border: 1px solid var(--mg-border-color);
    border-radius: var(--mg-radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--mg-shadow-sm);
    width: 100%;
}

.mg-provider-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mg-shadow-hover);
    border-color: var(--mg-orange);
}

.mg-card-img-wrap {
    height: 165px;
    position: relative;
    overflow: hidden;
}

.mg-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mg-badge-pill-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(6px);
    color: #ffffff !important;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
}

.mg-badge-warm-gold {
    background: #fef3c7 !important;
    color: #92400e !important;
    font-weight: 600;
}

.mg-badge-warm-orange {
    background: #ffedd5 !important;
    color: #c2410c !important;
    font-weight: 600;
}

.mg-avatar-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    position: absolute;
    bottom: -15px;
    right: 15px;
    box-shadow: var(--mg-shadow-sm);
    object-fit: cover;
    background: #ffffff;
}

.mg-job-card {
    background: var(--mg-bg-card);
    border: 1px solid var(--mg-border-color);
    border-radius: var(--mg-radius-md);
    padding: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: var(--mg-shadow-sm);
    width: 100%;
}

.mg-matrimony-card {
    background: linear-gradient(180deg, #fff5f7 0%, #ffffff 100%);
    border: 1px solid #fecdd3;
    border-radius: var(--mg-radius-lg);
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

.mg-labour-card {
    background: var(--mg-bg-card);
    border: 1px solid var(--mg-border-color);
    border-radius: var(--mg-radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: var(--mg-shadow-sm);
    width: 100%;
}

.mg-pro-banner {
    background: linear-gradient(135deg, #c43e00 0%, #d95300 50%, #e06010 100%);
    border-radius: var(--mg-radius-lg);
    color: #ffffff !important;
    padding: clamp(2rem, 5vw, 3.75rem) clamp(1.25rem, 4vw, 2.75rem);
    width: 100%;
}

.mg-pro-banner h2, .mg-pro-banner p {
    color: #ffffff !important;
}

/* 9. Responsive Auth Cards & Inputs */
.mg-auth-card {
    background: var(--mg-bg-card);
    border: 1px solid var(--mg-border-color);
    border-radius: var(--mg-radius-lg);
    box-shadow: var(--mg-shadow-md);
    padding: clamp(1.25rem, 5vw, 2.5rem);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.mg-role-toggle {
    background-color: #f5f0e6;
    border-radius: var(--mg-radius-pill);
    padding: 4px;
    display: flex;
    margin-bottom: 1.5rem;
    width: 100%;
}

.mg-role-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 0.5rem;
    font-size: clamp(0.775rem, 2.5vw, 0.875rem);
    font-weight: 600;
    color: var(--mg-text-muted) !important;
    border-radius: var(--mg-radius-pill);
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.mg-role-btn.active {
    background: #ffffff;
    color: var(--mg-text-main) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mg-input-cream {
    background-color: var(--mg-bg-input) !important;
    border: 1px solid var(--mg-border-input) !important;
    color: var(--mg-text-main) !important;
    border-radius: var(--mg-radius-md) !important;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    min-height: 44px;
    width: 100%;
    transition: all 0.25s ease;
}

.mg-input-cream:focus {
    background-color: #ffffff !important;
    border-color: var(--mg-orange) !important;
    box-shadow: 0 0 0 4px rgba(217, 83, 0, 0.15) !important;
    outline: none;
}

.btn-mg-google {
    background-color: #ffffff !important;
    border: 1px solid var(--mg-border-input) !important;
    color: var(--mg-text-main) !important;
    font-weight: 600;
    border-radius: var(--mg-radius-pill) !important;
    padding: 0.7rem 1.25rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
}

/* 10. Footer Section */
.mg-main-footer {
    background-color: var(--mg-bg-footer);
    border-top: 1px solid var(--mg-border-color);
    padding: 3.5rem 0 2rem;
    width: 100%;
}

.mg-footer-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mg-text-main) !important;
    margin-bottom: 1.15rem;
}

.mg-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mg-footer-links li {
    margin-bottom: 0.6rem;
}

.mg-footer-links a {
    color: var(--mg-text-muted) !important;
    font-size: 0.875rem;
    text-decoration: none;
}

.mg-footer-links a:hover {
    color: var(--mg-orange) !important;
}

/* ==========================================================================
   Responsive Breakpoints - Mobile First Rules
   ========================================================================== */

@media (max-width: 768px) {
    .mg-hero-search-box {
        border-radius: 20px;
        padding: 8px;
        flex-direction: column;
        gap: 8px;
    }

    .mg-hero-search-box input {
        text-align: center;
        padding: 4px 0;
    }

    .mg-hero-search-box button {
        width: 100%;
        border-radius: 50px !important;
    }

    .mg-pro-banner {
        text-align: center;
    }

    .mg-pro-banner .text-lg-end {
        text-align: center !important;
        margin-top: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container, .container-fluid {
        padding-left: 1.15rem !important;
        padding-right: 1.15rem !important;
    }

    .mg-hero-section {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .mg-hero-title {
        font-size: 1.65rem !important;
        line-height: 1.25 !important;
        margin-top: 0.65rem !important;
        margin-bottom: 0.65rem !important;
    }
}
