/* VAS Mobile App Styles */
:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --secondary-color: #c4a747;
    --background: #1a365d;
    --card-bg: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --success: #38a169;
    --knsb-color: #276749;
    --nav-height: 70px;
    --header-height: 60px;
}

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

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1rem;
    gap: 0.75rem;
}

.logo {
    height: 40px;
    width: auto;
    filter: invert(1);
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Main Content */
.app-content {
    padding-top: calc(var(--header-height) + 1rem);
    padding-bottom: calc(var(--nav-height) + 1rem);
    padding-left: 1rem;
    padding-right: 1rem;
    min-height: 100vh;
}

/* Pages */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

.page h2 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

/* Cards */
.info-card, .welcome-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-align: center;
    padding: 2rem 1.25rem;
}

.welcome-card h2 {
    color: white;
    border: none;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.welcome-card p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.welcome-logo {
    height: 80px;
    width: auto;
    filter: invert(1);
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.info-card.highlight {
    border-left: 4px solid var(--secondary-color);
}

.card-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0;
}

.card-pair .info-card {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-pair .info-card .btn {
    align-self: flex-start;
}

.info-card.card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.info-card.card-row .card-content {
    flex: 1;
}

.info-card.card-row .card-content h3 {
    margin-bottom: 0.5rem;
}

.info-card.card-row .card-content p {
    margin-bottom: 0.25rem;
}

.info-card.card-row .btn {
    margin-top: 0;
    white-space: nowrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

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

.btn-primary:hover, .btn-primary:active {
    background: var(--primary-light);
}

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

.btn-secondary:hover, .btn-secondary:active {
    background: var(--primary-color);
    color: white;
}


/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


.note {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.75rem;
}

/* Groups List */
.groups-list {
    margin-top: 0.5rem;
}

.group-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.group-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.group-item strong {
    color: var(--text-primary);
}

.group-item p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* Events List */
.events-list {
    margin-top: 0.5rem;
}

.month-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    padding: 0.75rem 0 0.5rem 0;
    margin-top: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.month-header:first-child {
    margin-top: 0;
}

.event-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    padding: 0.5rem;
}

.event-date .day {
    font-size: 0.75rem;
    font-weight: 600;
}

.event-date .date {
    font-size: 0.7rem;
}

.event-item.upcoming .event-date {
    background: var(--text-light);
}

.event-item.clubavond .event-date,
.event-item.keizer .event-date {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.event-item.knsb .event-date {
    background: var(--knsb-color);
    color: white;
}

.event-details strong {
    color: var(--text-primary);
}

.event-details p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}


/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.25rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 0;
    flex: 1;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.nav-label {
    font-size: 0.6rem;
    font-weight: 500;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--border-color);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.modal h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-right: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

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

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

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

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Nieuws laden & fout */
.nieuws-laden {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    gap: 1rem;
}

.nieuws-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.nieuws-melding {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 1.5rem 0;
}

.nieuws-fout {
    border-left: 4px solid #e53e3e;
}

/* Nieuws */
.nieuws-card h3 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
}

.nieuws-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.nieuws-datum {
    font-size: 0.8rem;
    color: var(--text-light);
}

.nieuws-categorie {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nieuws-lijst {
    margin: 0.5rem 0 0.75rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.nieuws-lijst li {
    margin-bottom: 0.25rem;
}

/* Kalender filter */
.filter-btn {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 2px 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s, background 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--primary-color);
    background: var(--border-color);
}

.filter-panel {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.filter-panel.open {
    display: flex;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

/* Externe links indicator */
a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .app-content {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Safe area for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .app-header {
        padding-top: env(safe-area-inset-top);
    }
}
