:root {
  --primary: #1d1d1b;
  --secondary: #0400ff;
  --accent: #ffffff;
  --text: #ffffff;
  --transition: all 0.3s ease;
  --heading-font: "Julius Sans One", sans-serif;
  --body-font: "Jost", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--body-font);
  background-color: var(--primary);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== LOADER ===== */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: var(--transition);
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-logo {
  width: 100px;
  height: auto;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.5; transform: scale(0.95); }
}

/* ===== HEADER ===== */
header {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.header-content {
  text-align: center;
  z-index: 1;
  padding: 2rem;
  max-width: 800px;
}

.site-title {
  font-family: var(--heading-font);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.site-subtitle {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.2rem;
  margin-bottom: 2rem;
}

.video-bg, .fallback-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.4);
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: var(--transition);
}

nav.scrolled {
  background-color: rgba(28, 28, 28, 0.9);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 1rem 3rem;
}

.logo { display: flex; align-items: center; }
.logo-img { height: 40px; width: auto; transition: opacity 0.3s ease; }
.logo-img:hover { opacity: 0.8; }

.nav-menu { display: flex; list-style: none; }
.nav-item { margin-left: 2rem; }
.nav-link {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  transition: 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0.3rem;
  left: 0.5rem;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease-in-out;
}
.nav-link:hover { background-color: rgba(255, 255, 255, 0.1); color: var(--accent); }
.nav-link:hover::after { width: calc(100% - 1rem); }

.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 2px; margin: 5px auto; background-color: var(--text); transition: var(--transition); }

/* ===== SECTIONS ===== */
section { padding: 6rem 3rem; }

.section-title {
  font-family: var(--heading-font);
  font-size: 4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  margin-bottom: 3rem;
  text-align: center;
}

.section-subtitle {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.1rem;
  margin-bottom: 3rem;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== QUIENES SOMOS (MUSIC) SECTION ===== */
#music .album {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    background: none;
    box-shadow: none;
    border: none;
    animation: none;
}

#music .album:hover {
    transform: none;
    box-shadow: none;
}

#music .album-description {
    flex-basis: 100%;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    font-size: 1.2rem;
    line-height: 1.7;
}

#music .album-cover {
    width: 100%;
    max-width: 1500px;
    aspect-ratio: 16 / 2;
    object-fit: cover;
    border-radius: 15px;
    transition: var(--transition);
}

#music .album-cover:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* ===== SERVICIOS SECTION ===== */
#Servicios .music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

#Servicios .album {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 20px;
  transition: var(--transition);
  width: 100%;
  animation: none; /* Reset animation from articles */
}

#Servicios .album:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

#Servicios .album-cover {
  width: 100%;
  height: 200px;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border-radius: 10px;
}

#Servicios .album-title {
  font-family: var(--heading-font);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#Servicios .album-description {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.portfolio-btn {
    /* Estilos copiados de .Article-link */
    display: inline-block;
    background: linear-gradient(45deg, #1d1d1b, #0400ff);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none; /* Se quita el borde anterior */
    cursor: pointer;
    font-size: 0.9rem; /* Ajuste de tamaño */
}

.portfolio-btn:hover {
    /* Efecto hover copiado de .Article-link */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ===== PORTFOLIO MODAL ===== */
.modal {
  display: none; position: fixed; z-index: 1000; left: 0; top: 0;
  width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}
.modal.active { display: flex; align-items: center; justify-content: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background-color: var(--primary); padding: 2rem; border-radius: 20px;
  max-width: 90%; max-height: 90%; overflow-y: auto; position: relative;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 1rem;
}
.modal-title { font-family: var(--heading-font); font-size: 2.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2rem; }
.close-btn { background: none; border: none; color: var(--text); font-size: 2rem; cursor: pointer; transition: var(--transition); padding: 0.5rem; }
.close-btn:hover { color: var(--accent); transform: rotate(90deg); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.portfolio-item { background-color: rgba(255, 255, 255, 0.05); border-radius: 15px; overflow: hidden; transition: var(--transition); position: relative; }
.portfolio-item:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }
.portfolio-image { width: 100%; height: 200px; object-fit: cover; transition: var(--transition); }
.portfolio-item:hover .portfolio-image { transform: scale(1.05); }
.portfolio-info { padding: 1.5rem; }
.portfolio-title { font-family: var(--heading-font); font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; text-transform: uppercase; }
.portfolio-description { font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); margin-bottom: 1rem; line-height: 1.5; }
.portfolio-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.portfolio-tag { padding: 0.3rem 0.8rem; background-color: rgba(255, 255, 255, 0.1); border-radius: 20px; font-size: 0.8rem; color: var(--accent); }
.portfolio-links { display: flex; gap: 1rem; }
.portfolio-link { padding: 0.5rem 1rem; border: 1px solid var(--accent); color: var(--text); text-decoration: none; font-size: 0.8rem; letter-spacing: 0.1rem; text-transform: uppercase; transition: var(--transition); border-radius: 5px; }
.portfolio-link:hover { background-color: var(--accent); color: var(--primary); }
.portfolio-link.demo { background-color: var(--secondary); border-color: var(--secondary); }
.portfolio-link.demo:hover { background-color: var(--accent); border-color: var(--accent); }

/* ===== ARTICULOS SECTION ===== */
#Articulos { max-width: 1200px; margin: 0 auto; padding: 60px 20px; }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }

#Articulos .album {
    background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px);
    border-radius: 20px; padding: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2); position: relative;
    overflow: hidden; cursor: pointer;
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}
#Articulos .album:hover { transform: translateY(-15px) scale(1.02); box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3); border-color: rgba(255, 255, 255, 0.4); }

.Article-cover { width: 100%; height: 200px; object-fit: cover; border-radius: 15px; transition: all 0.4s ease; margin-bottom: 20px; filter: brightness(0.9); }
#Articulos .album:hover .Article-cover { transform: scale(1.05); filter: brightness(1.1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }

.Article-title { font-size: 1.5em; color: white; margin-bottom: 8px; font-weight: 600; transition: color 0.3s ease; }
#Articulos .album:hover .Article-title { color: #0000EC; }

.Article-year { font-size: 0.9em; color: rgba(255, 255, 255, 0.7); margin-bottom: 12px; font-weight: 300; text-transform: uppercase; letter-spacing: 1px; }
.Article-description { color: rgba(255, 255, 255, 0.8); line-height: 1.6; margin-bottom: 20px; font-size: 0.95em; }

.Article-link {
    display: inline-block; background: linear-gradient(45deg, #1d1d1b, #0400ff);
    color: white; text-decoration: none; padding: 12px 25px; border-radius: 25px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.Article-link:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

#Articulos .album:nth-child(1) { animation-delay: 0.1s; }
#Articulos .album:nth-child(2) { animation-delay: 0.2s; }
#Articulos .album:nth-child(3) { animation-delay: 0.3s; }
#Articulos .album:nth-child(4) { animation-delay: 0.4s; }


/* ===== CONTACT ===== */
.contact-form { max-width: 600px; margin: 0 auto; width: 100%; }
.form-group { margin-bottom: 1.5rem; }
.form-control { width: 100%; padding: 1rem; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text); font-family: var(--body-font); font-size: 1rem; transition: var(--transition); box-sizing: border-box; }
.form-control:focus { outline: none; border-color: var(--accent); }
textarea.form-control { min-height: 150px; resize: vertical; }
.submit-btn { display: inline-block; padding: 1rem 2rem; background-color: transparent; border: 1px solid var(--accent); color: var(--text); font-size: 1rem; letter-spacing: 0.2rem; text-transform: uppercase; cursor: pointer; transition: var(--transition); }
.submit-btn:hover { background-color: var(--accent); color: var(--primary); }

/* ===== FOOTER ===== */
footer { padding: 3rem; background-color: #151515; text-align: center; }
.social-links { display: flex; justify-content: center; margin-bottom: 2rem; }
.social-link { display: inline-block; margin: 0 15px; text-decoration: none; transition: transform 0.3s ease; }
.social-link:hover { transform: scale(1.1); }
.spotify-svg { width: 40px; height: 40px; fill: #1db954; transition: fill 0.3s ease; }
.social-link:hover .spotify-svg { fill: #1ed760; }
.footer-text { margin: 0; font-size: 0.9em; color: rgba(255, 255, 255, 0.5); }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .site-title { font-size: 2.5rem; }
  .site-subtitle { font-size: 1.2rem; }
  nav { padding: 1rem 2rem; }
  nav.scrolled { padding: 0.8rem 2rem; }

  .hamburger { display: block; }
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-menu { position: fixed; top: -100%; left: 0; width: 100%; padding: 2rem; background-color: var(--primary); flex-direction: column; text-align: center; transition: var(--transition); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }
  .nav-menu.active { top: 60px; }
  .nav-item { margin: 1.5rem 0; }

  section { padding: 4rem 2rem; }
  .section-title { font-size: 2rem; }

  #Servicios .music-grid, .articles-grid { grid-template-columns: 1fr; }
  #Servicios .album-title { font-size: 1.5rem; }
  #Servicios .album-description { font-size: 1rem; }
  
  .modal-content { margin: 1rem; max-width: calc(100% - 2rem); }
  .modal-title { font-size: 1.8rem; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-btn { padding: 1rem 2rem; font-size: 1rem; }
}

@media (max-width: 480px) {
  .portfolio-btn { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
  .modal-content { padding: 1.5rem; }
  .modal-title { font-size: 1.5rem; }
  .portfolio-title { font-size: 1.2rem; }
  .portfolio-description { font-size: 0.85rem; }
}