/* ==========================================================================
   1. GLOBAL VARIABLES & LAYOUT RESET
   ========================================================================== */
:root {
    --brand-gold: #6D5F32;
    --accent-gold: #d4c491;
    --dark-green: #1e3c33;
    --text-main: #333333;
    --text-muted: #666666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: #fefcf5;
    color: var(--text-main);
}

/* Hard Lock Desktop Frame (Banish scrollbars completely on desktop) */
@media (min-width: 992px) {
    html, body {
        overflow: hidden !important;
        height: 100vh !important;
    }
    .main-calc-wrapper {
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
    }
    .main-calc-wrapper > .row {
        height: 100% !important;
        max-height: 100% !important;
    }
}

.main-calc-wrapper {
    margin-top: 0;
    position: relative;
    width: 100%;
}

/* ============================================
   BOOTSTRAP UTILITY REOVERRIDES & STRUCTURE
   ============================================ */
.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
}

.row.g-0 {
    margin-right: 0;
    margin-left: 0;
}

.row.g-0 > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

.col-lg-6 {
    position: relative;
    width: 100%;
}

.col-12 {
    position: relative;
    width: 100%;
}

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }

.gap-4 { gap: 1.5rem !important; }
.g-3 { gap: 1rem !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-sm-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-md-5 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }
.flex-grow-1 { flex-grow: 1 !important; }

.text-center { text-align: center !important; }
.text-white { color: #fff !important; }
.text-secondary { color: #6c757d !important; }
.text-muted { color: #6c757d !important; }
.text-uppercase { text-transform: uppercase !important; }
.fw-bold { font-weight: 700 !important; }
.opacity-75 { opacity: 0.75 !important; }
.small { font-size: 80% !important; }
.large { font-size: 1.25rem !important; }

.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid #dee2e6 !important; }
.border-bottom { border-bottom: 1px solid #dee2e6 !important; }
.rounded-4 { border-radius: 1rem !important; }
.bg-white { background-color: #fff !important; }

@media (min-width: 992px) {
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
        height: 100% !important;
    }
    .px-md-5 {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}
/* ==========================================================================
   GLOBAL VARIABLES (NAVBAR ONLY)
   ========================================================================== */
:root {
    --brand-gold: #6D5F32;
}
/* ==========================================================================
   2. NAV-PILL (FIXED AT TOP)
   ========================================================================== */
.nav-pill {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ffffff;
    padding: 8px 22px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: auto;
    max-width: 95%;
    z-index: 1030;
}

.nav-pill.scrolled {
    background: rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    top: 10px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.navbar-brand img {
    border-radius: 8px;
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-collapse {
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
}

.navbar-nav {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.nav-item {
    list-style: none;
}

.navbar-nav .nav-link {
    color: #6D5F32 !important;
    font-weight: 500;
    padding: 8px 12px !important;
    transition: all 0.3s ease;
    font-size: 15px;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--brand-gold);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 60%;
}

.navbar-nav .nav-link:hover {
    color: #d4af37 !important;
}

.nav-pill.scrolled .navbar-nav .nav-link {
    color: var(--brand-gold) !important;
}

.nav-pill.scrolled .navbar-nav .nav-link::after {
    background-color: var(--brand-gold);
}

.src-container {
    display: flex;
    align-items: center;
    background-color: #f5f5f0;
    border-radius: 30px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    gap: 5px;
}

.nav-pill.scrolled .src-container {
    background-color: transparent;
    border: 1px solid var(--brand-gold);
}

.nav-pill.scrolled .src-btn {
    color: var(--brand-gold);
}

.nav-pill.scrolled .src-container input {
    color: var(--brand-gold);
}

.nav-pill.scrolled .src-container input::placeholder {
    color: var(--brand-gold);
    opacity: 0.7;
}

.src-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6D5F32;
    font-size: 14px;
    transition: all 0.3s ease;
}

.src-btn:hover {
    color: #d4af37;
    transform: scale(1.1);
}

.src-container input {
    background-color: transparent;
    border: none;
    outline: none;
    width: 0;
    opacity: 0;
    padding: 0;
    transition: all 0.3s ease;
    font-size: 13px;
}

.src-container.active input {
    width: 150px;
    opacity: 1;
    padding: 4px 8px;
}

.mobile-dropdown-container {
    position: relative;
    display: none;
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(109, 95, 50, 0.1);
    border: none;
    border-radius: 40px;
    padding: 8px 16px;
    font-weight: 500;
    color: #6D5F32;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-pill.scrolled .mobile-menu-btn {
    color: var(--brand-gold);
    background: transparent;
    border: 1px solid var(--brand-gold);
}

.mobile-menu-btn:hover {
    background: rgba(109, 95, 50, 0.2);
    transform: translateY(-2px);
}

.mobile-menu-btn i {
    font-size: 18px;
}

.mobile-menu-btn span {
    font-size: 14px;
}

.mobile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1050;
    overflow: hidden;
}

.mobile-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #6D5F32;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 1px solid rgba(178, 161, 108, 0.1);
    transition: all 0.3s ease;
}

.mobile-dropdown-item:last-child {
    border-bottom: none;
}

.mobile-dropdown-item:hover {
    background: rgba(178, 161, 108, 0.15);
    padding-left: 28px;
}

/* ==========================================================================
   3. TYPOGRAPHY, HERO, & INTERFACE COMPONENTS
   ========================================================================== */
.tracking-tight { letter-spacing: -0.02em; font-size: 28px;}
@media(min-width: 576px) { .tracking-tight { font-size: 35px; } }
.tracking-wider { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }
.x-small { font-size: 0.7rem; }
.brand-text { color: var(--brand-gold); }
.text-accent { color: var(--accent-gold); }

.brand-text-img {
    font-size: 2.5rem;
    line-height: 1.1;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
@media(min-width: 768px) { .brand-text-img { font-size: 3.5rem; } }
@media(min-width: 1200px) { .brand-text-img { font-size: 4.5rem; } }

.accent-line {
    width: 40px;
    height: 4px;
    background: var(--brand-gold);
    border-radius: 2px;
}

.hero-image-side {
    height: 100%;
    min-height: 350px;
    background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1200&q=80') center/cover;
}

.hero-overlay {
    height: 100%;
    min-height: 350px;
    background: linear-gradient(135deg, rgba(109, 95, 50, 0.95) 0%, rgba(20, 20, 20, 0.8) 100%);
    padding-top: 100px !important;
}

.brand-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.hero-icon {
    font-size: 1.8rem !important; 
    color: var(--accent-gold);
}

/* Form block sizing container logic */
.calculator-content-col {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}
@media (min-width: 992px) {
    .calculator-content-col {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow-y: auto; 
    }
}

.form-label-custom {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 8px;
    display: block;
}

.form-select-modern {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 2px solid #eee;
    font-size: 1.1rem;
    font-weight: 500;
    background-color: transparent;
}
.form-select-modern:focus { outline: none; border-color: var(--brand-gold); }

.input-group-modern {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #eee;
}
.input-group-modern:focus-within { border-color: var(--brand-gold); }

.input-group-modern input {
    flex: 1;
    border: none;
    padding: 12px 0;
    font-size: 1.5rem;
    font-weight: 600;
    outline: none;
    background: transparent;
}

.input-group-modern .unit {
    font-weight: 700;
    color: #ccc;
    font-size: 0.9rem;
}

.total-display {
    background-color: var(--brand-gold);
    color: white;
    box-shadow: 0 20px 40px rgba(109, 95, 50, 0.3);
}

.footer {
    background: #6D5F32;
    color: #ffffff;
    font-weight: 500;
}

/* Animations */
.anim-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards ease-out;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   4. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 991px) {
    .navbar-collapse { display: none !important; }

    .mobile-dropdown-container { 
        display: block; 
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .src-container input { 
        width: 80px; 
        opacity: 1; 
    }
}

@media (max-width: 576px) {
    .nav-pill { 
        padding: 6px 14px; 
        width: 95%; 
        top: 10px; 
    }

    .navbar-brand img { 
        width: 35px; 
        height: 35px; 
    }

    .mobile-menu-btn span { 
        display: none; 
    }

    .mobile-menu-btn { 
        padding: 8px 12px; 
    }
}