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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

nav a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language selector */
.language-selector {
    background-color: #34495e;
    color: white;
    border: 1px solid #2c3e50;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s;
    height: auto;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
}

.language-selector:hover {
    background-color: #2c3e50;
}

.language-selector:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* User dropdown menu */
.user-dropdown {
    position: relative;
}

.user-menu-btn {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.user-menu-btn:hover {
    background-color: #2c3e50;
}

.user-name {
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #2c3e50;
    text-decoration: none;
    transition: background-color 0.2s;
}

.user-dropdown-menu a:hover {
    background-color: #ecf0f1;
}

.user-dropdown-menu a:first-child {
    border-radius: 4px 4px 0 0;
}

.user-dropdown-menu a:last-child {
    border-radius: 0 0 4px 4px;
}

a.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s;
    display: inline-block;
}

/* Logo styling */
.site-logo {
    height: 28px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}


.btn-register-nav:hover {
    background-color: #2980b9;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

#content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#apiResponse {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #ecf0f1;
    border-radius: 4px;
    display: none;
}

#apiResponse.show {
    display: block;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    margin-top: 2rem;
}

/* Container styles */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.875rem;
}

/* Fieldset styles */
fieldset {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

legend {
    font-weight: 600;
    color: #2c3e50;
    padding: 0 0.5rem;
    font-size: 1.1rem;
}

/* Button styles */
.button {
    display: inline-block;
    padding: 12px 32px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.button.primary {
    background-color: #3498db;
    color: white;
}

.button.primary:hover {
    background-color: #2980b9;
}

.button.secondary {
    background-color: #95a5a6;
    color: white;
}

.button.secondary:hover {
    background-color: #7f8c8d;
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

button[type="submit"]:hover {
    background: #2980b9;
}

button[type="submit"]:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Checkbox styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: #f5f5f5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.75rem;
    cursor: pointer;
}

.checkbox-label span {
    font-weight: normal;
}

/* Chip input styles */
.chip-input-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    min-height: 60px;
    background: white;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.language-selector select {
    flex: 1;
}

.button.small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.chips-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    background-color: #3498db;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-size: 0.9rem;
}

.chip-remove {
    margin-left: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
}

.chip-remove:hover {
    opacity: 0.8;
}

#regionInput, 
#languageInput {
    border: none;
    outline: none;
    width: 100%;
    padding: 0.25rem;
}

/* Message styles */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #c62828;
}

.hidden {
    display: none;
}

.message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.message.hidden {
    display: none;
}

/* Auth links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links p {
    margin: 0.5rem 0;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Registration options */
.subtitle {
    text-align: left;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.registration-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .registration-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .option-card.minor {
        grid-column: 1 / -1;
    }
}

.option-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.option-card.major {
    border-width: 3px;
}

.option-card.major h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.option-card.major p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.option-card.minor {
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f9f9f9;
}

.option-card.minor h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.option-card.minor p {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 1rem;
}

/* Login/Register specific styles */
.login-container,
.register-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container {
    max-width: 400px;
}

.login-container h2,
.register-container h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #2980b9;
}

.btn-login:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
}

.register-link a {
    color: #3498db;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

.forgot-password {
    text-align: right;
    margin-top: 10px;
    margin-bottom: 20px;
}

.forgot-password a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Coming soon page */
.coming-soon {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.coming-soon h2 {
    color: #3498db;
    margin-bottom: 1rem;
}

.coming-soon p {
    color: #7f8c8d;
    margin: 0.5rem 0;
}

/* Registration container */
.registration-container {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.registration-container h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.form-group .error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #e74c3c;
}

.form-group.has-error .error {
    display: block;
}

.btn-register {
    width: 100%;
    padding: 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-register:hover {
    background-color: #2980b9;
}

.btn-register:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #7f8c8d;
}

.login-link a {
    color: #3498db;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

.required {
    color: #e74c3c;
}

.password-requirements {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    padding-left: 1rem;
}

.password-requirements li {
    margin: 0.25rem 0;
}

.message.show {
    display: block;
}

/* Form row for side-by-side inputs */
.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

/* Address list */
.address-list {
    margin-bottom: 1rem;
}

.address-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.address-item-content {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    flex: 1;
}

.address-item-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.address-item-remove:hover {
    background: #c0392b;
}

.address-form {
    background: #f0f8ff;
    border: 2px dashed #3498db;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.address-form.hidden {
    display: none;
}

.address-form-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Search Bar Styles */
.search-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-field {
    flex: 1;
    min-width: 150px;
    position: relative;
}

.filter-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.5rem;
}

.filter-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-display:hover {
    border-color: #3498db;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.1);
}

.filter-value {
    color: #333;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.filter-value.placeholder {
    color: #999;
}

.filter-arrow {
    font-size: 0.75rem;
    color: #999;
    margin-left: 0.5rem;
}

.search-button, .clear-button {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-button {
    background: #3498db;
    color: white;
}

.search-button:hover {
    background: #2980b9;
}

.clear-button {
    background: #95a5a6;
    color: white;
}

.clear-button:hover {
    background: #7f8c8d;
}

/* Filter Popup Styles */
.filter-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.filter-popup.show {
    display: flex;
}

.popup-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.popup-content h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.popup-content input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-list label:hover {
    background: #f8f9fa;
}

.checkbox-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    cursor: pointer;
}

.popup-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.popup-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.popup-cancel {
    background: #95a5a6;
    color: white;
}

.popup-cancel:hover {
    background: #7f8c8d;
}

.popup-apply {
    background: #3498db;
    color: white;
}

.popup-apply:hover {
    background: #2980b9;
}

/* Search Results Styles */
.search-results {
    margin-top: 2rem;
}

.search-results.empty {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #ecf0f1;
}

.results-count {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
}

.aid-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.aid-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.aid-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.aid-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.aid-pricing {
    text-align: right;
}

.pricing-label {
    font-size: 0.875rem;
    color: #7f8c8d;
    display: block;
}

.pricing-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #27ae60;
}

.aid-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-section {
    padding: 0.75rem 0;
}

.info-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 0.95rem;
    color: #2c3e50;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #ecf0f1;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #2c3e50;
}

.tag.service {
    background: #e3f2fd;
    color: #1976d2;
}

.tag.language {
    background: #f3e5f5;
    color: #7b1fa2;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

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

.no-results-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.no-results-hint {
    font-size: 0.95rem;
    color: #95a5a6;
}
