/* Global layout */
* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #f3f4f6;
    margin: 0;
    padding: 0;
    color: #111827;
}

a {
    color: #2563eb;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header & nav */
header.site-header {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #f9fafb;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header.site-header .logo a {
    font-weight: 700;
    font-size: 20px;
    color: #f9fafb;
    text-decoration: none;
}

header.site-header nav a {
    margin-left: 18px;
    font-size: 14px;
    color: #e5e7eb;
}
header.site-header nav a:hover {
    color: #ffffff;
}

/* Hero / banner */
.hero {
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    color: #ecfeff;
    padding: 40px 24px;
    text-align: center;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 700;
}

.hero p {
    margin: 4px 0 16px;
    font-size: 15px;
    opacity: 0.95;
}

.hero-actions {
    margin-top: 12px;
}
.hero-actions a.button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.3);
    margin: 4px 6px;
}
.hero-actions a.button.primary {
    background: #f97316;
    border-color: #fed7aa;
    color: #111827;
}
.hero-actions a.button.primary:hover {
    background: #fb923c;
}
.hero-actions a.button.secondary {
    background: transparent;
    color: #e5e7eb;
}
.hero-actions a.button.secondary:hover {
    background: rgba(15,23,42,0.35);
}

/* Container */
.main-container {
    max-width: 1080px;
    margin: 20px auto 40px;
    padding: 0 16px;
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.08);
    margin-bottom: 18px;
}

/* Search and filters */
.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.search-row form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.search-row input[type="text"],
.search-row select {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    min-width: 0;
}

.search-row input[type="text"] {
    flex: 1 1 auto;
}

.search-row select {
    flex: 0 0 auto;
}

.search-row button {
    padding: 8px 18px;
    border-radius: 12px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.search-row button:hover {
    background: #1d4ed8;
}

/* Sorting */
.sort-row {
    margin-top: 6px;
    font-size: 12px;
    color: #4b5563;
}
.sort-row select {
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 12px;
}

/* CFP list */
.cfp-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cfp-item {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}
.cfp-item:last-child {
    border-bottom: none;
}

.cfp-title {
    font-weight: 600;
    font-size: 15px;
}
.cfp-subtitle {
    margin-top: 6px;
}

.cfp-meta {
    font-size: 12px;
    color: #4b5563;
    margin-top: 6px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 6px;
    margin-bottom: 4px;
}
.badge-deadline {
    background: #f97316;
    color: #111827;
}
.badge-location {
    background: #e5e7eb;
    color: #111827;
}
.badge-event {
    background: #d1fae5;
    color: #065f46;
}
.badge-category {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Detail banner */
.detail-banner {
    background: linear-gradient(135deg, #1d4ed8, #4f46e5);
    color: #f9fafb;
    padding: 28px 24px;
}
.detail-banner h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
}
.detail-banner .subtitle {
    margin-top: 4px;
    font-size: 14px;
    opacity: 0.9;
}
.detail-banner .chips {
    margin-top: 10px;
}
.detail-banner .chips span {
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 4px;
}

/* Simple buttons */
.btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    cursor: pointer;
}
.btn-primary {
    background: #2563eb;
    color: #ffffff;
}
.btn-primary:hover {
    background: #1d4ed8;
}
.btn-danger {
    background: #dc2626;
    color: #ffffff;
}
.btn-danger:hover {
    background: #b91c1c;
}
.btn-secondary {
    background: #6b7280;
    color: #f9fafb;
}
.btn-secondary:hover {
    background: #4b5563;
}

/* Admin table */
.admin-nav {
    margin-bottom: 12px;
}
.admin-nav a {
    margin-right: 10px;
    font-size: 13px;
    font-weight: 600;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.admin-table th,
table.admin-table td {
    border: 1px solid #e5e7eb;
    padding: 6px 8px;
}
table.admin-table th {
    background: #f3f4f6;
}

/* Forms */
.form-group {
    margin-bottom: 10px;
}
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 3px;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 7px 9px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.text-right {
    text-align: right;
}

/* Ad banner placeholder */
.ad-banner {
    margin: 12px 0 0;
    padding: 10px;
    background: #fef3c7;
    border: 1px dashed #fbbf24;
    text-align: center;
    font-size: 12px;
    color: #92400e;
}
.ad-banner img {
    max-width: 100%;
    height: auto;
}

/* Footer */
footer.site-footer {
    border-top: 1px solid #e5e7eb;
    padding: 12px 24px;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    background: #f9fafb;
    margin-top: 40px;
}

/* Responsive tweaks for mobile */
@media (max-width: 640px) {
    .search-row form {
        flex-direction: column;
        align-items: stretch;
    }
    .search-row input[type="text"],
    .search-row select,
    .search-row button {
        width: 100%;
    }
    .search-row button {
        text-align: center;
    }

    .detail-banner {
        text-align: left;
    }
    .detail-banner .chips span {
        display: block;
    }
}



/* Mobile navigation (hamburger) */
.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    margin-left: 12px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #f9fafb;
    margin: 4px 0;
    border-radius: 999px;
}

/* Default nav layout */
.site-header .site-nav {
    display: flex;
    align-items: center;
}

/* Pagination controls */
.pagination .btn {
    margin-left: 4px;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    header.site-header {
        padding: 10px 16px;
    }
    header.site-header .logo a {
        font-size: 18px;
    }
    .site-header .site-nav {
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        background: #111827;
        padding: 8px 16px 12px;
        flex-direction: column;
        align-items: flex-start;
        display: none;
        box-shadow: 0 10px 20px rgba(0,0,0,0.35);
        z-index: 30;
    }
    .site-header .site-nav a {
        margin: 4px 0;
        font-size: 14px;
    }
    .nav-toggle {
        display: inline-block;
    }
    body.nav-open .site-header .site-nav {
        display: flex;
    }

    .search-row form {
        flex-direction: column;
        align-items: stretch;
    }
    .search-row input[type="text"],
    .search-row select {
        width: 100%;
    }
    .search-row button {
        width: 100%;
    }
}


/* Compact search form controls */
.search-row form {
    gap: 8px;
}

.search-row input[type="text"],
.search-row select {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 12px;
    min-height: 40px;
}

.search-row button {
    padding: 10px 18px;
    font-size: 14px;
    min-height: 40px;
}

/* On mobile stack but keep compact */
@media (max-width: 768px) {
    .search-row form {
        flex-direction: column;
        align-items: stretch;
    }
}
