/* ==========================================================================
   2° CONGRESO INTERNACIONAL DE SALUD MENTAL PERINATAL - MORELOS
   Base Styles, Layout & Resets
   ========================================================================== */

/* Resets & Base Configuration */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-body);
  font-family: var(--font-body);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--accent-cyan-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section-alt {
  background-color: #eae5d9;
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.section-dark h2, .section-dark h3 {
  color: var(--text-light);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-olive);
  background-color: rgba(161, 181, 0, 0.12);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
  position: relative;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.75);
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);

  &:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }

  &:active {
    transform: translateY(0);
  }
}

.btn-primary {
  background-color: var(--primary-purple);
  color: #ffffff;
  border-color: var(--primary-purple);
}

.btn-primary:hover {
  background-color: var(--primary-purple-hover);
  color: #ffffff;
}

.btn-orange {
  background-color: var(--accent-orange);
  color: #ffffff;
  border-color: var(--accent-orange);
}

.btn-orange:hover {
  background-color: var(--accent-orange-hover);
  color: #ffffff;
}

.btn-magenta {
  background-color: var(--accent-magenta);
  color: #ffffff;
  border-color: var(--accent-magenta);
}

.btn-magenta:hover {
  background-color: #d80b6a;
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-purple);
  border-color: var(--primary-purple);
}

.btn-outline:hover {
  background-color: var(--primary-purple);
  color: #ffffff;
}

.btn-outline-light {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.btn-outline-light:hover {
  background-color: #ffffff;
  color: var(--primary-purple);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1.1rem 2.4rem;
  font-size: 1.125rem;
}

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(243, 239, 230, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
  height: 74px;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo-wrapper {
  height: 52px;
  width: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--accent-magenta);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-purple);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary-purple), var(--accent-magenta));
  border-radius: 2px;
  transition: var(--transition-fast);
}

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

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

.nav-link.active {
  color: var(--primary-purple);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Navigation Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-dark);
  font-size: 1.5rem;
}

/* Footer Styling */
.footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 4rem 0 2rem 0;
  border-top: 4px solid var(--accent-magenta);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-top: 1rem;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background-color: var(--accent-orange);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.925rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-cyan);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background-color: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
  }

  .nav-links.open {
    right: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
