/* ==========================================================================
   ALPHA DRAGON STUDIO — DARK OBSIDIAN THEME & CUSTOM STYLES
   Designed for David Martínez Portfolio
   ========================================================================== */

:root {
  --bg-dark: #0a0b0e;
  --bg-surface: #12141a;
  --bg-surface-card: #181b24;
  --bg-surface-glass: rgba(24, 27, 36, 0.75);
  
  --accent-red: #ff2e4c;
  --accent-red-hover: #e0253f;
  --accent-gold: #e2b04e;
  
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 46, 76, 0.3);
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base Rules --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .section-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-red);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-red) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.text-accent-red {
  color: var(--accent-red) !important;
}

.bg-dark-surface {
  background-color: var(--bg-surface) !important;
}

/* --- Navigation --- */
#mainNav {
  padding: 1.25rem 0;
  background-color: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
}

#mainNav.navbar-shrink {
  padding: 0.75rem 0;
  background-color: rgba(10, 11, 14, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.brand-logo {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
}

.brand-text {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    letter-spacing: 1px;
  color: #fff;
  letter-spacing: 0.05em;
}

.brand-text small {
    font-family: 'Helvetica Neue LT Std', Arial, Helvetica, sans-serif, sans-serif;
    font-size: 0.55em;
    font-weight: 400;
    letter-spacing: 30px;
    display: block;
    text-align: center;
}

#mainNav .nav-link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: #d1d5db;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem !important;
  transition: var(--transition-smooth);
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--accent-red);
}

.btn-accent-nav {
  background: linear-gradient(135deg, var(--accent-red), #b3122a);
  color: #fff !important;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 46, 76, 0.3);
}

.btn-accent-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 46, 76, 0.5);
}

/* --- Hero Masthead --- */
header.masthead {
  position: relative;
  padding-top: 11rem;
  padding-bottom: 7rem;
  text-align: center;
  background: radial-gradient(circle at top center, rgba(255, 46, 76, 0.12) 0%, transparent 60%),
              url('../assets/img/Bg-img.JPG') center/cover no-repeat;
  border-bottom: 1px solid var(--border-glass);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 11, 14, 0.75) 0%, rgba(10, 11, 14, 0.95) 100%);
  z-index: 1;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  color: #e5e7eb;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

header.masthead .masthead-heading {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

header.masthead .masthead-subheading {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

/* Custom Buttons */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--accent-red), #c81e37);
  color: #fff;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 8px;
  padding: 1rem 2rem;
  box-shadow: 0 10px 25px rgba(255, 46, 76, 0.35);
  transition: var(--transition-smooth);
}

.btn-primary-custom:hover {
  background: linear-gradient(135deg, #ff4762, var(--accent-red));
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(255, 46, 76, 0.5);
}

.btn-outline-light-custom {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border: 1px solid var(--border-glass);
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 8px;
  padding: 1rem 2rem;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.btn-outline-light-custom:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

/* Hero Metrics Bar */
.hero-metrics-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  padding: 1.5rem 2.5rem;
  border-radius: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-num {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-divider {
  width: 1px;
  height: 40px;
  background: var(--border-glass);
}

.scroll-down-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--text-muted);
  font-size: 1.2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
  40% { transform: translate(-50%, -10px); }
  60% { transform: translate(-50%, -5px); }
}

/* --- Section Global Styling --- */
.page-section {
  padding: 6rem 0;
  position: relative;
}

.section-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-red);
  margin-bottom: 0.5rem;
}

.section-heading {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.section-subheading {
  font-size: 1rem;
  color: var(--text-muted) !important;
  max-width: 650px;
  margin: 0 auto;
  font-weight: 400;
}

/* --- Services Section --- */
.service-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glass-hover);
  box-shadow: 0 15px 35px rgba(255, 46, 76, 0.15);
}

.service-icon-wrapper {
  width: 60px;
  height: 60px;
  background: rgba(255, 46, 76, 0.1);
  color: var(--accent-red);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  color: #d1d5db;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
}

/* --- Portfolio Grid --- */
.portfolio-item {
  background: var(--bg-surface-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
}

.portfolio-item:hover {
  transform: translateY(-6px);
  border-color: var(--border-glass-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.portfolio-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.portfolio-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #1a1c23;
}

.portfolio-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img-wrapper img {
  transform: scale(1.08);
}

.portfolio-hover {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

.portfolio-item:hover .portfolio-hover {
  opacity: 1;
}

.portfolio-hover-content {
  text-align: center;
  color: #fff;
}

.portfolio-caption {
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface-card);
}

.portfolio-caption-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.portfolio-caption-subheading {
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* --- Portfolio Modals --- */
.portfolio-modal .modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
}

.btn-close-custom {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.btn-close-custom:hover {
  background: var(--accent-red);
  transform: rotate(90deg);
}

/* --- Galería de Imágenes Adaptables (Sin recortes) --- */
.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: center;
}

.portfolio-gallery a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.2);
}

.portfolio-gallery img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain; /* Garantiza mostrar la imagen completa sin recortar */
  display: block;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.portfolio-gallery img:hover {
  transform: scale(1.03);
}

/* --- Estilos Especiales para Tarjetas de Video --- */
.videos-secundarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.video-card-vertical {
  position: relative;
  width: 100%;
  height: auto;
  background-color: #0d0f14;
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.video-card-vertical:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
  box-shadow: 0 15px 30px rgba(255, 46, 76, 0.25);
}

.video-card-vertical video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain; /* Muestra el video completo sin deformar ni recortar */
  display: block;
  background-color: #0d0f14;
}

.videos-horizontal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.video-card-horizontal {
  position: relative;
  width: 100%;
  height: auto;
  background-color: #0d0f14;
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.video-card-horizontal:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
  box-shadow: 0 15px 30px rgba(255, 46, 76, 0.25);
}

.video-card-horizontal video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain; /* Muestra el video completo sin deformar ni recortar */
  display: block;
  background-color: #0d0f14;
}

.video-embed-container {
  position: relative;
  padding-bottom: 56.25%; /* Relación 16:9 estándar para iFrames */
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border-glass);
  background-color: #000;
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 576px) {
  .portfolio-gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }
  
  .videos-secundarios-grid,
  .videos-horizontal-grid {
    grid-template-columns: 1fr; /* En pantallas pequeñas se apilan a 1 columna para mejor visualización */
    gap: 1rem;
  }
}

.flipbook-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
}
/* ==========================================================================
   ESTILOS DE TIMELINE CRONOLÓGICA (ACERCA DE MÍ)
   ========================================================================== */

/* Contenedor principal de la línea */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

/* Línea vertical conectora central */
.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background-color: #e0253f; /* Color acento dorado/naranja (ajustable) */
    transform: translateX(-50%);
    z-index: 1;
}

/* Espaciado vertical amplio entre hitos cronológicos */
.timeline > li {
    position: relative;
    min-height: 180px;
    margin-bottom: 90px; /* Aumenta este valor si deseas aún más separación */
}

/* Asegurar que el último elemento mantenga margen */
.timeline > li:last-child {
    margin-bottom: 0;
}

/* Imagen circular sobre la línea central */
.timeline .timeline-image {
    position: absolute;
    left: 50%;
    width: 120px;
    height: 120px;
    margin-left: -60px;
    text-align: center;
    color: #fff;
    border-radius: 100%;
    background-color: #1a1a1a;
    border: 4px solid #ff2e4c;
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.timeline .timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Paneles de texto intercalados a izquierda y derecha */
.timeline .timeline-panel {
    position: relative;
    width: 42%;
    float: left;
    padding: 0 20px;
    text-align: right;
}

/* Elementos invertidos a la derecha */
.timeline > li.timeline-inverted .timeline-panel {
    float: right;
    text-align: left;
}

/* Badge circular del final */
.timeline-end-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff2e4c, #e0253f) !important;
    border-color: #fff !important;
}

.timeline-end-badge h4 {
    font-size: 0.75rem;
    line-height: 1.2;
    margin: 0;
    font-weight: 800;
    text-transform: uppercase;
    color: #ffffff;
}

/* Limpieza de flotantes */
.timeline > li::after {
    content: "";
    display: table;
    clear: both;
}

/* Adaptación responsive para pantallas móviles */
@media (max-width: 767px) {
    .timeline::before {
        left: 40px;
    }
    .timeline .timeline-image {
        left: 40px;
        width: 80px;
        height: 80px;
        margin-left: -40px;
    }
    .timeline .timeline-panel {
        width: calc(100% - 90px);
        float: right;
        text-align: left;
        padding: 0 0 0 20px;
    }
    .timeline > li.timeline-inverted .timeline-panel {
        float: right;
        text-align: left;
    }
    .timeline-end-badge h4 {
        font-size: 0.6rem;
    }
}

.tech-stack-box {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
}

.badge-tool {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  color: #e5e7eb;
}

/* --- Profile & Socials --- */
.team-member-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
}

.rounded-square-custom {
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid var(--border-glass);
}

.btn-social-custom {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-social-custom:hover {
  background: var(--accent-red);
  color: #fff;
  transform: translateY(-3px);
}

.btn-social-wa:hover {
  background: #25d366 !important;
}

.brand-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
}

.img-brand {
  max-height: 60px;
  width: auto;
  filter: grayscale(100%) opacity(0.7);
  transition: var(--transition-smooth);
}

.brand-card:hover .img-brand {
  filter: grayscale(0%) opacity(1);
}


/* --- Contact Form --- */
section#contact {
  background: radial-gradient(circle at bottom center, rgba(255, 46, 76, 0.1) 0%, var(--bg-dark) 70%);
  border-top: 1px solid var(--border-glass);
}

.contact-form-styled .form-control {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

.contact-form-styled .form-control:focus {
  background: var(--bg-surface);
  border-color: var(--accent-red);
  box-shadow: 0 0 15px rgba(255, 46, 76, 0.25);
  color: #fff;
}

.contact-form-styled .form-control::placeholder {
  color: #6b7280;
}

.alert-success-custom {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  border-radius: 12px;
  padding: 1.5rem;
}

.form-info-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 14, 0.95);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  display: flex;
  opacity: 1;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-glass);
  font-size: 0.85rem;
}

.link-dark-custom {
  color: var(--text-muted);
}

.link-dark-custom:hover {
  color: #fff;
}


/* Customización del botón de menú hamburguesa (Móvil) */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde sutil */
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Cambiar el color del texto ("Menú") y del icono (las 3 barras) */
.navbar-toggler .menu-label,
.navbar-toggler .fa-bars {
    color: #ff3366; /* <-- CAMBIA ESTE CÓDIGO HEX POR TU COLOR PREFERIDO */
}

/* Color al pasar el cursor o presionar (Hover / Focus) */
.navbar-toggler:hover,
.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.4); /* Brillo con tu color de acento */
    border-color: #ff3366;
}

/* Asegurar alineación del logo a la izquierda y el menú a la derecha */
@media (max-width: 991.98px) {
    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}