html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* CKEditor Styles */
.ck-editor__editable {
    min-height: 300px;
}

.ck-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.ck-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.ck-content h2 {
    font-size: 2rem;
    margin-bottom: 0.875rem;
    font-weight: 600;
}

.ck-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.ck-content h4 {
    font-size: 1.5rem;
    margin-bottom: 0.625rem;
    font-weight: 600;
}

.ck-content h5 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ck-content h6 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ck-content p {
    margin-bottom: 1rem;
}

.ck-content blockquote {
    border-left: 4px solid #ccc;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.ck-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}

.ck-content table th,
.ck-content table td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
}

.ck-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.ckeditor-section-content {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

/* Admin interface improvements */
.section-item {
    transition: all 0.2s ease-in-out;
}

.section-item:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.content-preview {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    padding: 0.75rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
}

.footer-section-content,
.section-content {
    line-height: 1.6;
}

.footer-section-content h1,
.footer-section-content h2,
.footer-section-content h3,
.footer-section-content h4,
.footer-section-content h5,
.footer-section-content h6,
.section-content h1,
.section-content h2,
.section-content h3,
.section-content h4,
.section-content h5,
.section-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.footer-section-content p,
.section-content p {
    margin-bottom: 1rem;
}

.footer-section-content ul,
.footer-section-content ol,
.section-content ul,
.section-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.footer-section-content blockquote,
.section-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6c757d;
}

.footer-section-content table,
.section-content table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

.footer-section-content table th,
.footer-section-content table td,
.section-content table th,
.section-content table td {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    text-align: left;
}

.footer-section-content table th,
.section-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Dynamic Page Styles */
.page-section {
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.page-section h2 {
  color: #333;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.page-section.header {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.page-section.banner {
  background-color: #007bff;
  color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  text-align: center;
}

.page-section.banner h2 {
  color: white;
  border-bottom: 2px solid white;
}

.page-section.sidebar {
  background-color: #f1f3f4;
  padding: 1rem;
  border-left: 4px solid #007bff;
  border-radius: 0.25rem;
}

.page-section.footer {
  background-color: #343a40;
  color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-top: 2rem;
}

.page-section.footer h2 {
  color: white;
  border-bottom: 2px solid white;
}

.section-content {
  line-height: 1.6;
}

.content {
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Gallery Styles */
.gallery-container {
  margin-top: 2rem;
}

.gallery-item {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gallery-caption {
  text-align: center;
  padding: 0.5rem;
}

.gallery-item:hover img {
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}