:root {
  --primary-color: #f25c2c;
  --secondary-color: #ED832F;
  --text-color: #333;
  --muted-text-color: #555;
  --card-radius: 12px;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --section-padding: 5rem;
  --gap-large: 30px;
  --gap-medium: 20px;
  --gap-small: 10px;
}

/* ========== GLOBAL STYLES ========== */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  margin: 0;
  padding: 0;
  color: var(--text-color);
}

.container {
  width: 90%;
  margin: 40px auto;
}

h1 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

h2 {
  margin: 0;
  text-decoration: underline;
}

/* ========== Swamiji & Balaswamiji picture =========== */
#swamiji-balaswamiji {
  display: inline-flex;
  gap: 20px;
}

#swamiji-balaswamiji img {
  width: 500px;
  object-fit: cover;
}

/* ========== INTRO & ADMIN SECTIONS ========== */
.intro {
  margin-bottom: 30px;
  text-align: center;
  font-size: 1.1rem;
}

#mission-vision {
  text-align: left;
  font-style: normal;
}

.admin-controls {
  margin-bottom: 30px;
}

.admin-controls h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

.add-form {
  display: grid;
  gap: 15px;
  margin-bottom: 30px;
}

.add-form .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

/* ========== admin select person type ========== */
.person-type-selector {
  display: flex;
  gap: 10px;
}

.person-type-selector input[type="radio"] {
  display: none;
}

.person-type-selector label {
  padding: 10px 20px;
  background-color: #ccc;
  color: #000;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.person-type-selector input[type="radio"]:checked+label {
  background-color: orange;
  color: white;
}

/* ========== INPUTS & TEXTAREAS ========== */
input[type="text"],
input[type="file"] {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  min-width: 200px;
}

textarea.basic-textarea,
.rich-editor {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  font-family: inherit;
  background-color: #fff;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rich-editor {
  min-height: 120px;
}

/* ========== RICH TEXT TOOLBAR ========== */
.rich-text-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rich-text-toolbar button {
  background: #f4f4f4;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-color);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, transform 0.1s;
}

.rich-text-toolbar button:hover {
  background-color: #eaeaea;
  transform: scale(1.05);
}

/* ========== BUTTONS ========== */
.btn-primary {
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  align-self: start;
  width: 80px;
}

.btn-see-more {
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  display: inline-block;
  transition: background 0.3s;
  margin-top: auto;
}

.btn-see-more:hover {
  background-color: #c86625;
}

/* ========== TABS ========== */
.tab-header {
  display: flex;
  justify-content: center;
  gap: var(--gap-large);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 auto 1.5rem auto;
  border-bottom: 2px solid #eee;
  padding-bottom: 5px;
  max-width: 1000px;
}

.tab-header div {
  cursor: pointer;
  padding: 5px 0;
  position: relative;
  color: #000;
}

.tab-header .active {
  color: var(--primary-color);
  font-weight: 600;
  border-bottom: 3px solid var(--primary-color);
}

/* ========== PROFILE CARDS ========== */
.profile-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Two Columns for cards */
  justify-content: center;
  gap: var(--gap-medium);
  padding: var(--section-padding);
  /* background: #fafafa; */
}

.card {
  border: 1px solid #e5e5e5;
  border-radius: var(--card-radius);
  padding: 20px;
  text-align: center;
  background: #fff;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.3s;
  margin: 0 20px;
}

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

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 5px;
}

.role {
  font-size: 0.95rem;
  color: var(--muted-text-color);
  margin-bottom: 10px;
}

.short-bio {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Show 2 lines only */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4em;  /* Tweak as needed for vertical spacing */
}

.card .bio {
  display: none;
  font-size: 0.9rem;
  color: var(--text-color);
  margin: 10px 0;
}

.show-bio .bio {
  display: block;
}

.profile-img-div {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

/* ========== CARD ACTIONS ========== */
.actions {
  display: flex;
  justify-content: center;
  gap: var(--gap-small);
  margin-top: 10px;
}

.btn-edit {
  background: rgb(46, 76, 248);
  color: #fff;
}

.db-copy-button {
  background: #23a802;
  color: #fff;
}

.db-send-button {
  background: #e7395c;
  color: #fff;
}

.btn-delete {
  background: rgb(247, 56, 56);
  color: #fff;
}

.move-up, .move-down, .drag-handle {
  font-size: 1.2rem;
  color: black;
  padding: 0.3rem 0.6rem;
  background-color: whitesmoke;
  border-radius: 4px;
}
.move-up:hover, .move-down:hover {
  background-color: #ccc;
}

/* ========== ABOUT PAGE SPECIFICS ========== */
.about-section {
  display: flex;
  margin: 20px 100px;
}

#radha-jay {
  width: 90%;
}

#founder-pictures {
  display: flex;
  flex-direction: column;
  gap: var(--gap-medium);
  margin-left: 50px;
}

#founder-pictures img,
.swamiji,
.bala-swamiji,
.ssy-guruji {
  width: auto;
  max-width: 100%;
  object-fit: cover;
}

#founder-pictures img {
  height: 300px;
}

.swamiji {
  height: 50vh;
  margin-right: 50px;
}

.bala-swamiji {
  height: 300px;
}

.ssy-guruji {
  height: 500px;
  padding-bottom: 20px;
}

#ssy {
  display: flex;
  flex-direction: column;
  margin-left: 50px;
}

#ssy ul {
  padding-inline-start: 15px;
}

footer {
  margin-top: 20px;
}

/* ========== RESPONSIVE ========== */
@media screen and (max-width: 1200px) {
  #swamiji-balaswamiji {
    display: flex;
    flex-direction: column;
  }

  #swamiji-balaswamiji img {
    width: auto;
  }
  
  .about-section {
    flex-direction: column;
  }

  #radha-jay {
    width: 100%;
  }

  #founder-pictures {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin: auto;
  }

  #founder-pictures img {
    height: auto;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1/1;
  }

  .swamiji {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto 20px auto;
  }

  .bala-swamiji {
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: auto;
  }

  .ssy-guruji {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: auto;
  }

  #ssy {
    margin: 0;
  }
}

@media screen and (max-width: 768px) {
  .container {
    width: 95%;
    margin: 20px auto;
  }

  .about-section {
    flex-direction: column;
    margin: 20px;
  }

  #founder-pictures {
    flex-direction: column;
    margin-left: 0;
    gap: var(--gap-small);
    align-items: center;
  }

  .tab-header {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 5px;
    font-size: 1rem;
    gap: 15px;
  }

  .tab-header div {
    padding: 6px 12px;
  }

  .profile-cards {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .card {
    margin: 0;
    padding: 1rem;
  }

  .rich-text-toolbar {
    flex-wrap: wrap;
  }

  .rich-text-toolbar button {
    padding: 6px 10px;
    font-size: 1rem;
  }

  input[type="text"],
  input[type="file"],
  .btn-primary {
    width: 100%;
  }

  .btn-see-more {
    width: 100%;
    text-align: center;
  }

  body {
    scroll-padding-bottom: 80px;
  }
}

@media screen and (max-width: 480px) {
  .add-form .form-row {
    gap: 10px;
  }

  .add-form input[type="text"],
  .add-form input[type="file"] {
    font-size: 0.85rem;
    padding: 8px;
  }

  .rich-text-toolbar button {
    padding: 5px 8px;
    font-size: 0.9rem;
  }
}
