@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700&display=swap');

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

:root {
    /* Fonts */
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;

    /* Brand Color Palette */
    --dark-primary: #1c2420;
    --dark-secondary: #243029;
    --gold: #c9a962;
    --gold-light: #d4b96e;
    --gold-dark: #a88b3e;
    --white: #ffffff;
    --cream: #edeadf;
    --text-gray: #6b7280;
    --text-light-gray: #9ca3af;
    --border-gray: #ddd9cf;
    
    /* Semantic color names for consistency */
    --primary-color: #c9a962;
    --primary-dark: #a88b3e;
    --primary-light: #d4b96e;
    --secondary-color: #243029;
    --text-dark: #1c2420;
    --text-light: #6b7280;

    /* Legacy aliases (backward compat) */
    --purple: #c9a962;
    --purple-light: #d4b96e;
    --purple-dark: #a88b3e;

    --sat: env(safe-area-inset-top, 0px);
    --nav-h: 64px;                 /* jouw navbar min-height */
    --nav-total: calc(var(--nav-h) + var(--sat));
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Left Section - Quote */
.left-section {
    flex: 1;
    background: var(--dark-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
}

.quote-container {
    max-width: 500px;
}

.quote {
    font-size: 28px;
    line-height: 1.6;
    color: var(--white);
    font-weight: 300;
    letter-spacing: 0.3px;
}

.arabic {
    font-size: 24px;
}

/* Right Section - Login Form */
.right-section {
    flex: 1;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow-y: auto;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-primary);
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.subtitle {
    font-size: 15px;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.5;
}

/* Form Styles */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-row-inline {
    display: flex;
    gap: 12px;
}

.form-row-inline .form-input {
    flex: 1;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1.5px solid var(--border-gray);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    color: var(--dark-primary);
    background: var(--white);
}

.form-input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.form-input::placeholder {
    color: var(--text-light-gray);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.toggle-password:hover {
    opacity: 0.7;
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.forgot-password {
    text-align: left;
    margin-bottom: 24px;
}

.forgot-password a {
    font-size: 14px;
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password a:hover {
    color: var(--purple);
}

.login-button {
    width: 100%;
    padding: 14px;
    background: var(--purple);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.login-button:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 169, 98, 0.3);
}

.login-button:active {
    transform: translateY(0);
}

.signup-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-gray);
}

.signup-link a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.signup-link a:hover {
    color: var(--purple-dark);
}

/* Sign Up Form Specific Styles */
.signup-form {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 10px;
}

.signup-form::-webkit-scrollbar {
    width: 6px;
}

.signup-form::-webkit-scrollbar-track {
    background: transparent;
}

.signup-form::-webkit-scrollbar-thumb {
    background: var(--border-gray);
    border-radius: 3px;
}

.signup-form::-webkit-scrollbar-thumb:hover {
    background: var(--text-light-gray);
}

/* Terms and Conditions Checkbox */
.terms-checkbox {
    margin-bottom: 24px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
    position: relative;
    padding-left: 28px;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 18px;
    width: 18px;
    border: 1.5px solid var(--border-gray);
    border-radius: 4px;
    background-color: var(--white);
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--purple);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--purple);
    border-color: var(--purple);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-text {
    display: inline;
}

.checkbox-text a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* Gender Selection Buttons */
.gender-selection {
    margin-bottom: 20px;
}

.gender-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gender-button {
    position: relative;
    cursor: pointer;
}

.gender-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gender-button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: 1.5px solid var(--border-gray);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.gender-button:hover .gender-button-content {
    border-color: var(--purple-light);
    background: rgba(201, 169, 98, 0.02);
}

.gender-button input[type="radio"]:checked ~ .gender-button-content {
    border-color: var(--purple);
    background: var(--purple);
    color: var(--white);
}

.gender-button-content svg {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .gender-buttons {
        gap: 10px;
    }
    
    .gender-button-content {
        padding: 12px 10px;
        font-size: 14px;
        gap: 6px;
    }
    
    .gender-button-content svg {
        width: 18px;
        height: 18px;
    }
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 968px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    .left-section {
        padding: 40px 30px;
        min-height: auto;
        flex: none;
    }

    .quote {
        font-size: 22px;
    }

    .right-section {
        padding: 30px 20px;
        flex: none;
        overflow-y: visible;
    }

    .login-container {
        max-width: 100%;
    }

    .signup-form {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .left-section {
        padding: 24px 20px;
    }

    .quote {
        font-size: 18px;
    }

    h1 {
        font-size: 26px;
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .right-section {
        padding: 24px 16px;
    }

    .login-container {
        padding: 10px;
    }

    .logo {
        margin-bottom: 20px;
    }

    .whatsapp-button {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* ==========================================
   Notifications Panel (global)
   ========================================== */

.notif-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f0ede5;
}

.notif-panel-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notif-mark-all,
.notif-clear-all {
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--primary-color);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.notif-mark-all:hover,
.notif-clear-all:hover {
  background: rgba(201, 169, 98, 0.1);
}

.notif-clear-all {
  color: #ef4444;
}

.notif-clear-all:hover {
  background: rgba(239, 68, 68, 0.08);
}

.notif-panel-list {
  overflow-y: auto;
  flex: 1;
  max-height: 420px;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
  border-bottom: 1px solid #f8f6f0;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: #faf8f2;
}

.notif-item.unread {
  background: rgba(201, 169, 98, 0.04);
}

.notif-item.unread:hover {
  background: rgba(201, 169, 98, 0.08);
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 2px;
}

.notif-item-text {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.notif-item-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-item-time {
  font-size: 11px;
  color: var(--text-light-gray);
}

.notif-item-course {
  font-size: 10px;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(201, 169, 98, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.notif-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  flex-shrink: 0;
  align-self: center;
}

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-light);
}

.notif-empty p {
  font-size: 14px;
  margin: 0;
}

@media (max-width: 768px) {
  .notif-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 75vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  .notif-panel.active {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .notif-panel {
    max-height: 80vh;
  }

  .notif-item {
    padding: 12px 16px;
    gap: 10px;
  }

  .notif-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .notif-item-title {
    font-size: 12px;
  }
}

/* ==========================================
   Community Inzendingen Modal (global)
   ========================================== */

.community-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.community-modal-overlay.active {
  opacity: 1;
}

.community-modal {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.community-modal-overlay.active .community-modal {
  transform: translateY(0);
}

.community-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 0;
}

.community-modal-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.community-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f5f2ea;
  border: none;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.community-modal-close:hover {
  background: #eee9df;
  color: var(--text-dark);
}

.community-modal-body {
  padding: 20px 28px;
}

.community-modal-hint {
  font-size: 13px;
  color: var(--text-light);
  background: rgba(201, 169, 98, 0.07);
  padding: 10px 14px;
  border-radius: 10px;
  margin: 0 0 20px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.community-modal-hint::before {
  content: '✨';
  flex-shrink: 0;
}

.community-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.community-categories.community-hidden {
  display: none;
}

.community-category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: #faf8f2;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
}

.community-category-card:hover {
  background: #f5f2ea;
  border-color: rgba(201, 169, 98, 0.2);
}

.community-category-card.selected {
  background: rgba(201, 169, 98, 0.08);
  border-color: var(--primary-color);
}

.community-category-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.community-category-card.selected .community-category-icon {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--gold-dark) 100%);
  color: white;
}

.community-category-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.community-category-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.community-category-desc {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
}

.community-category-check {
  flex-shrink: 0;
  color: #ddd9cf;
  transition: color 0.2s ease;
}

.community-category-card.selected .community-category-check {
  color: var(--primary-color);
}

.community-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0ede5;
}

.community-form.community-hidden {
  display: none;
}

.community-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(201, 169, 98, 0.1);
  border-radius: 8px;
  margin-bottom: 16px;
}

.community-selected-badge svg {
  flex-shrink: 0;
}

.community-form-group {
  margin-bottom: 16px;
  position: relative;
}

.community-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.community-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-dark);
  background: #faf8f2;
  border: 1px solid #ddd9cf;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

.community-input:focus {
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.community-input::placeholder {
  color: var(--text-light-gray);
}

.community-textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-dark);
  background: #faf8f2;
  border: 1px solid #ddd9cf;
  border-radius: 10px;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: all 0.2s ease;
}

.community-textarea:focus {
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.community-textarea::placeholder {
  color: var(--text-light-gray);
}

.community-char-count {
  position: absolute;
  bottom: -18px;
  right: 4px;
  font-size: 11px;
  color: var(--text-light-gray);
}

.community-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
}

.community-success.community-hidden {
  display: none;
}

.community-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.community-success-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 8px;
}

.community-success-text {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

.community-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 28px 24px;
}

.community-btn-cancel {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-light);
  background: transparent;
  border: 1px solid #ddd9cf;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.community-btn-cancel:hover {
  background: #faf8f2;
  color: var(--text-dark);
}

.community-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: white;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--gold-dark) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.community-btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201, 169, 98, 0.35);
}

.community-btn-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.community-hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .community-modal {
    max-width: 100%;
    border-radius: 16px;
  }

  .community-modal-header {
    padding: 20px 20px 0;
  }

  .community-modal-body {
    padding: 16px 20px;
  }

  .community-modal-footer {
    padding: 4px 20px 20px;
  }

  .community-modal-title {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .community-modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .community-modal {
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
  }

  .community-category-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .community-category-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .community-category-label {
    font-size: 13px;
  }

  .community-category-desc {
    font-size: 11px;
  }
}

/* Prevent iOS auto-zoom on input focus */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="date"],
  input[type="datetime-local"],
  textarea,
  select {
    font-size: 16px !important;
  }
}
