/* Apple-Themed Typography and Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f5f5f7;
    --text-color: #1d1d1f;
    --text-secondary: #86868b;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --border-color: #d2d2d7;
    --card-bg: #ffffff;
    --card-hover: #fbfbfd;
    --link-color: #0066cc;
    --link-hover: #004499;
    --search-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --text-color: #f5f5f7;
        --text-secondary: #86868b;
        --nav-bg: rgba(29, 29, 31, 0.72);
        --border-color: #424245;
        --card-bg: #1d1d1f;
        --card-hover: #2d2d2f;
        --link-color: #2997ff;
        --link-hover: #147ce5;
        --search-bg: #1d1d1f;
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
}

/* Global Nav */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-content {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    font-size: 12px;
}

.nav-links a, .nav-logo {
    color: var(--text-color);
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-links a:hover, .nav-logo:hover {
    opacity: 1;
}

/* Hero Section */
.hero {
    padding: 120px 20px 60px;
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.hero h1 {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Search */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-radius: 12px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

input[type="text"] {
    width: 100%;
    padding: 18px 20px 18px 48px;
    font-size: 17px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--search-bg);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
    border-color: var(--link-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

@media (prefers-color-scheme: dark) {
    input[type="text"]:focus {
        box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.2);
    }
}

/* Main Content Area */
.page-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

.topic-card {
    background-color: var(--card-bg);
    border-radius: 18px;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.topic-card.delay-1 { animation-delay: 0.1s; }
.topic-card.delay-2 { animation-delay: 0.2s; }
.topic-card.delay-3 { animation-delay: 0.3s; }
.topic-card.delay-4 { animation-delay: 0.4s; }

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    background-color: var(--card-hover);
    color: var(--text-color);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--link-color);
}

.topic-card h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.topic-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* FAQ Section */
.faq-section {
    margin-bottom: 80px;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.faq-item summary {
    font-size: 19px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 30px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--link-color);
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-content {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

/* Contact Card */
.contact-card-section {
    display: flex;
    justify-content: center;
}

.contact-card {
    background-color: var(--card-bg);
    border-radius: 18px;
    padding: 40px;
    width: 100%;
    max-width: 700px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.contact-text h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-text p {
    color: var(--text-secondary);
    font-size: 15px;
}

.btn-primary {
    background-color: var(--link-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

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

.btn-primary:active {
    transform: scale(0.97);
}

@media (max-width: 768px) {
    .contact-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* Footer */
.global-footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text-color);
    text-decoration: none;
}

.divider {
    margin: 0 8px;
    color: var(--border-color);
}

/* Animations */
@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);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
