/* ================================================
   Coptic Orthodox Website Styling
   Dark Blue (#002147) & Gold (#d4af37) Color Palette
   ================================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Open+Sans:wght@300;400;600;700&display=swap');

/* CSS Variables for Color Palette */
:root {
  --primary-dark-blue: #002147;
  --primary-gold: #d4af37;
  --light-blue: #003366;
  --soft-gold: #f4e6a1;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --text-dark: #333333;
  --text-light: #666666;
  --border-light: #e0e0e0;
  --shadow-color: rgba(0, 33, 71, 0.1);
  --gold-hover: #b8941f;
}

/* Global Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', serif;
  color: var(--primary-dark-blue);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--primary-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}

/* ================================================
   Enhanced Coptic Orthodox Navigation
   ================================================ */

.navbar-custom {
  background: linear-gradient(135deg, var(--primary-dark-blue) 0%, var(--light-blue) 100%);
  padding: 1rem 0;
  box-shadow: 0 4px 15px var(--shadow-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--primary-gold);
}

.navbar-brand {
  font-family: 'Merriweather', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
  color: var(--soft-gold) !important;
}

.navbar-logo {
  font-size: 2rem;
  color: var(--primary-gold);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.navbar-nav .nav-link {
  color: var(--white) !important;
  font-weight: 600;
  padding: 0.75rem 1.5rem !important;
  margin: 0 0.5rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
  border: 2px solid transparent;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background-color: var(--primary-gold) !important;
  color: var(--primary-dark-blue) !important;
  transform: translateY(-2px);
  border-color: var(--primary-gold);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Custom Navbar Toggler */
.navbar-toggler {
  border: 2px solid var(--primary-gold);
  border-radius: 8px;
  padding: 0.5rem;
  background: transparent;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background-color: var(--primary-gold);
  transform: scale(1.05);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.5);
}

.navbar-toggler-icon-custom {
  display: flex;
  flex-direction: column;
  width: 24px;
  height: 18px;
  justify-content: space-between;
}

.navbar-toggler-icon-custom span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-gold);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggler:hover .navbar-toggler-icon-custom span {
  background-color: var(--primary-dark-blue);
}

/* Language Switcher Styling */
.navbar-language-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.language-form {
  margin: 0;
}

.btn-language {
  background-color: transparent;
  border: 2px solid var(--primary-gold);
  color: var(--primary-gold);
  padding: 0.5rem 1.25rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-language:hover,
.btn-language.active {
  background-color: var(--primary-gold);
  color: var(--primary-dark-blue);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Main Content Wrapper */
.main-wrapper {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Remove top padding for pages with hero banner */
.main-wrapper.hero-page {
  padding-top: 0;
}

/* ================================================
   Enhanced Coptic Orthodox Footer
   ================================================ */

.footer-custom {
  background: linear-gradient(135deg, var(--primary-dark-blue) 0%, var(--light-blue) 100%);
  color: var(--white);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  border-top: 3px solid var(--primary-gold);
  position: relative;
  overflow: hidden;
}

.footer-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cross-footer" x="0" y="0" width="30" height="30" patternUnits="userSpaceOnUse"><path d="M15,5 L15,25 M5,15 L25,15" stroke="%23d4af37" stroke-width="0.5" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23cross-footer)"/></svg>');
  opacity: 0.1;
}

.footer-section {
  position: relative;
  z-index: 2;
}

.footer-title {
  color: var(--primary-gold);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-icon {
  font-size: 1.8rem;
  color: var(--primary-gold);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-subtitle {
  color: var(--soft-gold);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary-gold);
  padding-bottom: 0.5rem;
}

.footer-description {
  color: var(--soft-gold);
  line-height: 1.6;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--soft-gold);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.footer-links a::before {
  content: '✟';
  color: var(--primary-gold);
  margin-right: 0.5rem;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.footer-links a:hover {
  color: var(--white);
  padding-left: 0.5rem;
  transform: translateX(5px);
}

.footer-links a:hover::before {
  transform: scale(1.2);
}

.footer-languages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-language-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--soft-gold);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.footer-language-item:hover {
  color: var(--white);
  transform: translateX(5px);
}

.language-flag {
  font-size: 1.2rem;
  filter: brightness(1.1);
}

.footer-cross-large {
  font-size: 3rem;
  color: var(--primary-gold);
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.footer-cross-large:hover {
  transform: scale(1.1) rotate(15deg);
}

.footer-blessing {
  color: var(--soft-gold);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}

.footer-bottom {
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding-top: 1.5rem;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.footer-copyright {
  color: var(--soft-gold);
  margin: 0;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .footer-copyright {
    white-space: normal;
    font-size: 0.8rem;
  }
}

.footer-social {
  text-align: right;
}

.footer-made-with {
  color: var(--soft-gold);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.footer-bektier-link {
  color: var(--primary-gold);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.footer-bektier-link:hover {
  color: var(--white);
  border-bottom: 1px solid var(--white);
  transform: translateY(-1px);
}

.heart {
  color: #e74c3c;
  font-size: 1rem;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 50%, 100% {
    transform: scale(1);
  }
  25%, 75% {
    transform: scale(1.1);
  }
}

/* Footer Responsive Design */
@media (max-width: 768px) {
  .footer-custom {
    padding: 2rem 0 1rem;
  }
  
  .footer-title {
    font-size: 1.3rem;
    text-align: center;
  }
  
  .footer-subtitle {
    text-align: center;
  }
  
  .footer-cross-large {
    font-size: 2.5rem;
  }
  
  .footer-social {
    text-align: center;
    margin-top: 1rem;
  }
  
  .footer-made-with {
    justify-content: center;
  }
  
  .footer-languages {
    align-items: center;
  }
}


/* Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, var(--primary-dark-blue) 0%, var(--light-blue) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: -2rem; /* Remove white space between navbar and hero */
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cross" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M10,5 L10,15 M5,10 L15,10" stroke="%23d4af37" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23cross)"/></svg>');
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-banner h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-banner p {
  font-size: 1.2rem;
  color: var(--soft-gold);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-logo {
  max-width: 150px;
  height: auto;
  margin-bottom: 2rem;
  filter: brightness(0) invert(1);
}

/* Buttons */
.btn {
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-gold);
  color: var(--primary-dark-blue);
  border: 2px solid var(--primary-gold);
}

.btn-primary:hover {
  background-color: var(--gold-hover);
  border-color: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-gold);
  border: 2px solid var(--primary-gold);
}

.btn-outline-primary:hover {
  background-color: var(--primary-gold);
  color: var(--primary-dark-blue);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--primary-dark-blue);
  color: var(--white);
  border: 2px solid var(--primary-dark-blue);
}

.btn-secondary:hover {
  background-color: var(--light-blue);
  border-color: var(--light-blue);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: #dc3545;
  color: var(--white);
  border: 2px solid #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #c82333;
  transform: translateY(-2px);
}

/* Cards */
.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 20px var(--shadow-color);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  overflow: hidden;
  background-color: var(--white);
  /* Removed fixed width constraints for better Bootstrap grid compatibility */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 33, 71, 0.15);
}

.card-img-top {
  height: 200px; /* Reduced from 600px for better proportions */
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-family: 'Merriweather', serif;
  color: var(--primary-dark-blue);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* ================================================
   Nieuwe Rechthoekige Cards voor Categorieën & Preken
   ================================================ */

/* Rechthoekige Card Container - Updated Styling */
.card-rectangular {
  max-width: 420px;
  min-height: 480px;
  height: auto;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 20px var(--shadow-color);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  overflow: hidden;
  background-color: var(--white);
  width: 100%;
}

.card-rectangular:hover {
  box-shadow: 0 12px 25px rgba(0, 33, 71, 0.2);
  transform: translateY(-4px);
}

/* Afbeelding */
.card-rectangular .card-img-container {
  height: 290px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.card-rectangular .card-img-top {
  height: 100%;
  object-fit: cover;
  width: 100%;
  transition: transform 0.3s ease;
}

.card-rectangular:hover .card-img-top {
  transform: scale(1.05);
}

/* Inhoud */
.card-rectangular .card-body {
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Content area that can grow/shrink */
.card-rectangular .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  overflow: visible;
}

/* Titel */
.card-rectangular .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary-dark-blue);
  font-family: 'Merriweather', serif;
  line-height: 1.4;
  word-wrap: break-word;
  hyphens: auto;
  overflow-wrap: break-word;
}

.card-rectangular .card-title a {
  color: inherit;
  text-decoration: none;
}

.card-rectangular .card-title a:hover {
  color: var(--primary-gold);
  text-decoration: none;
}

.card-rectangular .card-text {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 0;
  line-height: 1.4;
  word-wrap: break-word;
  hyphens: auto;
  overflow-wrap: break-word;
}

/* Button area - always at bottom with guaranteed space */
.card-rectangular .card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
  padding-top: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Knop */
.card-rectangular .btn {
  font-size: 0.875rem;
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  min-width: 100px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex: 0 1 auto;
}

/* Ensure buttons stack properly on mobile */
.card-rectangular .card-actions .btn {
  margin-bottom: 0;
}

.card-rectangular .card-actions .btn:last-child {
  margin-bottom: 0;
}

.card-rectangular .btn-secondary {
  background-color: var(--light-blue);
  border-color: var(--light-blue);
  color: white;
}

.card-rectangular .btn-secondary:hover {
  background-color: var(--primary-dark-blue);
  border-color: var(--primary-dark-blue);
  color: white;
}

.card-rectangular .btn-danger:hover {
  background-color: #dc3545;
  border-color: #dc3545;
}

/* Legacy support for older button layouts */
.card-rectangular .d-flex.flex-column.gap-1 > .btn:not(:last-child) {
  margin-bottom: 0.25rem;
}

.card-rectangular .d-flex.flex-column.gap-1 > .btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  min-width: 100px;
  max-width: 150px;
  flex: 1;
}

/* Extra info */
.card-rectangular .card-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0.25rem 0;
  line-height: 1.4;
}

.card-rectangular .card-keywords {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0.5rem 0;
  line-height: 1.4;
  word-wrap: break-word;
  hyphens: auto;
  overflow-wrap: break-word;
}

.card-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.card-buttons .btn {
  min-width: 100px;
  max-width: 150px;
  font-size: 0.8rem;
  border-radius: 20px;
  padding: 0.4rem 0.8rem;
  flex: 1;
}

/* Improved touch targets for mobile */
@media (max-width: 576px) {
  .card-buttons {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .card-buttons .btn {
    min-width: 80px;
    max-width: 110px;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    flex: 1;
  }
}


@media (max-width: 768px) {
  .card-rectangular .btn {
    min-height: 32px; /* Better touch target */
    touch-action: manipulation; /* Optimize for touch */
  }
}

/* Icon placeholder styling for cards without images */
.card-rectangular .card-img-top.d-flex {
  background-color: var(--light-gray) !important;
  border: 2px dashed var(--border-light);
}

.card-rectangular .card-img-top.d-flex i {
  opacity: 0.5;
}

/* Grid Layout voor Rechthoekige Cards */
.rectangular-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem; /* Reduced from 2rem for tighter spacing */
  justify-items: center;
  margin-top: 2rem;
  padding: 0 0.5rem; /* Add slight padding for edge spacing */
}

/* Desktop optimization - allow more cards per row */
@media (min-width: 1200px) {
  .rectangular-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    max-width: 1400px;
    margin: 2rem auto 0;
  }
}

/* Responsive Design voor Rechthoekige Cards */
@media (max-width: 768px) {
  .card-rectangular {
    max-width: 320px;
    min-height: 420px;
    margin-bottom: 1.25rem;
  }
  
  .card-rectangular .card-img-container {
    height: 220px;
  }
  
  .card-rectangular .card-body {
    padding: 1rem;
  }
  
  .card-rectangular .card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
  }
  
  .card-rectangular .card-meta {
    font-size: 0.85rem;
  }
  
  .card-rectangular .card-keywords {
    font-size: 0.8rem;
    margin: 0.4rem 0;
  }
  
  .card-rectangular .card-actions {
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
  }
  
  .card-rectangular .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    min-width: 120px;
    width: 100%;
    max-width: 200px;
  }
  
  .rectangular-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 576px) {
  .card-rectangular {
    max-width: 300px;
    min-height: 380px;
    margin-bottom: 1rem;
  }
  
  .card-rectangular .card-img-container {
    height: 190px;
  }
  
  .card-rectangular .card-body {
    padding: 1rem;
  }
  
  .card-rectangular .card-content {
    margin-bottom: 0.75rem;
  }
  
  .card-rectangular .card-title {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
  }
  
  .card-rectangular .card-meta {
    font-size: 0.8rem;
    margin: 0.2rem 0;
  }
  
  .card-rectangular .card-keywords {
    font-size: 0.75rem;
    margin: 0.3rem 0;
  }
  
  .card-rectangular .card-actions {
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
  }
  
  .card-rectangular .btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    min-width: 80px;
    width: 100%;
    max-width: 150px;
  }
  
  .rectangular-card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0;
    justify-items: center;
  }
}

/* Extra small devices optimization */
@media (max-width: 480px) {
  .card-rectangular {
    max-width: 260px;
    height: auto; /* Allow dynamic height based on content */
    min-height: 320px; /* Minimum height for consistency */
  }
  
  .card-rectangular .card-img-container {
    height: 192px; /* Keep image size consistent */
  }
  
  .card-rectangular .card-body {
    height: auto; /* Allow body to grow with content */
    min-height: 128px; /* Minimum height for layout consistency */
    padding: 0.4rem;
  }
  
  .card-rectangular .card-actions {
    min-height: 55px; /* Guaranteed space for extra small buttons */
  }
  
  .rectangular-card-grid {
    gap: 0.75rem;
  }
}

/* RTL Support voor Rechthoekige Cards */
html[lang="ar"] .card-rectangular .card-body,
html[lang="ar"] .card-rectangular .card-title,
html[lang="ar"] .card-rectangular .card-text {
  text-align: center;
}

/* Homepage Specific Styles */
.anba-image {
  max-width: 200px;
  height: auto;
  border-radius: 50%;
  border: 4px solid var(--primary-gold);
  margin-bottom: 2rem;
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
  transition: transform 0.3s ease;
}

.anba-image:hover {
  transform: scale(1.05);
}

.hero-title {
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.main-content {
  padding: 3rem 0;
}

.content-card {
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 8px 25px var(--shadow-color);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px var(--shadow-color);
}

.content-card .card-header {
  background: linear-gradient(135deg, var(--primary-dark-blue), var(--light-blue));
  color: var(--white);
  padding: 1.5rem 2rem;
  border-bottom: none;
}

.content-card .card-body {
  padding: 2rem;
}

.section-title {
  color: var(--white);
  margin-bottom: 0;
  font-size: 1.8rem;
}

.lead-text {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-dark);
  margin-bottom: 0;
  font-weight: 400;
}

.feature-card {
  background: var(--white);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 5px 15px var(--shadow-color);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid var(--border-light);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px var(--shadow-color);
  border-color: var(--primary-gold);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-gold), var(--gold-hover));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.feature-title {
  color: var(--primary-dark-blue);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.feature-text {
  color: var(--text-light);
  line-height: 1.6;
  font-size: 1rem;
}

.cta-section {
  background: var(--light-gray);
  border-radius: 20px;
  padding: 3rem 2rem;
  margin-top: 2rem;
  text-align: center;
}

.cta-title {
  color: var(--primary-dark-blue);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-text {
  color: var(--text-light);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Containers & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main-content {
  min-height: calc(100vh - 200px);
  padding: 3rem 0;
}

.section {
  padding: 4rem 0;
  position: relative;
}

.section:nth-child(even) {
  background-color: var(--light-gray);
}

/* Enhanced Coptic Divider */
.coptic-divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.coptic-divider::before,
.coptic-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 25%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--primary-gold), transparent);
}

.coptic-divider::before {
  left: 10%;
}

.coptic-divider::after {
  right: 10%;
}

.coptic-cross {
  background: var(--white);
  color: var(--primary-gold);
  font-size: 1.8rem;
  padding: 0.5rem 1rem;
  border-radius: 50%;
  border: 2px solid var(--primary-gold);
  display: inline-block;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

/* Button size variations */
.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--primary-dark-blue);
  margin-bottom: 0.5rem;
  display: block;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background-color: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23d4af37' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Tables */
.table {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow-color);
}

.table th {
  background-color: var(--primary-dark-blue);
  color: var(--white);
  font-weight: 600;
  border: none;
  padding: 1rem;
}

.table td {
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(212, 175, 55, 0.05);
}

/* Alerts */
.alert {
  border: none;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}

.alert-success {
  background-color: #d4edda;
  border-left-color: #28a745;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border-left-color: #ffc107;
  color: #856404;
}

/* Footer */
.footer {
  background-color: var(--primary-dark-blue);
  color: var(--white);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer h5 {
  color: var(--primary-gold);
  margin-bottom: 1rem;
}

.footer p,
.footer a {
  color: var(--soft-gold);
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid var(--light-blue);
  padding-top: 1rem;
  margin-top: 2rem;
  text-align: center;
  color: var(--soft-gold);
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Sermon List */
.sermon-list .card {
  margin-bottom: 1.5rem;
}

.sermon-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.sermon-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.breadcrumb-item {
  color: var(--text-light);
}

.breadcrumb-item.active {
  color: var(--primary-dark-blue);
  font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--primary-gold);
  font-weight: bold;
}

/* RTL Support for Arabic */
html[lang="ar"] {
  direction: rtl;
  font-family: 'Cairo', 'Open Sans', sans-serif;
}

html[lang="ar"] body {
  text-align: right;
}

/* Keep navbar layout consistent - only text alignment changes */
html[lang="ar"] .navbar-custom .container-fluid {
  direction: ltr; /* Keep navbar container LTR */
}

html[lang="ar"] .navbar-nav {
  margin-left: 0;
  margin-right: auto;
  direction: ltr; /* Keep nav items in same order as Dutch */
}

html[lang="ar"] .navbar-nav .nav-link {
  text-align: right; /* Only text inside should be RTL aligned */
}

html[lang="ar"] .navbar-language-switcher {
  direction: ltr; /* Keep language switcher consistent */
}

html[lang="ar"] .d-flex {
  flex-direction: row-reverse;
}

html[lang="ar"] .card-title,
html[lang="ar"] .card-body,
html[lang="ar"] p,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6 {
  text-align: right;
}

/* Override RTL text alignment for centered homepage elements */
html[lang="ar"] .hero-banner,
html[lang="ar"] .hero-content,
html[lang="ar"] .hero-title,
html[lang="ar"] .content-card .card-header,
html[lang="ar"] .section-title,
html[lang="ar"] .feature-card,
html[lang="ar"] .feature-title,
html[lang="ar"] .feature-text,
html[lang="ar"] .cta-section,
html[lang="ar"] .cta-title,
html[lang="ar"] .cta-text,
html[lang="ar"] .text-center,
html[lang="ar"] .coptic-divider {
  text-align: center !important;
}

/* Keep lead text centered but with RTL direction for Arabic content */
html[lang="ar"] .lead-text {
  text-align: center !important;
  direction: rtl;
}

/* Footer RTL Adjustments */
html[lang="ar"] .footer-title,
html[lang="ar"] .footer-subtitle,
html[lang="ar"] .footer-description,
html[lang="ar"] .footer-links,
html[lang="ar"] .footer-copyright,
html[lang="ar"] .footer-blessing {
  text-align: right;
}

html[lang="ar"] .footer-links a::before {
  margin-right: 0;
  margin-left: 0.5rem;
}

html[lang="ar"] .footer-made-with {
  justify-content: flex-start;
}

html[lang="ar"] .footer-social {
  text-align: left;
}

html[lang="ar"] .breadcrumb-item + .breadcrumb-item::before {
  content: "‹";
}

html[lang="ar"] .sermon-actions {
  justify-content: flex-start;
}

html[lang="ar"] .form-select {
  background-position: left 0.75rem center;
  padding-left: 2.5rem;
  padding-right: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-banner h1 {
    font-size: 2rem;
  }
  
  .hero-banner p {
    font-size: 1rem;
  }
  
  .container {
    padding: 0 0.5rem;
  }
  
  /* Only apply to non-rectangular cards to preserve preken.html layout */
  .card:not(.card-rectangular) .card-body {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .sermon-actions {
    flex-direction: column;
  }
  
  .sermon-actions .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-banner {
    padding: 2rem 0;
  }
  
  .main-content {
    padding: 1.5rem 0;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .language-switcher .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .language-switcher {
    display: none !important;
  }
  
  body {
    color: black !important;
    background: white !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary-gold);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Smooth Transitions */
* {
  transition: all 0.3s ease;
}

a, button, .btn {
  transition: all 0.3s ease;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
.btn:focus,
.form-control:focus {
  outline: 2px solid var(--primary-gold);
  outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-hover);
}

/* ================================================
   PDF Viewer Responsive Styling
   ================================================ */

/* PDF Container */
#pdf-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--shadow-color);
  overflow: hidden;
  text-align: center;
}

/* PDF Canvas */
.pdf-canvas {
  max-width: 100%;
  height: auto !important;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.pdf-canvas:hover {
  transform: scale(1.02);
}

/* PDF Controls */
.pdf-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--light-gray);
  border-radius: 10px;
  flex-wrap: wrap;
}

.pdf-controls button {
  min-width: 100px;
  font-weight: 600;
}

.pdf-page-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary-dark-blue);
  background: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 2px solid var(--primary-gold);
}

/* PDF Viewer Container */
.pdf-viewer-wrapper {
  background: var(--light-gray);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem 0;
}

/* PDF Loading State */
.pdf-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  color: var(--text-light);
  font-size: 1.2rem;
  background: var(--light-gray);
  border-radius: 8px;
  border: 2px dashed var(--border-light);
}

.pdf-loading-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: var(--primary-dark-blue);
}

.pdf-loading-content::before {
  content: '⟳';
  font-size: 2rem;
  color: var(--primary-gold);
  animation: spin 1s linear infinite;
}

.pdf-error {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  color: #dc3545;
  font-size: 1.1rem;
  font-weight: 600;
  background: #f8d7da;
  border: 2px solid #dc3545;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive PDF Adjustments */
@media (max-width: 768px) {
  #pdf-container {
    padding: 0.5rem;
  }
  
  .pdf-controls {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .pdf-controls button {
    width: 100%;
    max-width: 200px;
  }
  
  .pdf-page-info {
    font-size: 0.9rem;
  }
  
  .pdf-viewer-wrapper {
    padding: 1rem;
    margin: 1rem 0;
  }
}

@media (max-width: 480px) {
  #pdf-container {
    padding: 0.25rem;
  }
  
  .pdf-controls {
    padding: 0.75rem;
  }
  
  .pdf-viewer-wrapper {
    padding: 0.5rem;
  }
}

/* PDF Download Button Styling */
.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.pdf-download-btn::before {
  content: '⬇';
  font-size: 1.2rem;
}

/* Full Screen PDF Option */
.pdf-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.pdf-fullscreen #pdf-container {
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

/* ================================================
   Image Cropper Styles
   ================================================ */

/* Crop Modal Styling */
#crop-modal .modal-dialog {
  max-width: 80vw;
}

#crop-modal .crop-container {
  max-height: 60vh;
  overflow: hidden;
  background: #f8f9fa;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1rem;
}

#crop-modal .crop-preview-container {
  border: 2px solid var(--primary-gold);
  border-radius: 8px;
  box-shadow: 0 2px 4px var(--shadow-color);
  background: var(--light-gray);
}

#crop-modal .crop-instruction .alert {
  border-left: 4px solid var(--primary-gold);
  background: var(--soft-gold);
  border-color: var(--primary-gold);
  color: var(--primary-dark-blue);
}

/* Image Upload Preview Styling */
.image-upload-preview {
  margin-top: 1rem;
}

.image-upload-preview .card {
  border: 2px solid var(--primary-gold);
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: transform 0.2s ease;
}

.image-upload-preview .card:hover {
  transform: translateY(-2px);
}

.image-upload-preview .card-img-top {
  border-top-left-radius: calc(0.375rem - 1px);
  border-top-right-radius: calc(0.375rem - 1px);
}

.image-upload-preview .btn-outline-secondary {
  border-color: var(--text-light);
  color: var(--text-light);
}

.image-upload-preview .btn-outline-secondary:hover {
  background-color: var(--primary-dark-blue);
  border-color: var(--primary-dark-blue);
  color: var(--white);
}

/* Current Image Preview Enhancement */
.current-image-preview img {
  border: 2px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 2px 4px var(--shadow-color);
  transition: transform 0.2s ease;
}

.current-image-preview img:hover {
  transform: scale(1.05);
}

/* Form Enhancement for Image Inputs */
.form-control[type="file"]:focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.form-text i.fas {
  color: var(--primary-gold);
  margin-right: 0.5rem;
}

/* Responsive Adjustments for Crop Modal */
@media (max-width: 768px) {
  #crop-modal .modal-dialog {
    max-width: 95vw;
    margin: 1rem;
  }
  
  #crop-modal .crop-container {
    max-height: 50vh;
    padding: 0.5rem;
  }
  
  .crop-preview-container {
    width: 150px !important;
    height: 135px !important;
  }
}