/* ========================================
   RSID Registry - Main Stylesheet
   ======================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a4d8f;
    --secondary-color: #2563eb;
    --accent-color: #0ea5e9;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #153a6f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    padding: 5rem 0;
    background-color: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
    font-weight: 700;
}

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

.feature-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   How It Works Section
   ======================================== */
.how-it-works {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.how-content {
    max-width: 800px;
    margin: 0 auto;
}

.how-list {
    list-style: none;
    margin-bottom: 2rem;
}

.how-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--bg-white);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.how-list li strong {
    color: var(--primary-color);
}

.cta-center {
    text-align: center;
    margin-top: 2rem;
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ========================================
   Tables
   ======================================== */
.dataset-section {
    padding: 3rem 0;
    background-color: var(--bg-white);
}

.table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.data-table thead {
    background-color: var(--primary-color);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: var(--bg-light);
}

.data-table td {
    padding: 1rem;
    font-size: 0.95rem;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

/* ========================================
   Dataset CTA
   ======================================== */
.dataset-cta {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    margin-top: 2rem;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* ========================================
   Forms
   ======================================== */
.form-section {
    padding: 3rem 0;
    background-color: var(--bg-white);
}

.form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.success-message {
    text-align: center;
    padding: 2rem;
}

.success-message h3 {
    color: var(--success-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.success-message p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* ========================================
   Password Modal
   ======================================== */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.password-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.password-modal-content h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.password-modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.password-modal-content input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.help-text {
    font-size: 0.9rem;
    margin-top: 1rem;
    color: var(--text-light);
}

.help-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

/* ========================================
   Registry Controls
   ======================================== */
.registry-controls {
    padding: 2rem 0;
    background-color: var(--bg-light);
}

.controls-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    min-width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.results-count {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ========================================
   Content Section
   ======================================== */
.content-section {
    padding: 3rem 0;
    background-color: var(--bg-white);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    padding: 3rem 0;
    background-color: var(--bg-white);
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-box {
    background-color: var(--bg-light);
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.contact-box h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-email {
    font-size: 1.3rem;
}

.contact-email a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.contact-email a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

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

.footer-links a:hover {
    opacity: 1;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        box-shadow: var(--shadow);
        padding: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .controls-wrapper {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }

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

    .form-wrapper {
        padding: 1.5rem;
    }

    .password-modal-content {
        padding: 1.5rem;
    }
}
