/* Main Styles for HKDR Website */

/* Basic CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header Styles */
header {
    background-color: #0047AB;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #f0f0f0;
}

/* Search Styles */
.search-container {
    margin-left: 20px;
}

#search-form {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 5px;
}

#search-input {
    background: none;
    border: none;
    color: white;
    padding: 5px;
    width: 200px;
    outline: none;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#search-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 1rem;
}

#search-button:hover {
    color: #f0f0f0;
}

/* Search Results Styles */
.search-results-section {
    padding: 2rem 0;
}

#search-query-display {
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.search-result-item {
    background-color: white;
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-result-item h3 {
    margin-bottom: 0.5rem;
}

.search-result-item h3 a {
    color: #0047AB;
    text-decoration: none;
}

.search-result-item h3 a:hover {
    text-decoration: underline;
}

.search-result-item p {
    color: #666;
    margin-bottom: 0.5rem;
}

.result-category {
    display: inline-block;
    background-color: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.9rem;
    color: #495057;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #666;
}

#no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0047AB, #4169E1);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background-color: white;
    color: #0047AB;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.features h2,
.latest-news h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    position: relative;
}

.features h2:after,
.latest-news h2:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #0047AB;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #0047AB;
}

/* News Section */
.latest-news {
    padding: 4rem 0;
    background-color: #f0f4f8;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-card h3 {
    margin-bottom: 1rem;
    color: #0047AB;
}

.news-card a {
    color: #0047AB;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
    transition: color 0.3s;
}

.news-card a:hover {
    color: #002d6b;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
}

.faq-item {
    margin-bottom: 1.5rem;
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-question {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #0047AB;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    margin-top: 1rem;
    display: none;
}

.faq-answer.active {
    display: block;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    margin-top: 1rem;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 5px 0 0 5px;
}

.newsletter-form button {
    background-color: #0047AB;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

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

    .hero p {
        font-size: 1rem;
    }

    .features-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu (when active) */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #0047AB;
    padding: 1rem;
}

.nav-links.active li {
    margin: 0.5rem 0;
}