/* ===== Menú Hamburguesa Animado ===== */
.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

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

  /* === NAVBAR === */
  .navbar {
    padding: 0;
    border-left: 20px solid #FAFAFA;
    border-right: 20px solid #FAFAFA;
  }

  .navbar-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 20px 0 0;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 101;
    margin-left: auto;
    margin-right: 10px;
  }

  .menu-toggle span {
    display: block;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.4s ease;
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    width: 200px;
    background-color: #FAFAFA;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 100;
  }

  .nav-menu.opening {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
    gap: 0;
  }

  .nav-menu.closing {
    opacity: 0;
    transform: scaleY(0);
    pointer-events: none;
    gap: 0;
  }

  .nav-menu a.nav-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 0;
    width: 100%;
    height: 48px;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease, filter 0.3s ease;
  }

  .nav-menu a.nav-mobile:nth-child(odd) {
    background-color: #F5F0E6;
    color: #333;
  }

  .nav-menu a.nav-mobile:nth-child(even) {
    background-color: white;
    color: #333;
  }

  .nav-menu a.nav-mobile:hover {
    filter: brightness(1.1);
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    background-color: transparent;
    display: none !important;
  }

  .nav-dropdown .dropdown-wrapper {
    cursor: default;
  }

  .nav-dropdown:hover .dropdown-content {
    display: none !important;
  }

  .nav-dropdown .dropdown-content a {
    padding-left: 40px;
    border-bottom: none;
  }

  .nav-desktop {
    display: none !important;
  }

  .nav-mobile {
    display: block !important;
  }

  .nav-mobile.nav-link::after,
  .nav-mobile.dropdown-toggle::after {
    display: none !important;
  }

  .nav-mobile.nav-link:hover,
  .nav-mobile.dropdown-toggle:hover {
    color: inherit !important;
  }

  /* === HERO === */
  .hero,
  #p-retratos .hero,
  #p-eventos .hero,
  #p-productos .hero {
    position: relative;
    height: calc(100vh - 60px);
    width: 100%;
    margin-top: 60px;
    border: none;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    font-family: 'Source Serif Pro', serif;
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.35);
  }

  .hero-content h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-content p {
    font-size: 1.1rem;
    margin: 10px 0 20px;
  }

  .btn-cta {
    font-size: 0.95em;
    padding: 10px 24px;
  }

  /* === CATEGORÍAS === */
  .category-row {
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin-top: 4px;
  }

  .category-section {
    max-width: 100%;
    flex: 1 1 100%;
    margin-top: 0;
  }

  .category-image,
  .category-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    overflow: hidden;
    transition: transform 0.3s ease;
  }

  .category-item:hover img {
    transform: none;
  }

  .category-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    pointer-events: none;
    background: none;
    font-size: 1.4em;
    color: white;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
    padding-bottom: 4px;
    text-align: center;
    opacity: 1 !important;
  }

  .category-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(1) !important;
    transform-origin: center;
    width: 100%;
    height: 2px;
    background-color: white;
    opacity: 0.8;
  }

  /* === GALERÍA === */
  main {
    width: 100%;
    margin-top: 4px;
    border: none;
    box-sizing: border-box;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 0;
  }

  .gallery-item {
    aspect-ratio: 1 / 1;
    border-radius: 0;
  }

  #modal img {
    max-width: 95vw;
    max-height: 80vh;
    border-radius: 4px;
  }

  /* === BOTONES === */
  .btn-ver-mas,
  .btn-volver {
    width: 90%;
    font-size: 1em;
    padding: 10px 0;
  }

  /* === FOOTER === */
  .footer-container {
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0;
  }

  .footer {
    padding: 10px 15px;
    border-left: 10px solid #FAFAFA;
    border-right: 10px solid #FAFAFA;
  }

  .footer-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-icons {
    order: -1;
    margin-bottom: 10px;
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
  }

  .footer-contact,
  .footer-links,
  .footer-social {
    display: none;
  }

  .footer-icons a img {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(20%) sepia(7%) saturate(400%) hue-rotate(165deg) brightness(95%) contrast(90%);
    transition: filter 0.3s ease;
  }

  .footer-icons a:hover img {
    filter: brightness(0.8);
  }

  /* === OTROS === */
  #retratos {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .contact-text-column {
    align-items: center;
  }

  .contact-text-column p {
    font-size: 1rem;
    text-align: justify;
    max-width: 90%;
  }

  .contact-text-column .section-subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0;
    text-align: justify;
    max-width: 90%;
  }

  .section-title {
    font-size: 2.4em;
    line-height: 1;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
  }

  .about-text-column {
    flex: 1 1 50%;
    font-size: 1.1em;
    color: #333;
    line-height: 1.8;
    text-align: justify;
  }
}

/* ===== Responsive 480px ↓ ===== */
@media (max-width: 480px) {

  .nav-logo-image {
    height: 28px;
  }

  .category-overlay {
    font-size: 1.4em;
  }

  .footer {
    padding: 20px 10px;
    border-left: 20px solid #FAFAFA;
    border-right: 20px solid #FAFAFA;
  }

  .footer-contact a,
  .footer-links a,
  .footer-social a {
    font-size: 0.9em;
  }

  .hero,
  #p-retratos .hero,
  #p-eventos .hero,
  #p-productos .hero {
    width: 100%;
    height: auto;
    padding: 0;
    margin: 60px 0 0;
  }

  .hero-content h2 {
    font-size: 1.6rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }

  .btn-cta {
    font-size: 0.85em;
    padding: 8px 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 0;
  }

  .btn-ver-mas,
  .btn-volver {
    width: 95%;
    font-size: 1em;
    padding: 10px 0;
  }

  .category-row {
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin-top: 4px;
  }

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

/* ===== Retratos hero overrides ===== */
@media (max-width: 768px) {
  #page-retratos .hero-content h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  #page-retratos .hero-content .btn-cta {
    font-size: 0.95rem;
    padding: 10px 24px;
  }
}

@media (max-width: 480px) {
  #page-retratos .hero-content h2 {
    font-size: 1.5rem;
  }

  #page-retratos .hero-content .btn-cta {
    font-size: 0.85rem;
    padding: 8px 20px;
  }
}



/* ===== Hero Responsive Picture Handling ===== */
.hero {
  margin-top: 61.33px; /* Margen para el navbar */
  margin-bottom: 4px; /* Espacio inferior */
}

.hero picture {
  display: block;
  width: 100%;
}

.hero .hero-image {
  width: 100%;
  height: calc(100vh - 61.33px);
  object-fit: cover;
  object-position: center;
  display: block;
}

/* === Mobile Portrait === */
@media (max-width: 768px) and (orientation: portrait) {
  .hero .hero-image {
    height: calc(100vh - 60px);
  }
}

/* === Mobile Landscape === */
@media (max-width: 768px) and (orientation: landscape) {
  .hero .hero-image {
    height: calc(100vh - 60px);
  }
}

/* === Desktop fallback === */
@media (min-width: 769px) {
  .hero .hero-image {
    height: calc(100vh - 61.33px);
  }
}


@media (max-width: 768px) {
.hero-gracias {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #ffffff; /* Fondo blanco, no gris */
  width: 100%;
  height: calc(100vh - 61.33px); /* Ajuste para el alto de la navbar */
  box-shadow: none;
}



  .btn-cta {
    font-size: 0.95rem;
    padding: 10px 24px;
  }
}

@media (max-width: 480px) {
  .hero-gracias {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #ffffff; /* Fondo blanco, no gris */
    width: 100%;
    height: calc(100vh - 61.33px); /* Ajuste para el alto de la navbar */
    box-shadow: none;
  }

  .hero-gracias-content h2 {
    font-size: 1.7rem;
  }

  .hero-gracias-content p {
    font-size: 0.95rem;
  }

  .btn-cta {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
}

@media (max-width: 768px) {
  .carousel-arrow {
    display: none;
  }
}

/* Ocultar mobile en PC y viceversa */
.carousel-mobile {
  display: none;
}

@media (max-width: 768px) {
  .carousel-desktop {
    display: none;
  }

  .carousel-mobile {
    display: block;
  }
}
