/* 
AI Post Generator - Main Stylesheet
   A clean, modern design with responsive elements
*/

/* General Styles */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background-color: #f8f9fa;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #212529;
}

.text-primary {
    color: #0d6efd !important;
}

.bg-primary {
    background-color: #0d6efd !important;
}

a {
    color: #0d6efd;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #0a58ca;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.35rem;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0a58ca;
    border-color: #0a53be;
}

.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

/* Cards */
.card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: white;
    font-weight: 600;
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.35rem;
    padding: 0.625rem 1rem;
    border-color: #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control-lg {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.hero h1 {
    font-size: 2.75rem;
    line-height: 1.2;
}

/* Feature Icons */
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
}

/* CTA Section */
.cta .card {
    border-radius: 1rem;
}

/* Badge */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 0.25rem;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Tables */
.table {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    color: #495057;
}

/* Blog Content */
.blog-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.blog-content h1 {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
    margin-top: 2rem;
}

.blog-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    margin-top: 1.75rem;
}

.blog-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.blog-content ul, .blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-content p {
    margin-bottom: 1.25rem;
}

.blog-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

/* Social Post Preview */
.social-post-preview {
    white-space: pre-wrap;
    font-family: 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    font-size: 1rem;
}

/* Markdown Content */
.markdown-content {
    max-width: 100%;
    overflow-wrap: break-word;
}

.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3, 
.markdown-content h4, 
.markdown-content h5, 
.markdown-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Stili per l'editor EasyMDE */
.EasyMDEContainer .editor-toolbar {
    border-radius: 5px 5px 0 0;
    border-color: #ddd;
}

.EasyMDEContainer .CodeMirror {
    border-radius: 0 0 5px 5px;
    border-color: #ddd;
}

/* Stili per i titoli nell'editor */
.EasyMDEContainer .CodeMirror .cm-header-1 {
    font-size: 1.8em;
    font-weight: bold;
    color: #222;
    line-height: 1.4;
}

.EasyMDEContainer .CodeMirror .cm-header-2 {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.EasyMDEContainer .CodeMirror .cm-header-3 {
    font-size: 1.3em;
    font-weight: bold;
    color: #444;
    line-height: 1.4;
}

/* Nasconde completamente gli hash (#) davanti ai titoli nell'editor */
.EasyMDEContainer .CodeMirror .cm-formatting-header {
    color: transparent !important;
    font-size: 0 !important;
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.markdown-content p {
    margin-bottom: 1rem;
}

.markdown-content ul, 
.markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.markdown-content a {
    color: #0d6efd;
    text-decoration: underline;
}

.markdown-content blockquote {
    padding-left: 1rem;
    border-left: 4px solid #e9ecef;
    color: #6c757d;
    margin-bottom: 1rem;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.markdown-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.markdown-content table td,
.markdown-content table th {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
}

.markdown-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

/* LinkedIn Button */
.btn-linkedin {
    background-color: #0077b5;
    border-color: #0077b5;
    color: white;
}

.btn-linkedin:hover {
    background-color: #005e8c;
    border-color: #005582;
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .hero {
        padding: 3rem 0;
    }
}

@media (max-width: 575.98px) {
    h1 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.25rem;
    }
    
    .card-img-top {
        height: 160px;
    }
}
