:root {
  /* GitHub Color Palette */
  --primary-blue: #0969da;
  --success-green: #1a7f37;
  --warning-orange: #9a6700;
  --danger-red: #cf222e;
  --text-primary: #24292f;
  --text-secondary: #57606a;
  --text-muted: #6e7781;
  --bg-main: #ffffff;
  --bg-canvas: #f6f8fa;
  --bg-subtle: #f6f8fa;
  --border-default: #d0d7de;
  --border-muted: #d8dee4;
  --shadow-sm: 0 1px 0 rgba(27, 31, 36, 0.04);
  --shadow-md: 0 3px 6px rgba(140, 149, 159, 0.15);
  --shadow-lg: 0 8px 24px rgba(140, 149, 159, 0.2);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* BICE Inspired Palette */
  --bice-blue: #2b4c7e;
  --bice-light-blue: #eef2f7;
  --bice-gradient: linear-gradient(180deg, #eef2f7 0%, #ffffff 100%);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  background: #f4f7f9;
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ===== GITHUB HEADER ===== */
.github-header {
  background: rgba(36, 41, 47, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

.repo-path {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.repo-owner,
.repo-name {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.repo-owner:hover,
.repo-name:hover {
  text-decoration: underline;
}

.separator {
  color: rgba(255, 255, 255, 0.6);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* ===== GITHUB NAVIGATION ===== */
.github-nav {
  background: rgba(246, 248, 2fa, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-default);
  padding: 0 32px;
  z-index: 90;
}

.nav-container {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  border-bottom: 2px solid transparent;
  transition: border-color 0.1s ease;
  white-space: nowrap;
}

.nav-item:hover {
  border-bottom-color: var(--border-muted);
}

.nav-item.active {
  border-bottom-color: #fd8c73;
  font-weight: 600;
}

.nav-icon {
  font-size: 16px;
}

/* ===== MAIN CONTAINER ===== */
.content-wrapper {
  flex: 1;
  overflow-y: auto;
  width: 100%;
  background: #f4f7f9;
  /* Replicating the BICE background with more detail */
  background-image:
    radial-gradient(circle at 100% 100%, rgba(43, 76, 126, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 0% 0%, rgba(43, 76, 126, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #eef2f7 0%, #ffffff 100%);
  position: relative;
}

/* Abstract wave/shape effect from the image */
.content-wrapper::before {
  content: "";
  position: fixed;
  bottom: -150px;
  right: -150px;
  width: 800px;
  height: 800px;
  background: rgba(43, 76, 126, 0.05);
  border-radius: 45% 55% 70% 30% / 30% 60% 40% 70%;
  z-index: 0;
  pointer-events: none;
  animation: wave-float 20s infinite alternate ease-in-out;
}

.content-wrapper::after {
  content: "";
  position: fixed;
  top: 10%;
  left: -200px;
  width: 600px;
  height: 600px;
  background: rgba(43, 76, 126, 0.04);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  z-index: 0;
  pointer-events: none;
  animation: wave-float 25s infinite alternate-reverse ease-in-out;
}

@keyframes wave-float {
  from {
    transform: rotate(0deg) translate(0, 0);
  }

  to {
    transform: rotate(20deg) translate(40px, 60px);
  }
}

.github-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 120px 32px;
  position: relative;
  z-index: 1;
}

.main-area {
  width: 100%;
}

/* ===== BICE INSPIRED SECTIONS ===== */
.componentes-section,
.arquitectura-section,
.inicio-section {
  padding: 40px 0;
  min-height: calc(100vh - 150px);
  margin-bottom: 40px;
}

.componentes-card,
.arquitectura-card,
.inicio-card {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px;
  /* Ultimate Acrylic Effect */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 32px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.componentes-card::before,
.arquitectura-card::before,
.inicio-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  pointer-events: none;
}

.componentes-card h2,
.arquitectura-card h2,
.inicio-card h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--bice-blue);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.componentes-card>p,
.arquitectura-card>p,
.inicio-card>p {
  color: #475467;
  font-size: 16px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

/* BICE Style Info Grid (Action Buttons) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  justify-items: center;
  position: relative;
  z-index: 1;
}

.info-item {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 30px 20px;
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.info-item:hover {
  transform: translateY(-12px) scale(1.05);
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.info-item .icon-wrapper {
  font-size: 40px;
  margin-bottom: 16px;
  color: var(--bice-blue);
}

.info-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: #344054;
  margin: 0;
}

/* Investment Card Style (Horizontal) - Acrylic */
.investment-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.investment-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
}

.investment-image {
  width: 200px;
  background-size: cover;
  background-position: center;
  background-color: rgba(244, 247, 249, 0.5);
}

.investment-content {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.investment-tag {
  background: #4e73df;
  color: white;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
  margin-bottom: 12px;
}

.investment-text {
  font-size: 14px;
  color: #344054;
  line-height: 1.4;
}

.investment-text strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  color: #101828;
}

.chevron-right {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  color: #4e73df;
  font-size: 24px;
}

/* ===== FOOTER ===== */
.custom-footer {
  background: rgba(63, 64, 80, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 15px 0 14px 0;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 100;

}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 20px 20px;
}

.footer-left-contact {
  display: flex;
  gap: 20px;
  font-size: 12px;
  text-transform: uppercase;
}

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

.footer-right-social {
  display: flex;
  gap: 15px;
}

.social-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.social-icon::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  animation: ripple 4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  30% {
    transform: scale(2.2);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.footer-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  max-width: 1200px;
  margin: 0 auto 13px auto;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 12px;
}

.footer-nav-links {
  display: flex;
  gap: 25px;
}

.footer-nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-btn {
  background: linear-gradient(135deg, #0969da 0%, #0550ae 100%);
  color: white !important;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(9, 105, 218, 0.4);
}

/* ===== MODAL STYLES ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(43, 76, 126, 0.2);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.acrylic-modal {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 32px;
  width: 100%;
  max-width: 600px;
  padding: 40px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
  animation: modalFadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.close-modal {
  position: absolute;
  right: 24px;
  top: 24px;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--bice-blue);
}

.modal-header h2 {
  color: var(--bice-blue);
  font-size: 24px;
  margin-bottom: 8px;
}

.modal-header p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.modal-section {
  background: rgba(43, 76, 126, 0.03);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(43, 76, 126, 0.05);
}

.modal-section h3 {
  color: var(--bice-blue);
  font-size: 18px;
  margin-bottom: 12px;
}

.modal-section p {
  font-size: 14px;
  color: #475467;
  margin-bottom: 12px;
}

.modal-section ul {
  list-style: none;
  padding-left: 0;
}

.modal-section li {
  font-size: 14px;
  color: #475467;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section li::before {
  content: "•";
  color: var(--bice-blue);
  font-weight: bold;
}

.modal-tag {
  display: inline-block;
  background: rgba(43, 76, 126, 0.1);
  color: var(--bice-blue);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 12px;
}

/* ===== FORM STYLES ===== */
.premium-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--bice-blue);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(43, 76, 126, 0.1);
  background: rgba(255, 255, 255, 0.5);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(9, 105, 218, 0.1);
}

.submit-btn {
  background: linear-gradient(135deg, #0969da 0%, #0550ae 100%);
  color: white;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(9, 105, 218, 0.3);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  background: linear-gradient(135deg, #6e7781 0%, #57606a 100%);
}

.form-response {
  margin-top: 15px;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  display: none;
}

.form-response.success {
  display: block;
  background: rgba(26, 127, 55, 0.1);
  color: var(--success-green);
  border: 1px solid rgba(26, 127, 55, 0.2);
}

.form-response.error {
  display: block;
  background: rgba(207, 34, 46, 0.1);
  color: var(--danger-red);
  border: 1px solid rgba(207, 34, 46, 0.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .acrylic-modal {
    padding: 24px;
  }
}

/* ===== INTERNAL PAGES LAYOUT (Simuladores & Componentes) ===== */
.app-wrapper {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background: #1a2b4b;
  color: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-top {
  padding: 32px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
  flex: 1;
  padding: 24px 0;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.menu-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left: 4px solid #4e73df;
}

.sidebar-bottom {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  overflow-y: auto;
}

.header {
  padding: 24px 40px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 1.5rem;
  color: #1a2b4b;
  margin: 0;
}

.btn-back {
  color: #64748b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-back:hover {
  color: #1a2b4b;
}

.content {
  padding: 40px;
  flex: 1;
}

.intro-section {
  margin-bottom: 40px;
}

.intro-section h2 {
  font-size: 1.8rem;
  color: #1a2b4b;
  margin-bottom: 8px;
}

.intro-section p {
  color: #64748b;
  font-size: 1.1rem;
}

.componentes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.componente-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.componente-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.componente-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.componente-icon {
  font-size: 1.5rem;
}

.componente-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #1a2b4b;
}

.componente-desc {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.componente-preview {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 16px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.componente-link {
  margin-top: auto;
  color: #4e73df;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.footer {
  padding: 24px 40px;
  border-top: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
}