/* Base styles */
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #f6dcd8;
  color: #e30000;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

/* Typography */
html {
  font-size: 16px;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

/* Section styles */
.section {
  padding: 1.5rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  animation: fadeIn 0.5s ease-out;
}

.section.hero {
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
  padding: 1.5rem 1rem;
}

.hero em {
  font-style: italic;
}

/* Page title */
.page-title {
  margin: 1.5rem 0 0.75rem;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-align: center;
  color: #e30000;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 2.2rem;
  }
}

/* Page description */
.page-description {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  font-size: 1.1rem;
  color: #333;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Contact form specific styles */
.section form {
  font-size: 1rem;
}

.section form label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.section form input,
.section form textarea {
  font-size: 0.95rem;
}

.section form .error {
  font-size: 0.8rem;
}

.section form button {
  font-size: 0.9rem;
}

/* Block styles */
.block {
  margin-top: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.block-title {
  font-weight: bold;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.block-dates {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Tag filter styles */
.tag-filter {
  margin: 2rem auto;
  padding: 1rem;
  background-color: #f6dcd8;
  border-left: 4px solid #e30000;
  width: 100%;
  box-sizing: border-box;
}

.filter-label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.tag-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.tag-buttons button {
  background: none;
  border: 1px solid #e30000;
  padding: 0.4rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  color: #e30000;
  border-radius: 2rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tag-buttons button:hover {
  background-color: #e30000;
  color: #fff;
}

.tag-buttons button.active {
  background-color: #e30000;
  color: #fff;
  font-weight: bold;
}

/* Form styles */
.blog-editor-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}

label {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #e30000;
}

label span {
  font-weight: normal;
  font-size: 0.9rem;
  color: #555;
}

input[type="text"],
textarea {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.editor-box {
  border: 1px solid #ccc;
  padding: 1rem;
  background-color: #fff;
  min-height: 300px;
  width: 100%;
  box-sizing: border-box;
}

.submit-btn {
  align-self: flex-start;
  background-color: #e30000;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}

.submit-btn:hover {
  background-color: #b00000;
}

/* Tag styles */
.popular-tags {
  margin-top: 0.5rem;
  width: 100%;
}

.popular-tags span {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.tags-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
}

.tags-display span {
  background-color: #e30000;
  color: #fff;
  padding: 0.3rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-family: inherit;
  white-space: nowrap;
}

/* Editor styles */
.editor-box {
  background-color: #fffbea;
  border: 1px solid #ccc;
  padding: 1rem;
  min-height: 400px;
  height: auto;
  overflow: visible;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.codex-editor__redactor {
  padding: 0 !important;
  margin: 0;
  background-color: #fffbea;
  width: 100%;
  box-sizing: border-box;
}

.ce-block {
  margin: 1rem 0;
  width: 100%;
}

.ce-paragraph {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-size: 1rem;
  color: #333;
}

.codex-editor svg {
  fill: #e30000;
}

.tag-pill {
  display: inline-block;
  background-color: #f6dcd8;
  color: #e30000;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-family: inherit;
  white-space: nowrap;
}

.page-btn {
  background: none;
  border: 1px solid #e30000;
  padding: 0.4rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  color: #e30000;
  border-radius: 2rem;
  transition: all 0.2s ease;
  margin: 0 0.25rem;
}

.page-btn:hover {
  background-color: #e30000;
  color: #fff;
}

.page-btn.active {
  background-color: #e30000;
  color: #fff;
  font-weight: bold;
}

@media (max-width: 768px) {
  .section {
    padding: 1rem 0.5rem;
  }
  
  .section.hero {
    font-size: clamp(1.5rem, 4vw, 3rem);
  }
  
  .blog-editor-form {
    padding: 0.5rem;
  }
  
  .tag-buttons {
    gap: 0.25rem;
  }
  
  .submit-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 0.5rem;
  }
  
  .section.hero {
    font-size: clamp(1.2rem, 3vw, 2rem);
  }
  
  .tag-buttons button,
  .page-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .editor-box {
    min-height: 300px;
  }
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #e30000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 1rem;
  font-size: 1rem;
  color: #666;
}

/* Error Message */
.error-message {
  padding: 1rem;
  background-color: #ffebee;
  color: #e30000;
  border-radius: 4px;
  margin: 1rem 0;
  display: none;
}

.error-message.visible {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.article-card {
  transition: transform 0.2s ease;
}

.article-card:hover {
  transform: translateY(-5px);
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

:focus {
  outline: 2px solid #e30000;
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

@media (hover: none) {
  .button:active,
  .tag-buttons button:active,
  .page-btn:active {
    background-color: #e30000;
    color: #fff;
  }
}

@media print {
  .site-header,
  .site-footer {
    display: none;
  }
  
  .section {
    padding: 0;
    margin: 0;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8rem;
  }
}

/* Blog Manager Styles */
.blog-manager {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.blog-title {
    font-size: 2rem;
    font-weight: 300;
    color: #222;
}

.new-post-btn {
    padding: 0.75rem 1.5rem;
    background-color: #e30000;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.new-post-btn:hover {
    background-color: #c30000;
}

.blog-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.blog-table th,
.blog-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.blog-table th {
    font-weight: 500;
    color: #666;
    background-color: #f9f9f9;
}

.post-title {
    font-weight: 500;
    color: #222;
}

.post-date {
    color: #666;
}

.post-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-draft {
    background-color: #f0f0f0;
    color: #666;
}

.status-published {
    background-color: #e6f7e6;
    color: #2e7d32;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    margin-right: 0.5rem;
    transition: all 0.2s;
}

.action-btn:hover {
    opacity: 0.7;
}

.delete-btn {
    color: #e30000;
}

.toggle-btn {
    color: #2e7d32;
}

/* Blog Editor Styles */
.editor-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.post-title-input {
    font-size: 1.5rem;
    font-weight: 300;
    border: none;
    padding: 0.5rem;
    width: 100%;
    max-width: 600px;
    color: #222;
}

.editor-actions {
    display: flex;
    gap: 1rem;
}

.editor-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn {
    background-color: #e30000;
    color: white;
}

.save-btn:hover {
    background-color: #c30000;
}

.preview-btn {
    background-color: #f0f0f0;
    color: #222;
}

.preview-btn:hover {
    background-color: #e0e0e0;
}

.back-btn {
    background-color: transparent;
    color: #666;
}

.back-btn:hover {
    color: #222;
}

.editor-content {
    padding: 1rem 1.5rem;
    min-height: 500px;
}

#editorjs {
    min-height: 500px;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 1rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .blog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .blog-table th:nth-child(3),
    .blog-table td:nth-child(3) {
        display: none;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .editor-actions {
        width: 100%;
        justify-content: space-between;
    }
} 