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

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

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

/* Header */
.header {
    background: linear-gradient(135deg, #a3597d 0%, #38616b 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logo i {
    color: #ff6b6b;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* Header Controls */
.header-controls {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

@media (min-width: 769px) {
    .header-controls {
        flex-direction: row;
        justify-content: center;
    }
}

.language-selector {
    display: flex;
    justify-content: center;
}

.header-link {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    color: white;
}

.language-select {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-select:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.language-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.language-select option {
    background: #38616b;
    color: white;
    padding: 0.5rem;
}

/* Navigation */
.nav {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.nav-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-btn:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
}

.nav-btn.active {
    background: #a3597d;
    color: white;
    box-shadow: 0 2px 8px rgba(163, 89, 125, 0.3);
}

.nav-btn i {
    font-size: 0.8rem;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: 60vh;
}

.add-offer-section {
    text-align: center;
    margin-bottom: 2rem;
}

.pdf-download-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.btn {
    background: #a3597d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    background: #8a4a6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(163, 89, 125, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #a3597d;
}

.btn-primary:hover {
    background: #8a4a6b;
}

.btn-secondary {
    background: #38616b;
}

.btn-secondary:hover {
    background: #2d4a52;
}

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

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #a3597d;
    box-shadow: 0 0 0 3px rgba(163, 89, 125, 0.1);
}

/* Offers Grid */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.offer-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
}

.offer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.offer-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #a3597d;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.offer-category.sport { background: #10b981; }
.offer-category.musik { background: #f59e0b; }
.offer-category.natur { background: #059669; }
.offer-category.hilfe { background: #ef4444; }
.offer-category.gesellschaft { background: #8b5cf6; }
.offer-category.sonstiges { background: #64748b; }

.offer-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    padding-right: 80px;
}

.offer-description {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.offer-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.offer-author {
    font-weight: 500;
    color: #374151;
}

.offer-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offer-location i {
    color: #a3597d;
}

.offer-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-contact {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.btn-contact:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Loading and No Results */
.loading, .no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #a3597d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.no-results h3 {
    margin-bottom: 0.5rem;
    color: #374151;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #a3597d;
    box-shadow: 0 0 0 3px rgba(163, 89, 125, 0.1);
}

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

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.form-help {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.contact-info {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #a3597d;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.error {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Footer */
.footer {
    background: #38616b;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

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

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

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

.footer-links a:hover,
.footer a:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .nav-content {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .nav-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .offers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

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

    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

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

    .logo {
        font-size: 1.8rem;
    }

    .main {
        padding: 1rem 0;
    }

    .offer-card {
        padding: 1rem;
    }

    .offer-title {
        font-size: 1.1rem;
        padding-right: 60px;
    }

    .offer-category {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .offer-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
}

/* Print styles */
@media print {
    .nav,
    .add-offer-section,
    .modal,
    .footer {
        display: none;
    }
    
    .offer-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* PDF Export Styles */
.pdf-export .offer-card {
    background: white !important;
    border: 2px solid #a3597d !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    margin-bottom: 1rem !important;
    box-shadow: 0 2px 8px rgba(163, 89, 125, 0.2) !important;
    page-break-inside: avoid !important;
}

.pdf-export .offer-category {
    background: #a3597d !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 20px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 1rem !important;
    display: inline-block !important;
}

.pdf-export .offer-title {
    color: #1e293b !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.3 !important;
}

.pdf-export .offer-description {
    color: #374151 !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
}

.pdf-export .offer-meta {
    background: #f8fafc !important;
    padding: 0.75rem !important;
    border-radius: 8px !important;
    border-left: 4px solid #a3597d !important;
}

.pdf-export .offer-author,
.pdf-export .offer-location {
    color: #374151 !important;
    font-weight: 500 !important;
    margin-bottom: 0.25rem !important;
}

.pdf-export .offer-author i,
.pdf-export .offer-location i {
    color: #a3597d !important;
    margin-right: 0.5rem !important;
}
