/* Základní styly pro veřejnou část */
/* Vytvořeno: 2024 */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius: 0.5rem;
    --radius-sm: 0.375rem;
    --radius-lg: 0.75rem;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
}

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

/* Header */
.header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo a:hover {
    color: var(--primary-hover);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.nav-link:hover {
    color: var(--primary-color);
}

.admin-link {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.admin-link:hover {
    background: var(--primary-hover);
}

/* Main content */
.main {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Sections */
.section-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.category-title a:hover {
    color: var(--primary-color);
}

.category-count {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.9em;
    margin-left: 0.5rem;
}

/* Media styles for public */
.content-media {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.media-image-container {
    margin-bottom: 1rem;
}

.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.media-attachment,
.media-external-link {
    margin-bottom: 0.75rem;
}

.media-attachment:last-child,
.media-external-link:last-child {
    margin-bottom: 0;
}

.attachment-link,
.external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.attachment-link:hover,
.external-link:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.category-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.category-actions {
    display: flex;
    justify-content: flex-end;
}

/* Ask question section */
.ask-question {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.ask-form-container {
    max-width: 600px;
    margin: 0 auto;
}

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

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

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

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.5rem;
}

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

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

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

.btn-secondary:hover {
    background: #475569;
}

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

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    border-left-color: var(--success-color);
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border-left-color: var(--error-color);
    color: #991b1b;
}

.alert-info {
    background: #f0f9ff;
    border-left-color: var(--info-color);
    color: #1e40af;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

.breadcrumb-link {
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-current {
    color: var(--text-secondary);
    white-space: nowrap;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.breadcrumb-ellipsis {
    color: var(--text-muted);
    font-weight: bold;
}

/* Breadcrumb - jednotné zobrazení pro všechna zařízení */

/* Category page */
.category-header {
    margin-bottom: 2rem;
}

.category-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-link {
    font-size: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 400;
}

.back-link:hover {
    text-decoration: underline;
}

.category-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Content list */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.content-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.content-item:hover {
    box-shadow: var(--shadow);
}

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

.content-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.content-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.type-question {
    background: #fef3c7;
    color: #92400e;
}

.type-situation {
    background: #dbeafe;
    color: #1e40af;
}

.type-answer {
    background: #d1fae5;
    color: #065f46;
}

.type-reaction {
    background: #f3e8ff;
    color: #6b21a8;
}

.content-actions {
    display: flex;
    justify-content: flex-end;
}

/* Navigation */
.navigation {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .category-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-actions {
        justify-content: flex-start;
    }
    
    /* Breadcrumb styling for mobile */
    .breadcrumb {
        font-size: 0.8rem;
        padding: 0.25rem 0;
        margin-bottom: 1rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.25rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .ask-question {
        padding: 1rem;
    }
    
    .content-item {
        padding: 1rem;
    }
}

/* Styling pro HTML obsah z WYSIWYG editoru */
.content-title h1,
.content-title h2,
.content-title h3,
.content-title h4,
.content-title h5,
.content-title h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.3;
}

.content-title h1:first-child,
.content-title h2:first-child,
.content-title h3:first-child,
.content-title h4:first-child,
.content-title h5:first-child,
.content-title h6:first-child {
    margin-top: 0;
}

.content-title p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.content-title p:last-child {
    margin-bottom: 0;
}

.content-title ul,
.content-title ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-title li {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.content-title strong {
    font-weight: 600;
}

.content-title em {
    font-style: italic;
}

.content-title blockquote {
    margin: 1rem 0;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    background: #f8f9fa;
    font-style: italic;
}

.content-title hr {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #e2e8f0;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0;
    margin: 3rem 0;
    border-radius: 12px;
}

.newsletter-container {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 1rem;
}

.newsletter-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.newsletter-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.newsletter-form {
    margin-bottom: 1rem;
}

.newsletter-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
}

.newsletter-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-btn {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
    background-color: #28a745;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.newsletter-btn:hover {
    background-color: #218838;
}

.newsletter-privacy {
    color: rgba(255, 255, 255, 0.8);
}

.newsletter-privacy .privacy-link {
    color: white;
    text-decoration: underline;
}

.newsletter-privacy .privacy-link:hover {
    text-decoration: none;
}

@media (max-width: 768px) {
    .newsletter {
        padding: 2rem 0;
        margin: 2rem 0;
    }
    
    .newsletter-title {
        font-size: 1.5rem;
    }
    
    .newsletter-input-group {
        flex-direction: column;
    }
    
    .newsletter-btn {
        width: 100%;
    }
}

/* Advertisement styles */
.advertisement {
    position: relative;
    margin: 1rem 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ad-image {
    width: 100%;
    height: auto;
    display: block;
}

.ad-text {
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.ad-link:hover {
    opacity: 0.9;
}

.ad-label {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

/* Reklamní pozice */
.ad-banner {
    width: 100%;
    max-width: 728px;
    margin: 1rem auto 2rem auto;
    text-align: center;
}

.advertisement.ad-banner {
    width: 100% !important;
    max-width: 728px !important;
    margin: 0 auto !important;
    min-height: 90px !important;
}

.advertisement.ad-banner .ad-image {
    width: 100% !important;
    max-width: 728px !important;
    height: auto !important;
    max-height: 90px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Footer banner - velký banner v patičce */
.footer .advertisement[data-ad-position="footer_banner"] {
    width: 100%;
    max-width: 728px;
    margin: 1rem auto;
    text-align: center;
}

.footer .advertisement[data-ad-position="footer_banner"] .ad-image {
    width: 100%;
    max-width: 728px;
    height: auto;
    max-height: 90px;
    display: block;
    margin: 0 auto;
}


/* Content inline reklamy - menší velikost */
.advertisement[data-ad-id] {
    max-width: 300px;
    margin: 1rem auto;
}

.advertisement[data-ad-id] .ad-image {
    max-width: 100%;
    height: auto;
}

.ad-sidebar {
    width: 100%;
    max-width: 300px;
    margin: 1rem 0;
}

.ad-inline {
    width: 100%;
    max-width: 300px;
    margin: 2rem auto;
}

.ad-footer {
    width: 100%;
    max-width: 728px;
    margin: 2rem auto 0;
}

/* Sidebar layout */
.sidebar {
    float: right;
    width: 200px;
    margin-left: 20px;
    margin-bottom: 20px;
}

.sidebar .advertisement {
    margin: 0 0 20px 0;
    padding: 10px;
}

/* Responsivní úpravy pro sidebar */
@media (max-width: 768px) {
    .sidebar {
        float: none;
        width: 100%;
        margin-left: 0;
        margin-bottom: 20px;
    }
    
    .sidebar .advertisement {
        margin: 15px 0;
        padding: 10px;
    }
}
