@font-face {
    font-family: 'Urbanist';
    src: url('/fonts/Urbanist-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Urbanist';
    src: url('/fonts/Urbanist-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --main-color: #2e474b;
    --side-color1: #499ea1;
    --side-color2: #7FC7D9;
    --background: #DCF2F1;
    --background-dark: #0F1035;
    --font-color: rgba(0, 0, 0, 0.87);
}


/* Custom background and button classes using main color */

.bg-main {
    background-color: var(--main-color) !important;
    color: white !important;
}

.btn-outline-main {
    color: var(--main-color);
    border: 2px solid var(--main-color);
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-outline-main:hover,
.btn-outline-main:focus {
    color: white;
    background-color: var(--main-color);
    border-color: var(--main-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 71, 75, 0.2);
}

.btn-outline-main:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(46, 71, 75, 0.2);
}

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

body {
    font-family: 'Urbanist', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--font-color);
    min-height: 100vh;
    /*position: relative;*/
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--side-color2) 0%, transparent 70%);
    z-index: -1;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.app-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 0.5s ease-out;
}


/* Floating account header container for Home page welcome */

.floating-account-header-container {
    position: absolute;
    top: 28px;
    right: 80px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    padding: 7px 18px 7px 18px;
    min-width: 0;
    max-width: 98vw;
}

.floating-account-hello {
    font-size: 1.08rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

@media (max-width: 860px) {
    .logo-container {
        margin-top: 50px;
    }
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
}

.logo {
    max-width: 200px;
    height: auto;
    animation: scaleIn 0.5s ease-out;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-input-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

#searchInput,
#articleSearchInput,
#hospitalSearchInput {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    /* Changed from 8px to 50px for pill shape */
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

#searchInput:focus,
#articleSearchInput:focus,
#hospitalSearchInput:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(var(--side-color2-rgb), 0.1);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--main-color);
    font-size: 1.2rem;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease;
    display: none;
}

.search-icon.hidden {
    opacity: 0;
}

/* Animated search border during loading */
@keyframes searchBorderGradient {
    0% {
        border-color: #667eea;
        box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
    }

    25% {
        border-color: #764ba2;
        box-shadow: 0 0 12px rgba(118, 75, 162, 0.6);
    }

    50% {
        border-color: #f093fb;
        box-shadow: 0 0 16px rgba(240, 147, 251, 0.7);
    }

    75% {
        border-color: #f5576c;
        box-shadow: 0 0 12px rgba(245, 87, 108, 0.6);
    }

    100% {
        border-color: #667eea;
        box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
    }
}

.search-input-container.search-loading {
    border: 2px solid #667eea;
    border-radius: 50px;
    animation: searchBorderGradient 1.5s ease-in-out infinite;
}

.search-input-container.search-loading #searchInput {
    border: none;
}

.animated-slogan {
    height: 25px;
    /* Adjust based on font size */
    width: 100%;
    overflow: hidden;
    text-align: center;
    margin-top: 10px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--main-color);
    position: relative;
}

.slogan-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.slogan-text.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Premium Contact Section Styles --- */

.premium-contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.premium-contact-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(80, 112, 255, 0.10), 0 1.5px 6px rgba(0, 0, 0, 0.04);
    padding: 2rem 2.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
    min-width: 320px;
    max-width: 540px;
    width: 100%;
    border: 2px solid #e0e7ff;
}

.premium-contact-card:focus,
.premium-contact-card:hover {
    box-shadow: 0 8px 32px rgba(80, 112, 255, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px) scale(1.02);
    border-color: #6366f1;
}

.premium-contact-card.premium {
    background: linear-gradient(135deg, #f0fff4 0%, #bbf7d0 100%);
    border-color: #34d399;
}

.premium-contact-icon {
    background: #6366f1;
    color: #fff;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.10);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.premium-contact-card.premium .premium-contact-icon {
    background: #34d399;
    color: #fff;
    box-shadow: 0 2px 8px rgba(52, 211, 153, 0.10);
}

.premium-contact-content {
    flex: 1;
}

.premium-contact-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #3730a3;
}

.premium-contact-card.premium .premium-contact-title {
    color: #059669;
}

.premium-contact-desc {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 0;
}

.premium-contact-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
    background: #e0e7ff;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

.premium-contact-link:hover,
.premium-contact-link:focus {
    background: #6366f1;
    color: #fff;
    text-decoration: underline;
}

/* Popular Tools Section */
.popular-tools-container {
    margin-top: -180px;
    padding: 20px;
    background: none;
    border-radius: 15px;
    box-shadow: none;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.popular-tools-title {
    font-size: 1.8em;
    color: var(--main-color);
    margin-bottom: 25px;
    font-weight: 700;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    justify-content: center;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--font-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 15px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tool-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--side-color1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2em;
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-title {
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    color: var(--main-color);
}

@media (max-width: 768px) {
    .popular-tools-title {
        font-size: 1.5em;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .tool-item {
        padding: 10px;
    }

    .tool-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8em;
        margin-bottom: 8px;
    }

    .tool-title {
        font-size: 0.9em;
    }
}

/* Desktop Navigation Label */
.floating-account {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.paracetamol-calculator-container {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.paracetamol-calculator-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--side-color1);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.paracetamol-calculator-button:hover {
    background-color: var(--side-color2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.paracetamol-calculator-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.paracetamol-calculator-button i {
    margin-right: 0.5rem;
}

.account-btn {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.selected-account-label {
    color: var(--main-color);
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    /* Adjust as needed */
    display: none;
    /* Hidden by default, shown by JS */
}

/* Mobile Navigation Labels */
.floating-bottom-nav-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    /* Align items to the bottom */
    gap: 15px;
}

.nav-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    color: var(--main-color);
    font-size: 1.4rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding-top: 5px;
    /* Adjust padding to make space for label */
}

.nav-icon.active,
.nav-icon:hover {
    background-color: var(--main-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.nav-icon-label {
    position: absolute;
    bottom: -25px;
    /* Position below the circle */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--main-color);
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-icon.active .nav-icon-label {
    opacity: 1;
}

@media (min-width: 768px) {
    .floating-bottom-nav-container {
        bottom: 20px;
        left: 20px;
        /* Adjust for desktop positioning */
        transform: translateX(0);
        flex-direction: row;
        /* Arrange horizontally */
        align-items: center;
    }

    .nav-icon-label {
        display: none;
        /* Hide mobile labels on desktop */
    }
}

@media (max-width: 767px) {
    .floating-account .selected-account-label {
        display: none;
        /* Hide desktop account label on mobile */
    }
}

/* Desktop Navigation Label */
.floating-account {
    position: relative;
}

.selected-account-label {
    position: absolute;
    right: -120px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--main-color);
    font-weight: 600;
    display: none;
}

.account-btn.active+.selected-account-label {
    display: block;
}

/* Mobile Navigation Labels */
.nav-icon {
    position: relative;
}

.nav-icon-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--main-color);
    display: none;
}

.nav-icon.active .nav-icon-label {
    display: block;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.suggestion-item:hover {
    background-color: var(--background);
}

.suggestion-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    color: var(--main-color);
}

.suggestion-subtitle {
    font-size: 0.9rem;
    color: var(--side-color1);
}

.suggestion-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--side-color1);
    margin-top: 0.25rem;
}

.suggestion-type {
    background-color: var(--background);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.suggestion-id {
    opacity: 0.8;
}

.medicine-details,
.ingredients-list {
    margin-top: 2rem;
    animation: slideUp 0.5s ease-out;
}

.medicine-card,
.ingredient-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.medicine-card:hover,
.ingredient-card:hover {
    transform: translateY(-5px);
}

.details-button {
    align-self: flex-start;
    background: var(--main-color);
    color: var(--background);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1.1rem;
}

.details-button:hover {
    background: var(--main-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.details-button i {
    font-size: 1.2rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: var(--background);
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--side-color1);
}

.medicine-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    background: var(--background);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin: 2rem 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.medicine-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, transparent 100%);
    opacity: 0.05;
    z-index: 0;
}

.medicine-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.medicine-image-container {
    width: 250px;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--side-color2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.medicine-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.medicine-image:hover {
    transform: scale(1.1);
}

.medicine-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--side-color1);
    background: linear-gradient(135deg, var(--side-color2) 0%, var(--background) 100%);
    transition: all 0.3s ease;
}

.medicine-image-placeholder i {
    opacity: 0.4;
    transition: all 0.3s ease;
}

.medicine-image-placeholder:hover i {
    transform: scale(1.1);
    opacity: 0.6;
}

.placeholder-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--side-color1);
    text-align: center;
}

.medicine-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.medicine-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.medicine-title {
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.medicine-type {
    background: var(--main-color);
    color: var(--background);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.medicine-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.8);
}

.info-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    color: var(--side-color1);
    font-size: 0.9rem;
    font-weight: 500;
}

.info-value {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .medicine-card {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .medicine-image-container {
        margin: auto
    }

    .medicine-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .medicine-type {
        align-self: flex-start;
    }
}

.medicine-full-details {
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: 12px;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
}

.medicine-full-details .medicine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.medicine-full-details h2 {
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.medicine-full-details .medicine-type {
    background: var(--main-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.medicine-full-details .details-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.medicine-full-details .detail-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.medicine-full-details .detail-item {
    flex: 1;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    overflow: hidden;
}

.medicine-full-details .detail-item.full-width {
    flex: 1 1 100%;
    max-width: 100%;
}

.medicine-full-details .detail-item:hover {
    background: rgba(255, 255, 255, 0.8);
}

.medicine-full-details .detail-label {
    display: block;
    color: var(--side-color1);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.medicine-full-details .detail-value {
    display: block;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
}

.medicine-full-details .detail-value.wrap-text {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.medicine-full-details .additional-details {
    margin-top: 1rem;
}

.medicine-full-details .additional-details h3 {
    font-size: 1.8rem;
    color: var(--main-color);
    margin: 2rem 0 1rem;
    padding: 0 1rem;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.medicine-full-details .additional-details h3::before,
.medicine-full-details .additional-details h3::after {
    content: "";
    flex: 1;
    height: 2px;
    background: var(--main-color);
    margin: 0 1rem;
}

.medicine-full-details .additional-details .details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.medicine-full-details .detail-value.html-content {
    line-height: 1.6;
}

.medicine-full-details .detail-value.html-content p {
    margin: 0 0 0.5rem 0;
}

.medicine-full-details .detail-value.html-content p:last-child {
    margin-bottom: 0;
}

.medicine-full-details .detail-value.html-content ul,
.medicine-full-details .detail-value.html-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.medicine-full-details .detail-value.html-content li {
    margin-bottom: 0.25rem;
}

.medicine-full-details .detail-value.html-content a {
    color: var(--contrast-color);
    text-decoration: none;
}

.medicine-full-details .detail-value.html-content a:hover {
    text-decoration: underline;
}

.medicine-full-details .detail-value.html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
}

.medicine-full-details .detail-value.html-content th,
.medicine-full-details .detail-value.html-content td {
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.medicine-full-details .detail-value.html-content th {
    background: rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

@media (max-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    .medicine-full-details .detail-row {
        flex-direction: column;
    }

    .medicine-full-details .detail-item {
        min-width: 100%;
    }

    .medicine-full-details .additional-details .details-grid {
        grid-template-columns: 1fr;
    }
}

.ingredient-details {
    background-color: var(--background);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.ingredient-details h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
}

.detail-item {
    background: var(--background);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    display: block;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.detail-value {
    color: var(--font-color);
    line-height: 1.5;
}

.wrap-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.html-content {
    line-height: 1.6;
}

.html-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.html-content li {
    margin-bottom: 0.25rem;
}


/* Animations */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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


/* Responsive Design */

@media (max-width: 1024px) {
    .ingredient-card {
        background: white;
        border-radius: 15px;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        position: relative;
        overflow: hidden;
    }

    .ingredient-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--side-color2);
        transition: all 0.3s ease;
    }

    .ingredient-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    .ingredient-card:hover::before {
        width: 6px;
        background: var(--side-color1);
    }

    .ingredient-title {
        font-size: 1.3rem;
        font-weight: 600;
        color: var(--main-color);
        margin: 0;
        line-height: 1.3;
        word-break: break-word;
    }

    .ingredient-info {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .ingredient-info .info-item {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
        background: var(--background);
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .ingredient-info .info-item:hover {
        background: rgba(var(--side-color2-rgb), 0.1);
        transform: translateX(5px);
    }

    .ingredient-info .info-icon {
        font-size: 1.3rem;
        color: var(--side-color1);
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .ingredient-info .info-content {
        flex: 1;
        min-width: 0;
    }

    .ingredient-info .info-label {
        font-size: 0.95rem;
        color: var(--side-color1);
        margin-bottom: 0.25rem;
        font-weight: 500;
    }

    .ingredient-info .info-value {
        font-size: 1.1rem;
        color: var(--main-color);
        line-height: 1.4;
        word-break: break-word;
    }

    .ingredient-details {
        background: white;
        border-radius: 15px;
        padding: 2rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    .ingredient-details:hover {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    .ingredient-details h2 {
        font-size: 1.8rem;
        color: var(--main-color);
        margin-bottom: 1.5rem;
        position: relative;
        padding-bottom: 1rem;
        font-weight: 600;
    }

    .ingredient-details h2::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 80px;
        height: 4px;
        background: var(--side-color2);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .ingredient-details:hover h2::after {
        width: 120px;
        background: var(--side-color1);
    }

    .app-container {
        padding: 1.5rem;
    }

    .search-container {
        max-width: 500px;
    }

    .medicine-card,
    .ingredient-card {
        padding: 1.25rem;
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ingredient-card {
        padding: 1.25rem;
    }

    .ingredient-details {
        padding: 1.5rem;
    }

    .ingredient-details h2 {
        font-size: 1.5rem;
    }

    .ingredient-info {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
    }

    .logo {
        max-width: 150px;
    }

    #searchInput,
    #hospitalSearchInput {
        font-size: 1rem;
        padding: 0.875rem 2.5rem 0.875rem 1.25rem;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 1.25rem;
    }

    .medicine-card {
        padding: 1rem;
    }

    /*.medicine-image-container {
        width: 120px;
        height: 120px;
    }*/
    .medicine-info {
        gap: 0.75rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .medicine-full-details .detail-row {
        flex-direction: column;
    }

    .medicine-full-details .detail-item {
        width: 100%;
    }

    .medicine-full-details .additional-details .details-grid {
        grid-template-columns: 1fr;
    }

    .suggestion-item {
        padding: 0.875rem;
    }

    .suggestion-icon {
        font-size: 1.25rem;
    }

    .suggestion-title {
        font-size: 0.95rem;
    }

    .suggestion-subtitle {
        font-size: 0.85rem;
    }

    .ingredient-card {
        padding: 1rem;
        border-radius: 8px;
        position: relative;
    }

    .ingredient-content {
        display: flex;
        flex-direction: column;
        align-items: start !important;
        gap: 0.75rem;
    }

    .ingredient-title {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--main-color);
        margin: 0;
        line-height: 1.3;
    }

    .ingredient-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }

    .ingredient-info .info-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        background-color: var(--background);
        padding: 0.75rem 1rem;
        border-radius: 8px;
        border: 2px solid var(--side-color2);
        width: 100%;
    }

    .ingredient-info .info-icon {
        color: var(--side-color1);
        font-size: 1.1rem;
    }

    .ingredient-info .info-content {
        display: flex;
        align-items: center;
    }

    .ingredient-info .info-value {
        font-size: 1rem;
        color: var(--side-color1);
    }

    .ingredient-card .details-button {
        position: absolute;
        right: 1rem;
        top: 1rem;
        background-color: transparent;
        color: var(--side-color1);
        border: none;
        width: 24px;
        height: 24px;
        padding: 0;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ingredient-card .details-button:hover {
        color: var(--main-color);
        transform: scale(1.1);
    }

    .ingredient-card .details-button i {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .medicine-full-details {
        padding: 0.5rem;
    }

    .app-container {
        padding: 0.75rem;
    }

    .logo {
        max-width: 120px;
    }

    .medicine-card,
    .ingredient-card {
        padding: 0.875rem;
        margin-bottom: 0.75rem;
    }

    /*.medicine-image-container {
        width: 100px;
        height: 100px;
    }*/
    .medicine-title {
        font-size: 1.1rem;
    }

    .medicine-type {
        font-size: 0.85rem;
    }

    .info-item {
        padding: 0.5rem;
    }

    .info-icon {
        font-size: 1rem;
    }

    .info-label {
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.9rem;
    }

    .details-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .details-button i {
        font-size: 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1rem;
    }

    .suggestion-item {
        padding: 0.75rem;
    }

    .suggestion-icon {
        font-size: 1.1rem;
    }

    .suggestion-title {
        font-size: 0.9rem;
    }

    .suggestion-subtitle {
        font-size: 0.8rem;
    }

    .suggestion-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .ingredient-card {
        padding: 0.875rem;
        margin-bottom: 0.75rem;
        border-radius: 6px;
    }

    .ingredient-content {
        gap: 0.75rem;
    }

    .ingredient-title {
        font-size: 1.1rem;
        min-width: 120px;
    }

    .ingredient-info {
        gap: 0.625rem;
    }

    .ingredient-info .info-item {
        padding: 0.625rem;
        gap: 0.625rem;
        border-width: 1.5px;
    }

    .ingredient-details {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .ingredient-details h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .ingredient-details h2::after {
        width: 50px;
        height: 2px;
        left: 0.875rem;
    }

    .ingredient-details .ingredient-info {
        gap: 0.625rem;
        padding: 0 0.875rem;
    }

    .ingredient-details .info-item {
        padding: 0.625rem;
        gap: 0.625rem;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .ingredient-details .info-item:hover {
        transform: none;
        background: rgba(var(--side-color2-rgb), 0.05);
    }

    .ingredient-details .info-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }

    .ingredient-details .info-label {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }

    .ingredient-details .info-value {
        font-size: 0.95rem;
    }

    /* Hide details on larger screens */
    @media (min-width: 481px) {
        .ingredient-details {
            display: none;
        }
    }
}

@media (max-width: 360px) {
    .app-container {
        padding: 0.5rem;
    }

    .logo {
        max-width: 100px;
    }

    #searchInput,
    #hospitalSearchInput {
        font-size: 0.9rem;
        padding: 0.75rem 2rem 0.75rem 1rem;
    }

    /*.medicine-image-container {
        width: 80px;
        height: 80px;
    }*/
    .medicine-title {
        font-size: 1rem;
    }

    .medicine-type {
        font-size: 0.8rem;
    }

    .details-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .ingredient-card {
        padding: 0.75rem;
        margin-bottom: 0.625rem;
        border-radius: 4px;
    }

    .ingredient-content {
        gap: 0.625rem;
    }

    .ingredient-title {
        font-size: 1rem;
        min-width: 100px;
    }

    .ingredient-info {
        gap: 0.5rem;
    }

    .ingredient-info .info-item {
        padding: 0.5rem;
        gap: 0.5rem;
        border-width: 1.5px;
    }

    .ingredient-info .info-icon {
        font-size: 0.9rem;
    }

    .ingredient-info .info-label {
        font-size: 0.8rem;
    }

    .ingredient-info .info-value {
        font-size: 0.9rem;
    }

    .ingredient-details {
        padding: 0;
    }

    .ingredient-details h2 {
        font-size: 1.15rem;
        margin-bottom: 0.875rem;
        padding-bottom: 0.625rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .ingredient-details h2::after {
        width: 40px;
        height: 2px;
        left: 0.75rem;
    }

    .ingredient-details .ingredient-info {
        gap: 0.5rem;
        padding: 0 0.75rem;
    }

    .ingredient-details .info-item {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .ingredient-details .info-icon {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.9rem;
    }

    .ingredient-details .info-label {
        font-size: 0.8rem;
        margin-bottom: 0.15rem;
    }

    .ingredient-details .info-value {
        font-size: 0.9rem;
    }

    .ingredient-card .details-button {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
}

.medicine-card h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--font-color);
    font-weight: 600;
}

.medicine-full-details .medicine-header h2 {
    margin: 0;
    font-size: 2rem;
    color: var(--font-color);
    font-weight: 600;
}

.ingredient-details-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.ingredient-details-container:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.ingredient-details {
    margin: 0;
}

.ingredient-details h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--main-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.ingredient-details h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--side-color2);
    border-radius: 2px;
}

.ingredient-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.ingredient-info .info-item {
    background: var(--background);
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.ingredient-info .info-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ingredient-info .info-icon {
    color: var(--side-color1);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.ingredient-info .info-content {
    flex: 1;
}

.ingredient-info .info-label {
    font-size: 0.9rem;
    color: var(--side-color1);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.ingredient-info .info-value {
    font-size: 1.1rem;
    color: var(--main-color);
    font-weight: 500;
}

.ingredient-card {
    background-color: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.ingredient-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ingredient-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ingredient-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.ingredient-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--main-color);
    margin: 0;
    min-width: 200px;
}

.ingredient-info .info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--background);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--side-color2);
}

.ingredient-info .info-icon {
    color: var(--side-color1);
    font-size: 0.9rem;
}

.ingredient-info .info-content {
    display: flex;
    align-items: center;
}

.ingredient-info .info-value {
    font-size: 0.9rem;
    color: var(--side-color1);
}

.ingredient-card .details-button {
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.ingredient-card .details-button:hover {
    background-color: var(--side-color2);
    transform: translateY(-1px);
}

.ingredient-card .details-button i {
    font-size: 1rem;
}


/*#ingredientDetails_@Model.Id {
    margin-top: 1.5rem;
}*/

.ingredient-details {
    background-color: var(--background);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.ingredient-details:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.ingredient-details h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--main-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.ingredient-details h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--side-color2);
    border-radius: 2px;
}

.ingredient-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}


/* Tablet and smaller desktop */

@media (max-width: 1024px) {
    .ingredient-card {
        padding: 1.25rem;
    }

    .ingredient-content {
        gap: 1rem;
    }

    .ingredient-title {
        font-size: 1.25rem;
    }

    .ingredient-info .info-item {
        padding: 0.875rem;
    }

    .ingredient-info .info-icon {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.2rem;
    }

    .ingredient-details {
        padding: 1.75rem;
    }

    .ingredient-details h2 {
        font-size: 1.6rem;
        margin-bottom: 1.25rem;
    }
}


/* Tablet */

@media (max-width: 768px) {
    .ingredient-card {
        padding: 1rem;
    }

    .ingredient-content {
        gap: 0.875rem;
    }

    .ingredient-title {
        font-size: 1.2rem;
    }

    .ingredient-info {
        gap: 0.75rem;
    }

    .ingredient-info .info-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .ingredient-info .info-icon {
        width: 2rem;
        height: 2rem;
        font-size: 1.1rem;
    }

    .ingredient-info .info-label {
        font-size: 0.9rem;
    }

    .ingredient-info .info-value {
        font-size: 1rem;
    }

    .ingredient-details {
        padding: 1.5rem;
    }

    .ingredient-details h2 {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.875rem;
    }

    .ingredient-details h2::after {
        width: 60px;
        height: 3px;
    }
}


/* Mobile */

@media (max-width: 480px) {
    .ingredient-card {
        padding: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .ingredient-content {
        gap: 0.75rem;
    }

    .ingredient-title {
        font-size: 1.1rem;
    }

    .ingredient-info {
        gap: 0.625rem;
    }

    .ingredient-info .info-item {
        padding: 0.625rem;
        gap: 0.625rem;
    }

    .ingredient-info .info-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }

    .ingredient-info .info-label {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }

    .ingredient-info .info-value {
        font-size: 0.95rem;
    }

    .ingredient-details {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .ingredient-details h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .ingredient-details h2::after {
        width: 50px;
        height: 2px;
        left: 0.875rem;
    }

    .ingredient-details .ingredient-info {
        gap: 0.625rem;
        padding: 0 0.875rem;
    }

    .ingredient-details .info-item {
        padding: 0.625rem;
        gap: 0.625rem;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .ingredient-details .info-item:hover {
        transform: none;
        background: rgba(var(--side-color2-rgb), 0.05);
    }

    .ingredient-details .info-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }

    .ingredient-details .info-label {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }

    .ingredient-details .info-value {
        font-size: 0.95rem;
    }

    /* Hide details on larger screens */
    @media (min-width: 481px) {
        .ingredient-details {
            display: none;
        }
    }
}


/* Small mobile devices */

@media (max-width: 360px) {
    .ingredient-card {
        padding: 0.75rem;
        margin-bottom: 0.625rem;
    }

    .ingredient-content {
        gap: 0.625rem;
    }

    .ingredient-title {
        font-size: 1rem;
    }

    .ingredient-info {
        gap: 0.5rem;
    }

    .ingredient-info .info-item {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .ingredient-info .info-icon {
        font-size: 0.9rem;
    }

    .ingredient-info .info-label {
        font-size: 0.8rem;
        margin-bottom: 0.15rem;
    }

    .ingredient-info .info-value {
        font-size: 0.9rem;
    }

    .ingredient-details {
        padding: 0;
    }

    .ingredient-details h2 {
        font-size: 1.15rem;
        margin-bottom: 0.875rem;
        padding-bottom: 0.625rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .ingredient-details h2::after {
        width: 40px;
        height: 2px;
        left: 0.75rem;
    }

    .ingredient-details .ingredient-info {
        gap: 0.5rem;
        padding: 0 0.75rem;
    }

    .ingredient-details .info-item {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .ingredient-details .info-icon {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.9rem;
    }

    .ingredient-details .info-label {
        font-size: 0.8rem;
        margin-bottom: 0.15rem;
    }

    .ingredient-details .info-value {
        font-size: 0.9rem;
    }

    .ingredient-card .details-button {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
}


/* Search bar styles */

.search-input-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

#searchInput,
#hospitalSearchInput {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    /* Changed from 8px to 50px for pill shape */
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

#searchInput:focus,
#hospitalSearchInput:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(var(--side-color2-rgb), 0.1);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--main-color);
    font-size: 1.2rem;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.search-icon.hidden {
    opacity: 0;
}

.clear-button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--side-color1);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 24px;
    height: 24px;
}

.scan-code-button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--main-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 30px;
    height: 30px;
}

.clear-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--main-color);
}


/* Floating Account Icon */

.floating-account {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 50;
}

.account-btn {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s;
}

.account-btn:focus,
.account-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.floating-account .dropdown-menu {
    min-width: 180px;
    margin-top: 10px;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    animation-duration: 0.3s;
}

.floating-account .dropdown-menu .dropdown-item {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    color: var(--main-color);
    transition: background-color 0.2s ease;
}

.floating-account .dropdown-menu .dropdown-item:hover {
    background-color: var(--background);
    color: var(--main-color);
}

.floating-account .dropdown-menu .dropdown-item i {
    font-size: 1.2rem;
    width: 1.5rem;
    text-align: center;
}


/* Floating Bottom Nav Container */

.floating-bottom-nav-container {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    z-index: 500;
    gap: 1.2rem;
}


/* Floating Bottom Navigation */

.floating-bottom-nav {
    background: rgba(220, 242, 241, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 0.5rem 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    transition: box-shadow 0.3s, border-color 0.3s, backdrop-filter 0.3s;
    position: relative;
}

.floating-bottom-nav .nav-icon {
    color: var(--main-color);
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-bottom-nav .nav-icon:hover,
.floating-bottom-nav .nav-icon:focus {
    background: var(--main-color);
    color: var(--background);
    transform: scale(1.15);
}

.floating-bottom-nav .nav-icon.active {
    background: var(--main-color);
    color: var(--background);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: scale(0.8);
    bottom: 9px;
}


/* Floating Report Button (beside nav) */

.floating-report-btn {
    background: rgba(220, 242, 241, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--main-color);
    font-weight: bold;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 0.5px solid rgba(255, 255, 255, 0.3);
}

.floating-report-btn:hover,
.floating-report-btn:focus {
    background: var(--main-color);
    color: var(--background);
    transform: scale(1.15);
    border-color: var(--main-color);
}

@media (max-width: 600px) {
    .floating-bottom-nav-container {
        bottom: 12px;
        gap: 0.5rem;
    }

    .floating-bottom-nav {
        padding: 0.5rem 0.5rem;
        gap: 1rem;
    }

    .floating-report-btn {
        width: 40px;
        height: 40px;
        font-size: 2.2rem;
        padding: 1px;
    }

    .floating-bottom-nav .nav-icon {
        font-size: 1.2rem;
        padding: 0.4rem;
    }
}

.site-account-btn {
    background: var(--main-color) !important;
    color: var(--background) !important;
    border: 2px solid var(--side-color2) !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.site-account-btn:hover,
.site-account-btn:focus {
    background: var(--side-color2) !important;
    color: var(--main-color) !important;
    border-color: var(--main-color) !important;
    box-shadow: 0 4px 16px rgba(15, 16, 53, 0.15);
}

.site-report-btn {
    background: var(--side-color1) !important;
    color: var(--background) !important;
    border: 2px solid var(--side-color2) !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.site-report-btn:hover,
.site-report-btn:focus {
    background: var(--side-color2) !important;
    color: var(--main-color) !important;
    border-color: var(--main-color) !important;
    box-shadow: 0 4px 16px rgba(127, 199, 217, 0.15);
}

.logout-form {
    margin: 0;
    padding: 0;
}

.logout-form button[type="submit"] {
    background: none;
    border: none;
    color: inherit;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.logout-form button[type="submit"]:hover,
.logout-form button[type="submit"]:focus {
    background: var(--background);
}

main {
    margin-bottom: 100px;
}

.modal-backdrop {
    display: none;
}


/* Desktop: Move bottom nav to left side, vertical */

@media (min-width: 992px) {
    .floating-bottom-nav-container {
        position: fixed;
        top: 50%;
        left: 36px;
        transform: translateY(-50%);
        z-index: 500;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        pointer-events: none;
        /* animation: nav-slide-in 0.8s cubic-bezier(.68, -0.55, .27, 1.55); */
    }

    @keyframes nav-slide-in {
        from {
            left: -100px;
            opacity: 0;
        }

        to {
            left: 36px;
            opacity: 1;
        }
    }

    .floating-bottom-nav {
        flex-direction: column !important;
        border-radius: 2.5rem;
        padding: 1.2rem 0.6rem;
        width: 72px;
        min-height: 320px;
        align-items: center;
        justify-content: flex-start;
        pointer-events: auto;
        background: rgba(255, 255, 255, 0.18);
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1.5px solid rgba(255, 255, 255, 0.24);
        transition: box-shadow 0.3s;
        gap: 18px;
    }

    .floating-bottom-nav:hover {
        box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.28);
    }

    .floating-bottom-nav .nav-icon {
        margin: 0;
        font-size: 2rem;
        color: #444;
        border-radius: 50%;
        width: 54px;
        height: 54px;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
        position: relative;
        cursor: pointer;
    }

    .floating-bottom-nav .nav-icon:hover,
    .floating-bottom-nav .nav-icon:focus {
        background: var(--side-color1);
        color: #fff;
        box-shadow: 0 0 16px var(--side-color1);
        transform: scale(1.13) rotate(-8deg);
    }

    /* Tooltip effect */
    .floating-bottom-nav .nav-icon[title]::after {
        content: attr(title);
        position: absolute;
        left: 50%;
        bottom: 120%;
        transform: translateX(-50%) scale(0.8);
        transform-origin: bottom center;
        opacity: 0;
        visibility: hidden;
        background-color: var(--main-color);
        color: white;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.9rem;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1000;
    }

    .floating-bottom-nav .nav-icon[title]::before {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 110%;
        transform: translateX(-50%) scale(0);
        transform-origin: top;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 6px solid var(--side-color1);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1000;
    }

    .floating-bottom-nav .nav-icon[title]:hover::before {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) scale(1);
    }

    .floating-bottom-nav .nav-icon[title]:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) scale(1);
        background: rgba(0, 0, 0, 0.85);
        color: #fff;
        padding: 5px 14px;
        border-radius: 7px;
        white-space: nowrap;
        font-size: 1rem;
        opacity: 1;
        pointer-events: none;
        z-index: 100;
    }

    .floating-report-btn {
        margin-left: 0 !important;
        margin-top: 28px !important;
        width: 54px;
        height: 54px;
        display: flex;
        justify-content: center;
        align-items: center;
        pointer-events: auto;
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
        border-radius: 50%;
        font-size: 3.5rem;
        transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    }

    .floating-report-btn:hover,
    .floating-report-btn:focus {
        box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.28);
        transform: scale(1.15) rotate(8deg);
    }
}

.tools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.tools-header {
    text-align: center;
    margin-bottom: 40px;
}

.tools-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
}

.tools-logo {
    text-decoration: none;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.tools-logo-img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.tools-header h1 {
    color: var(--main-color);
    font-size: 2.5rem;
    font-weight: 700 !important;
}

@media (max-width: 768px) {

    .tools-header h1 {
        font-size: 2rem;
    }
}

.hospital-header,
.articles-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(0, 123, 255, 0.10), 0 2px 8px rgba(0, 0, 0, 0.07);
    padding: 32px 38px 32px 38px;
    backdrop-filter: blur(12px) saturate(1.2);
    border: 1.5px solid #e3eaf7;
    position: relative;
    z-index: 10;
    gap: 24px;
}

.header-back {
    display: flex;
    align-items: center;
    margin-right: 24px;
}

.header-back-btn {
    background: linear-gradient(90deg, #e3f2fd 0%, #e0f7fa 100%);
    color: var(--main-color);
    border: none;
    border-radius: 12px;
    padding: 13px 22px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.07);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    outline: none;
}

.header-back-btn:hover,
.header-back-btn:focus {
    background: var(--main-color);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.13);
    transform: translateY(-2px) scale(1.04);
    text-decoration: none;
}

.header-title {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--main-color);
    letter-spacing: 1.2px;
    gap: 16px;
    text-shadow: 0 2px 8px rgba(0, 123, 255, 0.04);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 123, 255, 0.07);
    padding: 0 0 0 10px;
    border: 1.5px solid #e3eaf7;
    transition: box-shadow 0.2s, border 0.2s;
}

.header-search:focus-within {
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.13);
    border: 1.5px solid var(--main-color);
}

.hospital-actions {
    display: flex;
    gap: 18px;
    align-items: center;
}

.sort-nearest-btn {
    position: fixed;
    bottom: 110px;
    right: 20px;
    z-index: 1050;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--main-color);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.sort-nearest-btn:hover {
    background: var(--side-color1);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: white;
}

.sort-nearest-btn i {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.sort-nearest-btn .btn-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
}

.sort-nearest-btn.btn-success {
    background-color: #198754 !important;
}

.sorting-toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2e474b;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    z-index: 2000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.sorting-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.sorting-toast i {
    color: #34d399;
    font-size: 1.2rem;
}

.hospitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(370px, 1fr));
    gap: 28px;
    margin-top: 30px;
    align-items: stretch;
}

.hospital-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e9f5ff 100%);
    border-radius: 20px;
    box-shadow: 0 6px 32px rgba(0, 123, 255, 0.10), 0 2px 8px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(.4, 2, .6, 1), box-shadow 0.25s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 420px;
    animation: fadeInUp 0.7s;
    border: 1.5px solid #e3eaf7;
}

.hospital-card:hover {
    transform: translateY(-10px) scale(1.035);
    box-shadow: 0 16px 48px rgba(0, 123, 255, 0.13), 0 4px 16px rgba(0, 0, 0, 0.10);
    z-index: 2;
}

.hospital-image,
.hospital-no-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    background: #f4f6fa;
    border-bottom: 1px solid #f0f0f0;
    transition: filter 0.3s, border-radius 0.3s;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: block;
    margin: 0 auto;
}

.hospital-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
}

.hospital-card-body {
    padding: 28px 22px 18px 22px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hospital-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.hospital-phones {
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hospital-phones .badge {
    font-size: 1rem;
    background: linear-gradient(90deg, #e3f2fd 0%, #e0f7fa 100%);
    color: var(--main-color);
    border-radius: 8px;
    padding: 7px 15px;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0, 123, 255, 0.07);
    border: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.hospital-phones .badge:hover {
    background: var(--main-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.13);
}

.hospital-location {
    margin-bottom: 10px;
}

.hospital-location-btn {
    background: linear-gradient(90deg, #17a2b8 0%, var(--main-color) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    margin-top: 7px;
    box-shadow: 0 1px 6px rgba(23, 162, 184, 0.10);
}

.hospital-location-btn:hover {
    background: linear-gradient(90deg, #138496 0%, #0056b3 100%);
    transform: translateY(-2px) scale(1.05);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(23, 162, 184, 0.13);
}

.hospital-no-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f4f6fa 0%, #e3eaf7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 2.7rem;
    border-bottom: 1px solid #f0f0f0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

.hospital-empty-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    padding: 60px 40px;
    text-align: center;
    margin-top: 20px;
}

.hospital-empty-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.hospital-empty-title {
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
}

.hospital-empty-message {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.5;
}

.hospital-empty-message a {
    color: var(--main-color);
    text-decoration: none;
    font-weight: 500;
}

.hospital-empty-message a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .hospitals-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hospital-image,
    .hospital-no-image {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .hospital-card {
        min-height: 0;
        height: auto;
    }
}

@media (min-width: 992px) {
    .hospitals-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hospital-image,
    .hospital-no-image {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }

    .hospital-card {
        min-height: 0;
        height: auto;
    }
}

@media (max-width: 991px) {
    .hospitals-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hospital-image,
    .hospital-no-image {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .hospital-card {
        min-height: 0;
        height: auto;
    }

    /* Handled in combined media query below */
}

@media (max-width: 768px) {
    .hospitals-grid {
        grid-template-columns: 1fr;
    }
}


/* Make hospital rating stars wrap if needed */

.hospital-rating-stars {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    min-height: 24px;
}

@media (min-width: 1000px) and (max-height: 850px) {
    .floating-bottom-nav-container {
        left: 16px;
        gap: 0.5rem;
    }

    .floating-bottom-nav {
        padding: 0.5rem 0.5rem;
        gap: 1rem;
        width: 56px;
        min-height: 220px;
    }

    .floating-bottom-nav .nav-icon {
        font-size: 1.3rem;
        width: 40px;
        height: 40px;
        padding: 0.3rem;
    }

    .floating-report-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

@media (max-height: 650px) {
    .floating-bottom-nav-container {
        left: 8px;
        gap: 0.3rem;
    }

    .floating-bottom-nav {
        padding: 0.3rem 0.3rem;
        gap: 0.5rem;
        width: 40px;
        min-height: 120px;
    }

    .floating-bottom-nav .nav-icon {
        font-size: 1rem;
        width: 28px;
        height: 28px;
        padding: 0.1rem;
    }

    .floating-report-btn {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
}

.custom-dropdown-menu {
    position: absolute;
    bottom: -30px;
    left: 80px;
    right: 0;
    z-index: 1050;
    min-width: 180px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.18);
    padding: 0.5rem 0;
    list-style: none;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s;
}

.custom-dropdown-menu .dropdown-item {
    padding: 0.75rem 1.5rem;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s, color 0.2s;
}

.custom-dropdown-menu .dropdown-item:hover {
    background: #f8f9fa;
    color: #764ba2;
}

@media (max-width: 1024px) {
    .custom-dropdown-menu {
        left: 40px;
        min-width: 150px;
        bottom: -24px;
    }
}

@media (max-width: 768px) {
    .custom-dropdown-menu {
        left: 20px;
        min-width: 120px;
        bottom: -18px;
    }
}

@media (max-width: 600px) {
    .custom-dropdown-menu {
        left: 10px;
        min-width: 100px;
        bottom: -10px;
    }
}

@media (max-width: 480px) {
    .custom-dropdown-menu {
        left: 8px;
        min-width: 90px;
        bottom: -8px;
    }
}

@media (max-width: 360px) {
    .custom-dropdown-menu {
        left: 4px;
        min-width: 70px;
        bottom: -6px;
    }
}

@media (min-width: 1000px) and (max-height: 850px) {
    .custom-dropdown-menu {
        left: 60px;
        min-width: 140px;
        bottom: -20px;
    }
}

@media (max-height: 650px) {
    .custom-dropdown-menu {
        left: 20px;
        min-width: 90px;
        bottom: -6px;
    }
}

@media (max-width: 991px) {
    .custom-dropdown-menu {
        bottom: 28px;
    }
}

@media (max-width: 768px) {
    .custom-dropdown-menu {
        bottom: 24px;
    }
}

@media (max-width: 600px) {
    .custom-dropdown-menu {
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .custom-dropdown-menu {
        bottom: 12px;
    }
}

@media (max-width: 360px) {
    .custom-dropdown-menu {
        bottom: 8px;
    }
}

@media (max-width: 991px) {
    .floating-bottom-nav .nav-icon {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s, color 0.2s, transform 0.2s;
    }
}

@media (max-width: 768px) {
    .floating-bottom-nav .nav-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 600px) {
    .floating-bottom-nav .nav-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .floating-bottom-nav .nav-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 360px) {
    .floating-bottom-nav .nav-icon {
        width: 28px;
        height: 28px;
    }
}

.scan-code-button {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    color: #333;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s;
    margin-left: 4px;
}

.scan-code-button:hover {
    background: rgba(240, 244, 255, 0.5);
    color: var(--main-color);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.12);
    border: 1.5px solid var(--side-color1);
}


/* Modal improvements for scanner */

#codeScannerModal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 34, 45, 0.35);
    backdrop-filter: blur(4px) saturate(120%);
    -webkit-backdrop-filter: blur(4px) saturate(120%);
    overflow: auto;
    transition: background 0.3s;
}

#codeScannerModal .modal-content {
    position: relative;
    margin: 60px auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82) 70%, rgba(230, 240, 255, 0.82) 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    padding: 32px 18px 18px 18px;
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalPopIn 0.25s cubic-bezier(.4, 2, .6, 1) 1;
}

@keyframes modalPopIn {
    0% {
        transform: scale(0.92) translateY(40px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

#codeScannerModal .close {
    position: absolute;
    top: 16px;
    right: 22px;
    font-size: 2em;
    color: #555;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
    transition: background 0.2s, color 0.2s;
}

#codeScannerModal .close:hover {
    background: #f0f4ff;
    color: var(--main-color);
}

#qr-reader {
    width: 100% !important;
    min-height: 250px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
}

#qr-reader-results {
    text-align: center;
    font-size: 1.1em;
    margin-top: 18px;
    color: #28a745;
    word-break: break-all;
}

@media (max-width: 600px) {
    .floating-account-header-container {
        display: none !important;
        pointer-events: none;
    }
}


/* Hide floating account header on mobile, show on hover/tap */

@media (max-width: 600px) {
    .floating-account-header-container {
        display: none !important;
        pointer-events: none;
    }

    body.show-account-header .floating-account-header-container {
        display: flex !important;
        pointer-events: auto;
    }
}

@media (max-width: 600px) {
    .top-header {
        flex-direction: column !important;
        align-items: start !important;
        padding: 10px;
    }

    .top-header .logo-with-text {
        margin-bottom: 1.2rem;
        margin-right: 0;
    }

    .top-header .search-container {
        margin-left: 0 !important;
        max-width: 100%;
        width: 100%;
    }
}

.top-header .logo {
    height: 64px;
    width: 64px;
    border-radius: 14px;
    transition: all 0.5s cubic-bezier(.4, 2, .6, 1);
}

.top-header .logo-text {
    font-size: 2.2em;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(.4, 2, .6, 1);
}


/* --- Animated header for Home/Index --- */

.animated-header {
    transition: all 0.6s cubic-bezier(.4, 2, .6, 1);
}

.centered-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    width: 100%;
    text-align: center;
}

.top-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-height: unset;
    padding: 32px 0 18px 32px;
    margin: 0;
    max-width: 100vw;
    width: 100%;
}

.logo-with-text {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo-text {
    font-size: 6em;
    font-weight: 900;
    color: var(--main-color);
    letter-spacing: 2.5px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
}

.logo {
    height: 140px;
    width: 140px;
    border-radius: 22px;
}

.search-container {
    width: 100%;
}

#mainHeader .search-container {
    margin-top: 1rem;
}

.centered-header .search-container {
    margin-top: 3.5rem;
}

.top-header .search-container {
    margin-top: 0;
    margin-left: 2.5rem;
    max-width: 600px;
}

@media (max-width: 600px) {
    .logo-text {
        font-size: 3.2em;
    }

    .logo {
        height: 80px;
        width: 80px;
    }

    .centered-header,
    .top-header {
        padding: 10px;
    }

    .centered-header .search-container {
        margin-top: 2rem;
    }
}

.toxofy-name {
    color: var(--main-color);
    font-size: 2rem;
}

@media (max-width: 991px) {
    .toxofy-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 500px) {
    .toxofy-name {
        display: none !important;
    }
}


/* Detail-item table: show as plain lines, no border/grid, number and text inline */

.detail-item table {
    width: 100%;
    border: none;
    background: none;
    box-shadow: none;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    display: block;
}

.detail-item table th,
.detail-item table td {
    display: inline;
    border: none !important;
    background: none !important;
    padding: 0.5em 0.2em;
    font-size: 1.05em;
    vertical-align: top;
    box-shadow: none !important;
}

.detail-item table tr {
    display: block;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    margin-bottom: 0.5em;
}

.detail-item table td:first-child {
    width: 2.2em;
    text-align: left;
    color: #7fc7d9;
    font-weight: 600;
    padding-right: 0.7em;
    white-space: nowrap;
    vertical-align: top;
}

.detail-item table td:last-child {
    text-align: left;
    color: #222;
    font-weight: 400;
    vertical-align: top;
}

.detail-item table tr:not(:last-child) td {
    border-bottom: none !important;
}


/* Make the first tag in every td of .detail-item table display inline */

.detail-item table td>*:first-child {
    display: inline;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.article-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-title {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 60px;
}

.new-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #ff4d4d;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--main-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.articles-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.articles-empty h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.articles-empty p {
    color: #666;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .articles-header h1 {
        font-size: 2rem;
    }

    .article-content {
        padding: 15px;
    }

    .article-title {
        font-size: 1.2rem;
    }
}

@keyframes pulseRed {
    0% {
        transform: scale(1);
        background-color: #dc3545;
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        transform: scale(1.05);
        background-color: #c82333;
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }

    100% {
        transform: scale(1);
        background-color: #dc3545;
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.report-btn-animated {
    background-color: white !important;
    color: #dc3545 !important;
    animation: pulseRed 2s infinite;
}


/* Settings Page - Display Settings Section */

.settings-section.card-like-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px 0 rgba(127, 199, 217, 0.13);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.settings-section.card-like-section:hover {
    box-shadow: 0 6px 32px 0 rgba(127, 199, 217, 0.18);
    transform: translateY(-2px);
}

.settings-section h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section .settings-field-row {
    align-items: center;
    margin-bottom: 1rem;
}

.settings-section .settings-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--main-color);
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Custom Range Slider (Zoom Level) */

.settings-section .form-range {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: linear-gradient(to right, var(--side-color1), var(--main-color));
    border-radius: 5px;
    outline: none;
    opacity: 0.9;
    transition: opacity .2s;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-section .form-range:hover {
    opacity: 1;
}

.settings-section .form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--main-color);
    border: 3px solid var(--background);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.settings-section .form-range::-webkit-slider-thumb:active {
    cursor: grabbing;
    background: var(--side-color2);
    border-color: var(--main-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.settings-section .form-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--main-color);
    border: 3px solid var(--background);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.settings-section .form-range::-moz-range-thumb:active {
    cursor: grabbing;
    background: var(--side-color2);
    border-color: var(--main-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.settings-section .badge.bg-primary {
    background-color: var(--side-color1) !important;
    color: white;
    padding: 0.5em 0.8em;
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* Responsive adjustments for settings section */

@media (max-width: 768px) {
    .settings-section.card-like-section {
        padding: 1.5rem 1.8rem;
    }

    .settings-section h5 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .settings-section .settings-label {
        font-size: 1rem;
    }

    .settings-section .form-range {
        height: 8px;
    }

    .settings-section .form-range::-webkit-slider-thumb,
    .settings-section .form-range::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }

    .settings-section .badge.bg-primary {
        font-size: 0.85rem;
        padding: 0.4em 0.7em;
    }
}

@media (max-width: 576px) {
    .settings-section .settings-field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .settings-section .settings-label {
        width: 100%;
    }

    .settings-section .col-8 {
        width: 100%;
    }
}

/* Articles Page Styles */
.articles-logo {
    text-decoration: none;
    transition: transform 0.3s ease;
}

.articles-logo:hover {
    transform: scale(1.05);
}

.articles-logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.new-badge {
    height: fit-content;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(238, 90, 111, 0.3);
}

.article-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--background);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    color: var(--main-color);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--side-color1) 0%, var(--side-color2) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(73, 158, 161, 0.3);
}

.read-more-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 16px rgba(73, 158, 161, 0.4);
    color: white;
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(5px);
}

.articles-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.empty-icon {
    font-size: 4rem;
    color: var(--side-color1);
    margin-bottom: 1rem;
}

.articles-empty h3 {
    color: var(--main-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.articles-empty p {
    color: #666;
    font-size: 1.1rem;
}

.search-results-title {
    color: var(--main-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .articles-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .articles-header h1 {
        font-size: 1.5rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .article-title {
        font-size: 1.1rem;
    }

    /* Articles and Hospital Page Header Styles */
    .articles-container,
    .hospital-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0.7rem;
    }

    .articles-header,
    .hospital-header {
        background: rgba(255, 255, 255, 0.8) !important;
        padding: 12px 16px !important;
        border-radius: 16px !important;
        margin-bottom: 24px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(227, 234, 247, 0.6) !important;
    }

    .header-back {
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    .header-back-btn {
        display: flex;
        align-items: center;
        text-decoration: none;
        color: var(--main-color);
        background: rgba(46, 71, 75, 0.05);
        padding: 8px 12px;
        border-radius: 10px;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .header-title {
        flex: 1 1 auto !important;
        color: var(--main-color) !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        text-align: left !important;
        justify-content: left !important;
        margin: 0 !important;
    }

    .header-title i {
        margin-right: 0.4rem;
    }

    .search-container {
        flex: 0 0 100% !important;
        margin: 8px 0 0 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    .sort-nearest-btn {
        bottom: 90px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
    }

    .sort-nearest-btn i {
        font-size: 1.4rem !important;
    }

    .sort-nearest-btn .btn-text {
        font-size: 0.6rem !important;
    }

    .search-input-container {
        position: relative;
        display: flex;
        align-items: center;
        background: white;
        border-radius: 50px;
        padding: 0.5rem 1rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    .search-input-container:focus-within {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }

    .search-input-container input {
        flex: 1;
        border: none;
        outline: none;
        font-size: 1.1rem;
        padding: 0.5rem;
        background: transparent;
    }

    .search-input-container input::placeholder {
        color: #999;
    }

    .search-icon {
        color: var(--main-color);
        font-size: 1.2rem;
        margin-left: 0.75rem;
    }

    .clear-button {
        background: var(--side-color1);
        border: none;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        color: white;
        margin-left: 0.5rem;
    }

    .clear-button:hover {
        background: var(--main-color);
        transform: scale(1.1);
    }
}

/* Popular Tools Carousel */
.popular-tools-container {
    margin-top: -130px;
    padding: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.popular-tools-title {
    font-size: 1.8rem;
    color: var(--main-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    border-radius: 15px;
    touch-action: pan-y pinch-zoom;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
}

.carousel-track.dragging {
    transition: none;
}

.carousel-card {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--font-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.carousel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--side-color2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.carousel-card:hover::before {
    opacity: 0.1;
}

.carousel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.carousel-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--side-color1) 0%, var(--side-color2) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(73, 158, 161, 0.3);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.carousel-card:hover .carousel-card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(73, 158, 161, 0.4);
}

.carousel-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--main-color);
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.carousel-nav-btn {
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: var(--main-color);
    font-size: 1.2rem;
    flex-shrink: 0;
    z-index: 10;
}

.carousel-nav-btn:hover {
    background: var(--main-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.carousel-nav-btn:active {
    transform: scale(0.95);
}

.carousel-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-nav-btn:disabled:hover {
    background: white;
    color: var(--main-color);
    transform: scale(1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(46, 71, 75, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.carousel-dot:hover {
    background: rgba(46, 71, 75, 0.4);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--main-color);
    width: 32px;
    border-radius: 6px;
    border-color: var(--side-color1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .popular-tools-container {
        padding: 1rem;
        margin-top: -150px;
    }

    .popular-tools-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .carousel-card {
        width: calc((100% - 1.5rem) / 2);
        height: auto;
        aspect-ratio: 1;
        padding: 1rem;
    }

    .carousel-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .carousel-card-title {
        font-size: 0.85rem;
    }

    .carousel-nav-btn {
        display: none;
    }

    .carousel-track {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .carousel-card {
        width: calc((100% - 1rem) / 2);
    }

    .carousel-card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .carousel-card-title {
        font-size: 0.8rem;
    }
}