@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;800&display=swap');

:root {
  --primary-color: #d4af37; /* Elegant Gold */
  --secondary-color: #ffffff; /* White Background */
  --accent-color: #f8fafc; /* Very Light Grey for cards */
  --text-main: #0f172a; /* Black/Dark text */
  --text-muted: #475569; /* Medium Grey for paragraphs */
  --border-color: #e2e8f0; /* Light grey border */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--secondary-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Background Effects */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.05), transparent 50%),
              radial-gradient(circle at 85% 30%, rgba(241, 245, 249, 0.8), transparent 50%);
  pointer-events: none;
}

/* Header */
header {
  padding: 0.5rem 5%; /* Thinner bar */
  display: flex;
  justify-content: space-between; /* Text on right, Logo on left */
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.site-logo {
  max-height: 60px; /* Thinner logo to fit the sleek bar */
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 1px;
}
.logo-text span {
  color: var(--primary-color);
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 5%;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInDown 1s ease-out;
}

.hero h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  color: var(--text-main);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Cards Grid */
.cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 1000px;
}

.card {
  background: var(--accent-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  width: 100%;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.05), transparent);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(212, 175, 55, 0.2);
}

.card:hover::before {
  left: 100%;
  transition: 0.7s;
}

.card-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  transition: var(--transition);
}

.card:hover .card-icon {
  transform: scale(1.1);
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--secondary-color);
  border: 2px solid var(--primary-color);
  border-radius: 20px;
  padding: 3rem;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: var(--transition);
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--text-main);
  transform: rotate(90deg);
}

.modal-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-weight: 800;
}

/* Proverbs List Specific */
.proverbs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: right;
  padding: 1rem 0;
}

.proverb-item {
  background: var(--accent-color);
  padding: 1.2rem;
  border-radius: 10px;
  border-right: 4px solid var(--border-color);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
  cursor: default;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.proverb-item:hover {
  background: #fff;
  transform: translateX(-5px);
  border-right-color: var(--primary-color);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h2 { font-size: 2rem; }
  .cards-container { grid-template-columns: 1fr; }
  .card { max-width: 350px; margin: 0 auto; }
  .proverb-item { font-size: 1rem; }
}
