
/* ===========================
   Root Variables & Global Styles
   =========================== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --transition: all 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* ===========================
   Header & Navigation
   =========================== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.8rem;
}

.nav-link {
    transition: var(--transition);
    position: relative;
    margin: 0 0.5rem;
}

.nav-link:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
}

.nav-link i {
    margin-right: 0.5rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

/* ===========================
   Hero Section
   =========================== */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 80px 20px !important;
    border-radius: 0 0 20px 20px;
}

.hero-section h1 {
    color: white;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-section .lead {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-section .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
}

.hero-section .btn-primary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.hero-section .btn-primary:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.hero-section .btn-outline-primary {
    color: white;
    border-color: white;
}

.hero-section .btn-outline-primary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* ===========================
   Feature Cards
   =========================== */
.feature-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.15);
    transform: translateY(-8px);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.bg-primary-light {
    background-color: rgba(13, 110, 253, 0.15);
    color: var(--primary-color);
}

.bg-success-light {
    background-color: rgba(25, 135, 84, 0.15);
    color: var(--success-color);
}

.bg-info-light {
    background-color: rgba(13, 202, 240, 0.15);
    color: var(--info-color);
}

/* ===========================
   Main Banner Carousel
   =========================== */
.main-banner-section {
    width: 100%;
    height: 400px;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.carousel-banner-main {
    height: 100%;
}

.carousel-banner-main .carousel-inner {
    height: 100%;
}

.carousel-banner-main .carousel-item {
    height: 100%;
}

.main-banner-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.main-banner-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.banner-content-main {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 3rem 2rem;
}

.banner-content-main h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    animation: fadeInDown 0.8s ease-out;
}

.banner-content-main p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease-out 0.2s;
    animation-fill-mode: both;
}

.banner-content-main .btn {
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    animation: fadeInUp 0.8s ease-out 0.4s;
    animation-fill-mode: both;
}

.banner-content-main .btn-light:hover {
    background-color: #f8f9fa;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.carousel-banner-main .carousel-control-prev,
.carousel-banner-main .carousel-control-next {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition);
}

.carousel-banner-main .carousel-control-prev:hover,
.carousel-banner-main .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.15);
}

.carousel-banner-main .carousel-control-prev {
    left: 30px;
}

.carousel-banner-main .carousel-control-next {
    right: 30px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bg-warning-light {
    background-color: rgba(255, 193, 7, 0.15);
    color: var(--warning-color);
}

.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.15);
    color: var(--danger-color);
}

.bg-secondary-light {
    background-color: rgba(108, 117, 125, 0.15);
    color: var(--secondary-color);
}

.feature-card h3 {
    color: #212529;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 0.95rem;
}

.feature-card .btn {
    transition: var(--transition);
    font-weight: 600;
}

.feature-card .btn:hover {
    transform: translateX(4px);
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 12px;
    margin: 60px 0;
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.25);
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

.cta-section .btn-light {
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition);
}

.cta-section .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ===========================
   Main Content
   =========================== */
main {
    min-height: calc(100vh - 200px);
}

/* ===========================
   Buttons
   =========================== */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.65rem 1.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0a58ca;
    border-color: #0a58ca;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===========================
   Footer
   =========================== */
footer {
    background: linear-gradient(135deg, #212529 0%, #1a1f26 100%);
    color: white;
    margin-top: auto;
    font-size: 0.95rem;
}

footer h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color);
}

footer ul li {
    margin-bottom: 0.5rem;
}

.text-muted {
    color: #adb5bd !important;
}

hr.bg-secondary {
    opacity: 0.3;
}

/* ===========================
   Tables
   =========================== */
.table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.table thead {
    background-color: #f8f9fa;
    font-weight: 700;
}

.table thead th {
    border: none;
    color: #212529;
    padding: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem;
    border-color: #e9ecef;
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ===========================
   Forms
   =========================== */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: var(--transition);
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

/* ===========================
   Cards
   =========================== */
.card {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 700;
}

/* ===========================
   Headings
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* ===========================
   Links & Anchors
   =========================== */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* ===========================
   Search Feature Styles
   =========================== */
.search-form {
    width: 100%;
    max-width: 400px;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
    cursor: pointer;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.autocomplete-item i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    width: 20px;
}

.autocomplete-item strong {
    color: var(--primary-color);
    font-weight: 700;
}

.autocomplete-item mark {
    background: rgba(13, 110, 253, 0.14);
    color: inherit;
    padding: 0 0.15em;
    border-radius: 0.25rem;
}

.result-title {
    flex: 1;
}

.result-author {
    font-size: 0.85rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

.autocomplete-item.no-results {
    padding: 1rem;
    text-align: center;
    color: #999;
    cursor: default;
}

.autocomplete-item.no-results:hover {
    background-color: white;
    color: #999;
}

.autocomplete-item.loading {
    justify-content: center;
    gap: 0.5rem;
    color: #6c757d;
    cursor: default;
}

.autocomplete-item.loading:hover {
    background-color: white;
    color: #6c757d;
}

.autocomplete-item .result-category {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: 0.75rem;
    white-space: nowrap;
}

.autocomplete-item.autocomplete-cta {
    width: 100%;
    border: 0;
    background: #f8f9fa;
    text-align: left;
    font-weight: 600;
}

.autocomplete-item.autocomplete-cta:hover {
    background: #eef2ff;
    color: var(--primary-color);
}

.autocomplete-item.autocomplete-cta .ac-query {
    font-weight: 700;
}

/* Homepage Search Section */
.search-section {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 202, 240, 0.1) 100%);
    border-radius: 12px;
}

.search-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

.homepage-search-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
    color: #333;
}

.homepage-search-input::placeholder {
    color: #adb5bd;
}

.homepage-search-input:focus {
    outline: none;
    border-color: #0a58ca;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.homepage-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
}

.homepage-search-wrapper {
    position: relative;
}

/* ===========================
   Responsive Search
   =========================== */
@media (max-width: 992px) {
    .search-form {
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .search-input {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }

    .autocomplete-dropdown {
        max-height: 300px;
    }

    .autocomplete-item {
        padding: 0.6rem 0.8rem;
    }

    .search-section {
        padding: 1.5rem;
    }
}
    .hero-section {
        padding: 50px 20px !important;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .hero-section .d-flex {
        flex-direction: column;
    }

    .hero-section .btn {
        width: 100%;
    }

    .feature-card {
        margin-bottom: 2rem;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }

    nav ul li {
        padding: 0.5rem 0;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 15px !important;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section .display-1 {
        font-size: 3rem;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    footer {
        text-align: center;
    }

    footer .col-md-4 {
        margin-bottom: 1.5rem;
    }
}
