/* Profile Page Styles */
body.profile-page {
  background: linear-gradient(135deg, #d98acc 0%, #8a5fbf 50%, #4a7fc2 100%);
}

/* Page Header */
.page-header {
  padding: 200px 0 80px;
  text-align: center;
  position: relative;
}

.page-header h1 {
  font-size: 48px;
  color: var(--light);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.page-header p {
  color: var(--light);
}

.page-header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 120%;
  height: 30%;
  background: var(--accent-3);
  z-index: -1;
  border-radius: 10px;
  opacity: 0.8;
  transform: rotate(-2deg);
}

.page-header p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* Common Section Styles */
.profile-section {
  padding: 60px 0;
  position: relative;
}

.profile-section:nth-child(even) {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  border-top: 1px dashed rgba(119, 88, 163, 0.2);
  border-bottom: 1px dashed rgba(119, 88, 163, 0.2);
}

/* About Us */
.about-content {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text p {
  font-size: 18px;
  margin-bottom: 20px;
}

.about-image {
  flex: 1;
  min-width: 300px;
  height: 350px;
  background: var(--gradient-fun);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  position: relative;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
  transform: rotate(2deg);
  border: 5px solid white;
}

/* Our History (Timeline) */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--primary);
  transform: translateX(-50%);
  border-radius: 2px;
  opacity: 0.3;
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: 50%;
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: 50%;
}

.timeline-content {
  background: var(--light);
  padding: 20px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 90%;
  position: relative;
}

.timeline-content h3 {
  color: var(--secondary);
  font-size: 24px;
  margin-bottom: 10px;
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  width: 20px;
  height: 20px;
  background: var(--accent-3);
  border: 4px solid var(--light);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(246, 196, 92, 0.3);
}

/* Visi & Misi */
.visi-misi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.vm-card {
  background: var(--light);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.vm-card h3 {
  color: var(--primary);
  font-size: 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vm-card ul {
  list-style: decimal inside;
}

.vm-card li {
  margin-bottom: 10px;
}

/* Legalitas */
.legalitas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.legalitas-card {
  background: var(--light);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
}

.legalitas-image {
  width: 100%;
  height: 300px;
  background: var(--gradient-fun);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 15px;
  transition: transform 0.3s;
}

.legalitas-image:hover {
  transform: scale(1.02);
}

/* Statistik & Social Media */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.stat-card {
  background: var(--gradient-main);
  color: var(--light);
  padding: 30px 20px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--box-shadow);
  transform: translateY(0);
  transition: transform 0.3s;
}

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

.stat-number {
  font-size: 48px;
  font-weight: 800;
  font-family: var(--font-heading);
  margin-bottom: 5px;
  display: block;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.social-card {
  background: var(--light);
  padding: 20px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--box-shadow);
  border: 2px solid transparent;
}

.social-card:hover {
  border-color: var(--accent-1);
}

.social-card .stat-number {
  color: var(--secondary);
  font-size: 36px;
}

/* Managerial Chart */
.managerial-wrapper {
  overflow-x: auto;
  padding: 20px 0;
}

.managerial-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 800px;
  position: relative;
}

.tree-level {
  display: flex;
  justify-content: center;
  gap: 40px;
  position: relative;
  padding-top: 40px;
  margin-top: 40px;
}

/* Connecting lines */
.tree-level::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 40px;
  background: var(--primary);
  transform: translateX(-50%);
}

.tree-node {
  position: relative;
  text-align: center;
}

/* Top horizontal line for siblings */
.tree-level.siblings::after {
  content: '';
  position: absolute;
  top: 0;
  left: calc(25% + 20px);
  right: calc(25% + 20px);
  height: 2px;
  background: var(--primary);
}

/* Vertical lines connecting siblings to the top horizontal line */
.tree-level.siblings .tree-node::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  width: 2px;
  height: 40px;
  background: var(--primary);
  transform: translateX(-50%);
}

/* Specific styling for Dewan Kehormatan (dashed coordination line) */
.dewan-node {
  position: absolute;
  right: -250px;
  top: 0;
  display: flex;
  align-items: center;
}

.dewan-line {
  width: 50px;
  height: 2px;
  border-bottom: 2px dashed var(--primary);
  margin-right: 20px;
}

.dewan-content {
  background: var(--light);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border: 1px dashed var(--primary);
}

.dewan-photos {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 10px;
}

.dewan-photo {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-1);
}

/* Manager Card styling */
.manager-card {
  width: 150px;
  background: var(--light);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  position: relative;
  z-index: 2;
}

.manager-role {
  background: var(--secondary);
  color: var(--light);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 10px;
}

.manager-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-fun);
  margin: 0 auto 10px;
  border: 3px solid var(--accent-1);
}

.manager-name {
  color: var(--dark);
  font-weight: 700;
  font-size: 14px;
}

/* Divisions Grid */
.divisions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  width: 100%;
  max-width: 1000px;
  position: relative;
}

.division-box {
  background: var(--light);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  position: relative;
}

/* Draw line to divisions */
.division-box::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  width: 2px;
  height: 40px;
  background: var(--primary);
}

.div-role {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 14px;
}

.div-members {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.div-member {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.div-m-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-2);
  margin-bottom: 5px;
}

.div-m-name {
  font-size: 10px;
  font-weight: 600;
}

/* Achievements */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.achievement-card {
  background: var(--light);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  gap: 15px;
}

.achievement-icon {
  font-size: 32px;
}

.achievement-text {
  font-weight: 600;
  color: var(--primary);
}

/* Partners */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.partner-logo {
  width: 100%;
  aspect-ratio: 1;
  background: var(--light);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-2);
  font-weight: bold;
  font-size: 14px;
  transition: var(--transition);
}

.partner-logo:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(119, 88, 163, 0.2);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--gradient-fun);
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(119, 88, 163, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: var(--light);
  font-size: 24px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}

/* Responsive Overrides */
@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .page-header {
    padding-top: 160px;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item, .timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-left: 50px;
    padding-right: 0;
  }
  
  .timeline-item::after {
    left: 20px;
  }
  
  .timeline-content {
    width: 100%;
  }
  
  .divisions-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
