/* Font Setup - 5 Perfect Fonts for Gift Blogs
   Google Fonts are now loaded asynchronously from the layout to avoid
   render-blocking and layout shifts. */

/* CSS Variables: keep only Quicksand + Poppins */
:root {
    --font-alternative: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-quicksand: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-primary: var(--font-quicksand);
}

/* Using only Quicksand (primary) and Poppins (alt). */


/* Global Font Settings - Currently using Inter */
* {
    font-family: var(--font-primary);
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 19px;
    line-height: 27px;
    min-height: 100vh;
}

main>.container {
    padding: 70px 15px 20px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer>.container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after,
a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li>form>button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li>form>button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav>li>form>button.logout:focus,
.nav>li>form>button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav>li>form>button.logout:focus {
    outline: none;
}

.search-btn {
    background: #6a7b00;
    border: none;
    padding: 1rem 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(151, 176, 2, .3);
    white-space: nowrap;
    height: 52px;
    color: #fff;
}

.form-group {
    margin-bottom: 1rem;
}

/* Typography improvements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #97b002;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

.article-content p a,
.article-content li a {
    color: #97b002;
    text-decoration: unset;
    border-bottom: .0625rem solid rgba(187, 192, 200, 0.6);
}

.nav-link {
    color: #2c3e50 !important;
}

a.nav-link.active {
    color: #97b002 !important;
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: #97b002 !important;
}

.bg-dark {
    position: relative;
    background-color: white !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 2px solid rgba(151, 176, 2, 0.1);
    padding: 0 0 1rem 0;
}

.dropdown-toggle::after {
    display: none !important;
}

.nav-item form {
    position: absolute;
    top: 13px;
}

.nav-link {
    letter-spacing: 0.7px;
    opacity: 0.88;
    text-transform: uppercase;
    font-size: 18px;
    font-weight: 500;
}

.navbar-brand {
    color: #97b002;
    font-weight: bold;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

nav.navbar {
    box-shadow: unset !important;
}


.navbar-brand:hover::before {
    opacity: 1;
}

.article-content h1 {
    display: none !important;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

.navbar-brand img {
    width: 192px;
    height: 36px;
    transition: all 0.3s ease;
}

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

p {
    font-family: var(--font-alternative);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.9;
    margin-bottom: 1rem;
}

.article-content p:first-of-type {
    background: linear-gradient(135deg, rgba(151, 176, 2, 0.05), rgba(151, 176, 2, 0.1));
    padding: 16px;
    border-radius: 16px;
}

li {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.9;
}

/* Blog specific styles */
.blog-article-view .article-content {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 19px;
    line-height: 27px;
}

.blog-article-view .article-content h1,
.blog-article-view .article-content h2,
.blog-article-view .article-content h3,
.blog-article-view .article-content h4,
.blog-article-view .article-content h5,
.blog-article-view .article-content h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-article-view .article-content p {
    margin-bottom: 1.5rem;
}

/* Form improvements */
.form-control {
    font-family: var(--font-primary);
    font-size: 16px;
}

.btn {
    font-family: var(--font-primary);
    font-weight: 500;
    border-radius: 16px;
}

@media (min-width: 768px) {
    .navbar-expand-md .navbar-collapse {
        justify-content: end;
    }
}

@media (max-width: 767px) {
    .navbar-brand {
        font-size: 1.2rem;
        padding: 0.3rem 0.5rem;
    }
}

.nav-link:hover {
    color: #97b002 !important;
}

.breadcrumb-item a {
    color: #97b002;
    text-decoration: unset;
}

/* Polished breadcrumb styles */
nav[aria-label="breadcrumb"] {
    margin-bottom: 1rem;
}

.breadcrumb {
    --bs-breadcrumb-divider: '›';
    border: 1px solid rgb(245 247 234);
    border-radius: 14px;
    padding: .55rem .85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-size: .95rem;
}

.breadcrumb .breadcrumb-item a {
    color: #2c3e50;
    font-weight: 600;
    text-decoration: none;
}

.breadcrumb .breadcrumb-item a:hover {
    color: #97b002;
}

.breadcrumb .breadcrumb-item.active {
    color: #97b002;
    font-weight: 500;
}

.breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    color: #a3b0be;
}

@media (max-width: 576px) {
    .breadcrumb {
        font-size: .9rem;
    }
}

.search-textarea {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 500;
}

@media (min-width: 768px) {
    .navbar-expand-md .navbar-nav {
        position: relative;
        top: 16px;
    }
}

/* Professional Navigation Styles */
.navbar {
    padding: 1rem 0;
    background: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(151, 176, 2, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 5000;
    /* ensure navbar sits above page content */
}

.navbar-brand img {
    max-height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

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

/* Navigation Links */
.nav-link {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.95rem;
    color: #2c3e50 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.3px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link:hover {
    color: #97b002 !important;
    background-color: rgba(151, 176, 2, 0.08);
    transform: translateY(-1px);
}

/* Dropdown Icons */
.dropdown-icon {
    font-size: 18px !important;
    transition: transform 0.3s ease;
    margin-left: 0.25rem;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu Styles */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.75rem 0;
    margin-top: 0;
    background: white;
    min-width: 280px;
    animation: dropdownFadeIn 0.3s ease;
    position: absolute;
    z-index: 5001;
    /* above navbar stacking context */
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
    color: #2c3e50;
    border-radius: 0;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .40rem 1rem;
}

.dropdown-item .icon {
    font-size: 20px !important;
    line-height: 1;
    color: #97b002;
    transition: all .3s ease
}

.dropdown-item:hover {
    background-color: rgba(151, 176, 2, 0.08);
    color: #5f7001;
    /* darker for contrast */
    transform: translateX(3px);
}

.dropdown-item:hover .icon {
    color: #7a9002;
    transform: scale(1.1);
}

.dropdown-divider {
    margin: 0.5rem 1rem;
    border-top: 1px solid rgba(151, 176, 2, 0.15);
}

/* Mobile Navigation */
.navbar-toggler {
    border: 2px solid #97b002;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Performance: defer rendering of below-the-fold sections to improve FCP */
.featured-section,
.blog-section,
.newsletter-section,
.why-us-section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 600px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(151, 176, 2, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2397b002' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Dropdown Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
        padding: 1rem;
        display: none;
    }

    .navbar-nav {
        padding-top: 0;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
        border-radius: 6px;
        font-size: 1rem;
    }

    .nav-link:hover {
        background-color: rgba(151, 176, 2, 0.08);
    }

    .dropdown-menu {
        border: none;
        box-shadow: none;
        background: rgba(151, 176, 2, 0.05);
        border-radius: 8px;
        margin-top: 0.25rem;
        margin-left: 1rem;
        min-width: auto;
        width: calc(100% - 2rem);
        position: static !important;
        transform: none !important;
    }

    .dropdown-item {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .dropdown-divider {
        margin: 0.25rem 0.5rem;
    }

    /* Collapsed navbar show state (vanilla JS toggles .show) */
    .navbar-collapse.show {
        display: block !important;
    }
}

/* Active States */
.nav-item.dropdown.show .nav-link {
    color: #97b002 !important;
    background-color: rgba(151, 176, 2, 0.08);
}

.nav-item.dropdown {
    position: relative;
}

/* Hover Effects for Desktop */
@media (min-width: 992px) {

    /* Create invisible bridge between nav item and dropdown */
    .dropdown::before {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: 2px;
        background: transparent;
        z-index: 999;
    }
}

/* Navbar Brand Adjustments */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #97b002 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: #7a9002 !important;
    transform: translateY(-1px);
}

/* Navigation Container */
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Responsive Adjustments */
@media (max-width: 575.98px) {
    .navbar {
        padding: 0.75rem 0;
    }

    .nav-link {
        font-size: 0.9rem;
    }
}

.query-hero {
    min-height: 305.77px;
}

.query-hero {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 2rem;
    padding: 28px 16px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.96) 100%);
    border: 1px solid rgba(151, 176, 2, 0.15);
    backdrop-filter: saturate(120%) blur(6px);
    -webkit-backdrop-filter: saturate(120%) blur(6px);
}

.query-hero::before {
    content: "";
    position: absolute;
    inset: -40% -30% -40% -30%;
    background: radial-gradient(220px 220px at 12% 18%, rgba(151, 176, 2, 0.35), transparent 60%), radial-gradient(260px 260px at 82% 12%, rgba(122, 143, 2, 0.30), transparent 60%), radial-gradient(300px 300px at 58% 85%, rgba(151, 176, 2, 0.25), transparent 60%);
    filter: blur(44px);
    opacity: 0.6;
    transform: translateZ(0);
    pointer-events: none;
    z-index: 0;
}

.query-hero::after {
    content: "";
    position: absolute;
    top: -30%;
    bottom: -30%;
    left: -28%;
    width: 55%;
    background: radial-gradient(360px 360px at 0% 50%, rgba(151, 176, 2, 0.30), transparent 60%), radial-gradient(240px 240px at 18% 70%, rgba(122, 143, 2, 0.22), transparent 60%);
    filter: blur(48px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.query-hero .query-title,
.query-hero .query-description,
.query-hero .search-stats {
    position: relative;
    z-index: 1;
}

.stat-item {
    display: inline-block;
    margin: 0 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}