/* portafolio.css */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #800020;
  --accent: #e6a4b4;
  --white: #fff;
  --text: #333;
  --text-light: #555;
  --bg-overlay: rgba(255, 255, 255, 0.98);
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-strong: rgba(0, 0, 0, 0.15);
  --shadow-text: rgba(0, 0, 0, 0.3);

  --font-main: 'Poppins', sans-serif;
  --font-title: 'League Spartan', sans-serif;
  --font-body: 'Montserrat', sans-serif;

  --radius: 16px;
  --transition: all 0.3s ease;
  --container: 1200px;
  --padding: 40px;
}

body {
  font-family: var(--font-main);
  line-height: 1.7;
  color: var(--text);
  background: linear-gradient(135deg, var(--primary) 0%, #d4a5b0 50%, var(--accent) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px var(--shadow-strong);
  padding: 1rem var(--padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: transform 0.4s ease-out;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header.hide {
  transform: translateY(-100%);
}

.logo-text {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--primary);
}

.logo-chamed {
  color: var(--accent);
}

#menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--primary);
  padding: 0.5rem;
  z-index: 1001;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
}

nav a:hover {
  color: var(--primary);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Menú móvil */
@media (max-width: 768px) {
  #menu-toggle {
    display: block;
  }

  #menu-list {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-overlay);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    padding: 80px 20px 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.26, 1.55);
    z-index: 999;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    border-radius: 16px 0 0 16px;
  }

  #menu-list.active {
    transform: translateX(0);
  }

  header {
    padding: 1rem 20px;
  }

  nav ul {
    display: none;
  }
}

/* Hero */
.portfolio-hero {
  background: url('https://placehold.co/1920x800/800020/e6a4b4?text=Portafolio+Creativo') center/cover no-repeat;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
}

.portfolio-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
  z-index: 2;
}

.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  margin: 0;
}

/* Filtros */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 60px 20px 40px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.filter-btn {
  background: var(--bg-overlay);
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: var(--white);
}

/* Grid de proyectos */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.portfolio-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.portfolio-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(128, 0, 32, 0.85);
  color: var(--white);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: left;
}

.item-overlay h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.item-overlay p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.portfolio-item:hover {
  transform: translateY(-10px);
}

.portfolio-item:hover .item-overlay {
  opacity: 1;
}

/* CTA Final */
.portfolio-cta {
  text-align: center;
  padding: 100px 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  margin: 0;
}

.portfolio-cta h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.portfolio-cta p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

.button {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  padding: 14px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
  transition: var(--transition);
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.4);
}

/* WhatsApp flotante */
.whatsapp-float-btn {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  border: 3px solid white;
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
  font-weight: bold;
}

.whatsapp-float-btn:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes float {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-6px) scale(1.05); }
  100% { transform: translateY(0px) scale(1); }
}

/* Responsive */
@media (max-width: 480px) {
  .whatsapp-float-btn {
    width: 55px;
    height: 55px;
    font-size: 24px;
    bottom: 20px;
    right: 15px;
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .portfolio-cta h2 {
    font-size: 1.8rem;
  }
}