/* ==========================================
   CRITICAL LIVE SITE FIXES
   High priority fixes for panel.ecomshost.com
   ========================================== */

/* FIX 1: Header Layout - Prevent Vertical Stacking */
section#header .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
}

section#header .logo {
    order: 1 !important;
    flex: 0 0 auto !important;
}

section#header .top-nav {
    order: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

section#header .top-nav li {
    flex: 0 0 auto !important;
    width: auto !important;
}

/* FIX 2: Hero Section - Prevent Card Clipping */
section#home-banner {
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 80px !important;
}

.home-shortcuts {
    margin-top: -40px !important;
    position: relative !important;
    z-index: 10 !important;
}

.home-shortcuts .container {
    margin-top: 0 !important;
}

/* FIX 3: Typography - Responsive Sizing */
section#home-banner h2 {
    font-size: clamp(1.5rem, 5vw, 3.5rem) !important;
    line-height: 1.2 !important;
    padding: 0 15px !important;
}

section#home-banner p {
    font-size: clamp(1rem, 2.5vw, 1.25rem) !important;
}

/* FIX 4: Domain Search - Responsive */
section#home-banner .input-group {
    flex-wrap: nowrap !important;
}

section#home-banner .form-control {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

section#home-banner .input-group-btn {
    flex: 0 0 auto !important;
}

section#home-banner .btn {
    white-space: nowrap !important;
    padding: 1rem 1.5rem !important;
}

/* FIX 5: Mobile Header - Stack Properly */
@media (max-width: 767px) {
    section#header .container {
        flex-direction: row !important;
        justify-content: space-between !important;
    }

    section#header .logo {
        flex: 1 1 auto !important;
        max-width: 60% !important;
    }

    section#header .top-nav {
        flex: 0 1 auto !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 5px !important;
    }

    section#header .top-nav li {
        width: auto !important;
    }

    section#header .top-nav li a {
        padding: 8px 12px !important;
        font-size: 0.875rem !important;
    }

    section#home-banner {
        padding: 2rem 0 60px !important;
    }

    section#home-banner .input-group {
        flex-direction: column !important;
        gap: 10px !important;
    }

    section#home-banner .form-control,
    section#home-banner .btn {
        width: 100% !important;
        border-radius: 12px !important;
    }

    .home-shortcuts ul {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* FIX 6: Main Body - Remove Empty Container */
section#main-body {
    min-height: auto !important;
}

section#main-body .container {
    padding: 30px 15px !important;
}

section#main-body .container:empty {
    display: none !important;
}

/* FIX 7: Cards - Better Visibility */
.home-shortcuts li {
    min-height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.home-shortcuts li a {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* FIX 8: Logo Sizing */
section#header .logo img {
    max-height: 45px !important;
    height: auto !important;
    width: auto !important;
}

section#header .logo-text {
    font-size: clamp(1.25rem, 3vw, 2rem) !important;
}

/* FIX 9: Better Button Colors */
.btn.search {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
}

.btn.transfer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* FIX 10: Navbar Height Fix */
.navbar-main {
    min-height: 48px !important;
}

.navbar-main .navbar-nav>li>a {
    padding: 12px 15px !important;
}

/* FIX 11: Prevent Horizontal Scroll */
body {
    overflow-x: hidden !important;
}

.container,
.container-fluid {
    overflow-x: hidden !important;
}

/* FIX 12: Form Input Better Sizing */
.form-control {
    font-size: 16px !important;
    /* Prevents iOS zoom */
}

/* FIX 13: Better Card Shadows */
.home-shortcuts li {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.home-shortcuts li:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 30px rgba(102, 126, 234, 0.3) !important;
}

/* FIX 14: Navigation Better Spacing */
@media (min-width: 992px) {
    .navbar-main .navbar-nav {
        display: flex !important;
        gap: 5px !important;
    }
}

/* FIX 15: Footer Better Spacing */
section#footer {
    padding: 30px 15px !important;
    margin-top: 40px !important;
}

/* FIX 16: Tablet Optimization */
@media (min-width: 768px) and (max-width: 991px) {
    section#header .top-nav {
        flex-direction: row !important;
        gap: 8px !important;
    }

    .home-shortcuts ul {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* FIX 17: Image Responsiveness */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* FIX 18: Better Link Colors */
a {
    color: #667eea !important;
}

a:hover {
    color: #5568d3 !important;
}

/* FIX 19: Panel Spacing */
.panel {
    margin-bottom: 20px !important;
}

/* FIX 20: Better Text Readability */
section#home-banner {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* ULTRA IMPORTANT - Force Visibility of Cards */
.home-shortcuts {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.home-shortcuts ul,
.home-shortcuts li {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (min-width: 992px) {
    .home-shortcuts ul {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
    }
}