/* style.css */

/* ============ VARIABLES ============ */
:root {
  --color-primary: #651F3B;
  --color-secondary: #9C5A89;
  --color-accent: #F2B380;
  --color-footer: #6D8CA8;
  --color-bg: #FDF6EF;
  --color-text: #333333;
  --color-white: #FFFFFF;
}

/* ============ BASE STYLES ============ */
body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============ HEADER STYLES ============ */
.header {
  width: 100%;
  padding: 1rem 0;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 999;
}

.header-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .header-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .header-container {
    padding: 0 2rem;
  }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 2.5rem;
  width: auto;
}

.logo-text {
  color: var(--color-white);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.logo-bold {
  font-weight: 800;
}

/* ============ NAVIGATION ============ */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  position: relative;
  color: var(--color-white);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.admin-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--color-accent);
  color: var(--color-primary);
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.admin-btn:hover {
  background-color: rgba(242, 179, 128, 0.9);
}

/* ============ MOBILE MENU ============ */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: var(--color-white);
  transition: color 0.3s ease;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-btn:hover {
  color: var(--color-accent);
}

.mobile-menu {
  padding: 0.5rem 1rem;
  margin: 0.5rem 1rem;
  background-color: var(--color-secondary);
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.mobile-menu-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: var(--color-white);
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.mobile-menu-link:hover {
  background-color: var(--color-primary);
}

/* ============ MAIN CONTENT ============ */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .main-content {
    padding: 2.5rem 1.5rem;
  }
}

/* ============ FOOTER ============ */
.footer {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-footer) 100%);
  color: var(--color-white);
  margin-top: 4rem;
}

.footer-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-logo {
  grid-column: span 2;
}

.footer-about {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo-img {
  height: 3rem;
  width: auto;
}

.footer-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-description {
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  font-size: 0.875rem;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.footer-link:hover {
  transform: translateY(-2px);
  opacity: 1;
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 2rem;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-copyright {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .footer-copyright {
    margin-bottom: 0;
  }
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-link {
  color: var(--color-white);
  transition: color 0.3s ease;
}

.social-link:hover {
  color: var(--color-accent);
}

.social-icon {
  height: 1.25rem;
  width: 1.25rem;
}

/* ============ Binnacle  ============ */

/* ============ TIMELINE WITH INDICATOR ============ */
.timeline-card {
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  padding: 3rem 2rem;
  margin: 3rem auto;
  position: relative;
  overflow: hidden;
  max-width: 1200px;
}

.timeline-header {
  text-align: center;
  margin-bottom: 3rem;
}

.timeline-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  position: relative;
}

.timeline-header h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--color-accent);
}

.main-timeline {
  position: relative;
  padding-left: 50px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.main-timeline.loaded {
  opacity: 1;
  transform: translateY(0);
}

.main-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  height: 100%;
  width: 3px;
  background: linear-gradient(to bottom, 
    rgba(101, 31, 56, 0.2), 
    var(--color-primary), 
    var(--color-secondary), 
    rgba(156, 90, 137, 0.2));
  z-index: 1;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 15px; /* Ajustado para centrar mejor la imagen */
  right: 15px;
  width: 44px; /* Tamaño aumentado para logo */
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  border: 4px solid var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary);
  z-index: 10;
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: pulse 2s infinite;
}

.timeline-progress img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(101, 31, 56, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(101, 31, 56, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(101, 31, 56, 0);
  }
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  padding-left: 30px;
  opacity: 0.3;
  filter: grayscale(70%);
  transition: all 0.5s ease;
}

.timeline-item.active {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateX(5px);
}

.timeline-dot {
  position: absolute;
  left: 30px;
  top: 2rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px solid var(--color-primary);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-item.active .timeline-dot {
  background: var(--color-primary);
  transform: scale(1.2);
}

.timeline-content {
  background: var(--color-white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-left: 4px solid rgba(101, 31, 56, 0.3);
  transition: all 0.5s ease;
}

.timeline-item.active .timeline-content {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--color-primary);
}

.timeline-date {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: rgba(101, 31, 56, 0.2);
  color: var(--color-primary);
  font-weight: 600;
  border-radius: 30px;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.timeline-item.active .timeline-date {
  background: var(--color-primary);
  color: var(--color-white);
}

.timeline-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(101, 31, 56, 0.7);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.timeline-item.active .timeline-title {
  color: var(--color-primary);
}

.timeline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 15px;
  background: rgba(101, 31, 56, 0.1);
  color: rgba(101, 31, 56, 0.5);
  border-radius: 50%;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.timeline-item.active .timeline-icon {
  background: var(--color-primary);
  color: var(--color-white);
}

.timeline-description {
  color: rgba(51, 51, 51, 0.6);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.timeline-item.active .timeline-description {
  color: var(--color-text);
}

.timeline-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(242, 179, 128, 0.3);
  color: rgba(101, 31, 56, 0.7);
  font-weight: 700;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.timeline-item.active .timeline-badge {
  background: var(--color-accent);
  color: var(--color-primary);
}

/* Responsive styles */
@media (min-width: 992px) {
  .main-timeline {
    padding-left: 0;
  }
  
  .main-timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .timeline-progress {
    left: calc(50% - 20px);
  }
  
  .timeline-item {
    width: 50%;
    padding-left: 0;
  }
  
  .timeline-item:nth-child(odd) {
    margin-left: auto;
    padding-right: 50px;
    text-align: right;
  }
  
  .timeline-item:nth-child(even) {
    padding-left: 50px;
  }
  
  .timeline-item:nth-child(odd) .timeline-dot {
    left: auto;
    right: -10px;
  }
  
  .timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
  }
  
  .timeline-item:nth-child(odd) .timeline-content {
    border-left: none;
    border-right: 4px solid rgba(156, 90, 137, 0.3);
  }
  
  .timeline-item:nth-child(odd).active .timeline-content {
    border-right: 4px solid var(--color-secondary);
  }
}

@keyframes bounceEffect {
    0%   { transform: translateY(-30px); opacity: 0; }
    50%  { transform: translateY(10px); opacity: 1; }
    100% { transform: translateY(0); }
}

#genderLetter.bounce {
    animation: bounceEffect 0.5s ease-in-out;
}