/* ====================================================
   Dr. Anil Kumar Naralasetty - Health Resources Design System
   Website Brand Colors Integration:
   - Navy Blue: #0f233c (Primary Header & Text)
   - Brand Accent: #e42e66 (Brand Buttons, Badges, Links & Highlights)
   - Light Background: #f2fcff / #fdecf2
   ==================================================== */

:root {
    --primary-color: #0f233c;
    --primary-hover: #081729;
    --accent-color: #e42e66;
    --accent-hover: #c81e52;
    --accent-light: #fdecf2;
    --text-dark: #1e1e1e;
    --text-muted: #555555;
    --bg-light: #f2fcff;
    --border-color: #dceef5;
    --card-shadow: 0 4px 12px rgba(15, 35, 60, 0.08);
    --card-hover-shadow: 0 12px 24px rgba(228, 46, 102, 0.15);
    --radius: 12px;
}

/* Base Styles */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
}

/* Header Logo Protection */
.header-main .logo img,
.header-one .logo img,
.lower-box .logo img,
.main-header .logo img {
    max-width: 320px !important;
    max-height: 80px !important;
    height: auto !important;
    width: auto !important;
}

/* Hero Section Spacing Safeguard */
.resource-hero {
    background: linear-gradient(135deg, #0f233c 0%, #1e3a5f 100%);
    color: #ffffff;
    padding: 60px 0 50px;
    margin-top: 175px !important;
    border-bottom: 4px solid var(--accent-color);
}

@media (max-width: 991px) {
    .resource-hero {
        margin-top: 20px !important;
        padding: 40px 15px 30px;
    }
}
.resource-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    margin-bottom: 15px;
}
.resource-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 15px;
}
.resource-meta-bar span i {
    color: var(--accent-color);
    margin-right: 6px;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    background-color: var(--accent-light);
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(228, 46, 102, 0.2);
}

/* Resource & Video Cards */
.resource-card, .video-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
}
.resource-card:hover, .video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-color);
}
.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: #f2fcff;
    overflow: hidden;
}
.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.resource-card:hover .card-img-wrapper img,
.video-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}
.card-body-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-title-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0 8px;
    line-height: 1.4;
}
.card-title-text a {
    color: inherit;
    text-decoration: none;
}
.card-title-text a:hover {
    color: var(--accent-color);
}
.card-excerpt-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Sticky Sidebar & CTA */
.sticky-sidebar {
    position: sticky;
    top: 100px;
}
.appointment-cta-card {
    background: linear-gradient(145deg, #0f233c 0%, #173254 100%);
    color: #ffffff;
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    border-top: 4px solid var(--accent-color);
}
.appointment-cta-card h4 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 10px;
}
.appointment-cta-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 20px;
}
.btn-cta {
    background-color: var(--accent-color);
    color: #ffffff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-height: 46px;
}
.btn-cta:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(228, 46, 102, 0.4);
}

/* Doctor Profile Card */
.doctor-profile-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}
.doctor-profile-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    margin-bottom: 12px;
}

/* FAQ Accordion */
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-question {
    background-color: var(--bg-light);
    padding: 15px 20px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-answer {
    padding: 15px 20px;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Keyword Hub / Tags */
.keyword-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}
.keyword-tag {
    background-color: var(--bg-light);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}
.keyword-tag:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

/* Admin Dashboard & Forms */
.admin-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}
.btn-ai-generate {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-ai-generate:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #a8123e 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(228, 46, 102, 0.4);
}
.drop-zone {
    border: 2px dashed #b8dbe8;
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    background-color: var(--bg-light);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.drop-zone:hover {
    background-color: #e2f6fd;
    border-color: var(--accent-color);
}

/* Touch-Friendly Action Buttons Optimization */
.btn {
    min-height: 44px;
    padding: 10px 18px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    touch-action: manipulation;
    white-space: nowrap;
}
.btn-sm {
    min-height: 38px;
    padding: 6px 14px;
    font-size: 0.88rem;
    white-space: nowrap;
}

/* Table Action Buttons Alignment Fix */
.btn-action-sm {
    height: 34px !important;
    min-height: 34px !important;
    padding: 4px 10px !important;
    font-size: 0.82rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}
td.action-cell, th.action-cell {
    min-width: 175px !important;
    width: 175px !important;
    white-space: nowrap !important;
}

/* Mobile Bottom Navigation Bar for Admin Panel */
.admin-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background-color: #0f233c;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.2);
    border-top: 3px solid var(--accent-color);
}
.admin-bottom-nav .nav-item-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    flex-grow: 1;
    height: 100%;
    transition: all 0.2s ease;
}
.admin-bottom-nav .nav-item-bottom i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}
.admin-bottom-nav .nav-item-bottom.active,
.admin-bottom-nav .nav-item-bottom:hover {
    color: #ffffff;
    background-color: rgba(228, 46, 102, 0.25);
}
.admin-bottom-nav .nav-item-bottom.active i {
    color: var(--accent-color);
}

/* Responsive Mobile Layout Adjustments */
@media (max-width: 991.98px) {
    body.admin-page {
        padding-bottom: 80px !important;
    }
    .admin-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    .table-responsive {
        border-radius: 8px;
    }
    .table-responsive table th,
    .table-responsive table td {
        white-space: nowrap;
    }
    .modal-dialog {
        margin: 10px;
    }
    .resource-hero h1 {
        font-size: 1.6rem;
    }
}

/* Premium Custom Filter & Search Controls */
.filter-bar-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 10px 30px rgba(15, 35, 60, 0.07);
    border: 1px solid #e2e8f0;
}

.custom-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.custom-input-group .input-icon-left {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 1rem;
    pointer-events: none;
    z-index: 3;
}

.custom-input-group .custom-filter-input {
    width: 100%;
    background-color: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 30px !important;
    padding: 13px 20px 13px 48px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: var(--primary-color) !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.custom-input-group .custom-filter-input:focus {
    border-color: var(--accent-color) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(228, 46, 102, 0.15) !important;
}

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-wrapper .select-icon-left {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 1rem;
    pointer-events: none;
    z-index: 3;
}

.custom-select-wrapper .select-arrow-right {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 3;
    transition: transform 0.2s ease, color 0.2s ease;
}

.custom-select-wrapper:hover .select-arrow-right {
    transform: translateY(-50%) translateY(2px);
    color: var(--accent-color);
}

.custom-select-wrapper select.custom-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    background-color: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 30px !important;
    padding: 13px 40px 13px 48px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.custom-select-wrapper select.custom-filter-select:hover,
.custom-select-wrapper select.custom-filter-select:focus {
    border-color: var(--primary-color) !important;
    background-color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(15, 35, 60, 0.12) !important;
}

.custom-select-wrapper select.custom-filter-select option {
    background-color: #ffffff !important;
    color: var(--primary-color) !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
}

/* Category Filter Badges */
.filter-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.25 ease;
    border: 1.5px solid #cbd5e1;
    background-color: #ffffff;
    color: var(--primary-color);
}

.filter-tag-pill:hover,
.filter-tag-pill.active {
    background-color: var(--accent-color);
    color: #ffffff !important;
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(228, 46, 102, 0.3);
}

/* Minimalist Professional Filter Bar */
.minimal-filter-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(15, 35, 60, 0.06);
    border: 1px solid #e2e8f0;
    max-width: 980px;
    margin: 0 auto 35px auto;
}

.minimal-input-wrapper {
    position: relative;
    width: 100%;
}

.minimal-input-wrapper i.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #e42e66;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}

.minimal-input-wrapper i.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 2;
}

.minimal-search-input {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 10px 18px 10px 42px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #0f233c;
    transition: all 0.25s ease;
    outline: none;
}

.minimal-search-input:focus {
    background-color: #ffffff;
    border-color: #e42e66;
    box-shadow: 0 0 0 3px rgba(228, 46, 102, 0.12);
}

.minimal-select {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 10px 36px 10px 40px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #0f233c;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.minimal-select:hover,
.minimal-select:focus {
    background-color: #ffffff;
    border-color: #0f233c;
    box-shadow: 0 2px 10px rgba(15, 35, 60, 0.08);
}

.minimal-btn-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

/* Google-Style Ultra Sleek Search Pill & Autocomplete Card */
.google-style-search-container {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    z-index: 100;
}

.search-pill-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 6px 14px 6px 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-pill-wrapper:focus-within,
.search-pill-wrapper:hover {
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

.search-pill-wrapper .search-icon-left {
    color: #64748b;
    font-size: 1.15rem;
    margin-right: 14px;
}

.search-pill-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-size: 1rem;
    font-weight: 500;
    color: #0f233c;
    padding: 10px 0;
}

.search-pill-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.voice-search-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.15rem;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-search-btn:hover {
    color: #e42e66;
    background-color: #f1f5f9;
}

/* Autocomplete Floating Card */
.search-autocomplete-card {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
    border: 1px solid #e2e8f0;
    padding: 12px 0;
    overflow: hidden;
    z-index: 1000;
    animation: fadeInDown 0.2s ease forwards;
}

.search-autocomplete-card .autocomplete-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #334155;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.search-autocomplete-card .autocomplete-item i {
    color: #94a3b8;
    margin-right: 16px;
    font-size: 0.9rem;
}

.search-autocomplete-card .autocomplete-item:hover {
    background-color: #f8fafc;
    color: #0f233c;
}

.search-autocomplete-card .autocomplete-item:hover i {
    color: #e42e66;
}

/* Sleek Category Pills */
.sleek-cat-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.sleek-cat-pill:hover,
.sleek-cat-pill.active {
    background-color: #0f233c;
    color: #ffffff !important;
    border-color: #0f233c;
    box-shadow: 0 6px 16px rgba(15, 35, 60, 0.2);
}

/* Modern Expanding Search Component (Exact UI Implementation) */
.expanding-search-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 25px auto;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 100;
}

.expanding-search-container.expanded {
    border-radius: 28px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

.expanding-input-row {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #ffffff;
    z-index: 10;
}

.expanding-search-icon {
    color: #5f6368;
    margin-right: 14px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.expanding-search-input {
    flex-grow: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    font-size: 17px !important;
    color: #202124 !important;
    font-weight: 500 !important;
    width: 100%;
}

.expanding-search-input::placeholder {
    color: #bcbcbc;
    font-weight: 400;
}

.expanding-dropdown-area {
    max-height: 0;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    overflow: hidden;
}

.expanding-dropdown-area.open {
    max-height: 320px;
    opacity: 1;
}

.expanding-separator {
    height: 1px;
    width: calc(100% - 40px);
    margin: 0 auto;
    background: #f1f5f9;
}

.expanding-suggestion-list {
    list-style: none;
    padding: 8px 0 16px 0;
    margin: 0;
}

.expanding-suggestion-item {
    display: flex;
    align-items: center;
    padding: 9px 20px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: #202124;
    font-size: 16px;
    text-decoration: none !important;
}

.expanding-suggestion-item:hover {
    background-color: #f3f4f6;
    color: #202124;
}

.expanding-suggestion-item .item-icon {
    color: #9aa0a6;
    margin-right: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.expanding-suggestion-item .text-prefix {
    color: #bcbcbc;
    margin-right: 4px;
}

.expanding-suggestion-item .text-highlight {
    color: #202124;
    font-weight: 500;
}
