@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary-color: #38bdf8;
    --secondary-color: #818cf8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(51, 65, 85, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(129, 140, 248, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header / Navbar */
header {
    padding: 2rem;
    text-align: center;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.back-link:hover {
    color: var(--secondary-color);
    transform: translateX(-5px);
}

/* Main Container */
main {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    width: 100%;
}

/* Hero Section (Index) */
.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero p {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
}

/* Portal Cards (Index) */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portal-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.portal-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
}

.portal-card h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-card p {
    font-size: 1rem;
    color: #94a3b8;
}

/* FAQ Section */
.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.faq-header p {
    color: #cbd5e1;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--hover-bg);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
    color: var(--secondary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease;
    background: rgba(15, 23, 42, 0.5);
}

.faq-item.active .faq-answer {
    max-height: 1000px; /* Arbitrary large max-height for transition */
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-answer p {
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.faq-answer ul {
    margin-left: 1.5rem;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    color: #64748b;
    border-top: var(--glass-border);
    background: rgba(15, 23, 42, 0.8);
}

/* Responsiveness */
@media (max-width: 768px) {
    .faq-header h2 {
        font-size: 2rem;
    }
    header h1 {
        font-size: 1.5rem;
    }
}
