:root {
  --bg-main: #faf7f2;
  --bg-card: #ffffff;
  --bg-footer: #ede6dc;
  --brown-dark: #4a2c1d;
  --brown-mid: #6b3f2a;
  --brown-light: #8a5236;
  --accent: #b85c38;
  --accent-hover: #d9a441;
  --text-main: #2b2b2b;
  --radius-sm: 0.4rem;
  --radius-md: 0.6rem;
  --radius-lg: 0.75rem;
  --radius-xl: 2rem;
  --shadow-soft: 0 0.3rem 0.8rem rgba(0,0,0,0.08);
  --shadow-medium: 0 0.4rem 1rem rgba(0,0,0,0.08);
  --shadow-strong: 0 0.5rem 1.2rem rgba(0,0,0,0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  text-align: center;
}


/* =========================
   BASE — EXTREMO MOBILE FIRST
========================= */
html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: Georgia, serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =========================
   HEADER
========================= */
.site-header {
  position: relative;
  color: #fff;
  padding: 0.4rem 0.75rem;
  background-image:
    linear-gradient(
      rgba(71, 44, 33, 0.75),
      rgba(40, 22, 14, 0.75)
    ),
    url("https://live.staticflickr.com/65535/55049160632_8ca3649eeb_h.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.site-branding h1 {
  margin: 0 0 0.5rem 0;
  font-size: clamp(0.8rem, 8vw, 1.8rem);
  text-align: center;
}

.site-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.site-logo {
  width: clamp(1.6rem, 10vw, 3rem);
  height: auto;
  object-fit: contain;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(0.6rem, 6vw, 0.95rem);
  padding: 0.4rem 0.9rem;
  background: var(--brown-mid);
  border-radius: var(--radius-xl);
  box-shadow: 0 0.15rem 0.35rem rgba(0,0,0,0.25);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

nav a:hover {
  background: var(--brown-light);
  transform: translateY(-0.1rem);
  box-shadow: 0 0.3rem 0.6rem rgba(0,0,0,0.35);
  color: #fff;
}

.trademark {
  vertical-align: super;
  font-size: 0.6em;
}

/* =========================
   MAIN
========================= */
.container {
  padding: 0.75rem;
  max-width: 80rem;
  margin: 0 auto;
  flex: 1;
  text-align: center;
}

/* =========================
   HERO
========================= */
.hero {
  text-align: center;
  padding: 1.5rem 0.75rem;
  background:
    linear-gradient(
      rgba(250,247,242,0.9),
      rgba(250,247,242,0.9)
    ),
    url("https://images.unsplash.com/photo-1524995997946-a1c2e315a42f");
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-medium);
}

.hero h2 {
  font-size: clamp(0.9rem, 9vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: clamp(0.6rem, 6vw, 1rem);
  max-width: 40rem;
  margin: 0 auto;
}

/* =========================
   BUTTONS
========================= */
.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: clamp(0.6rem, 6vw, 0.95rem);
  border-radius: var(--radius-xl);
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-0.1rem);
  box-shadow: 0 0.4rem 0.8rem rgba(0,0,0,0.2);
}

/* =========================
   SERVICES / CONTENT
========================= */
.services article {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

/* =========================
   LISTS
========================= */
.contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact li {
  font-size: clamp(0.55rem, 6vw, 0.95rem);
  margin-bottom: 0.4rem;
}

.contact li a {
  color: var(--accent);
  text-decoration: underline;
}

.contact li a:hover {
  color: var(--accent-hover);
}

/* =========================
   TESTIMONIOS EN MOVIMIENTO
========================= */

.testimonials {
  margin: 3rem 0;
  text-align: center;
  overflow-x: hidden;
  overflow-y: visible;
  background: var(--bg-main);
  padding: 1.5rem 0;
}

.testimonials h2 {
  font-size: clamp(0.9rem, 6vw, 1.6rem);
  margin-bottom: 1.5rem;
  color: var(--brown-dark);
}


.testimonial-marquee {
  overflow-x: hidden;
  overflow-y: visible;
  position: relative;
  width: 100%;
  display: block;
  min-height: max-content;
}

/* Pista animada */
.testimonial-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  flex-wrap: nowrap; 
  align-items: flex-start;
  align-content: flex-start;
  will-change: transform;
  animation: scroll-testimonials 40s linear infinite;
}

/* Pausa al pasar el mouse */
.testimonial-marquee:hover .testimonial-track {
  animation-play-state: paused;
}

.testimonial-card {
  flex: 0 0 auto; 
  min-width: 16rem;
  max-width: 18rem;
  height: auto;
  background: #fff;
  padding: 1.1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.4rem 1rem rgba(0,0,0,0.08);
  text-align: left;
}

.testimonial-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
  color: #2b2b2b;
  white-space: normal;
  overflow: visible;
}

.testimonial-card span {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--brown-mid);
}

/* =========================
   FOOTER
========================= */

.site-footer {
    width: 100%;
    background-color: #ede6dc; 
    padding: 40px 0;
    margin-top: auto; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* =========================
   WHATSAPP
========================= */
.footer-whatsapp {
  justify-self: center;
  position: relative;
}

.whatsapp-toggle {
  background: #25D366;
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  box-shadow: 0 0.3rem 0.6rem rgba(0,0,0,0.25);
}

.whatsapp-toggle img {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
  display: block;
}

.whatsapp-toggle:hover {
  background: #1ebe5d;
}

.whatsapp-toggle.instagram {
  background: radial-gradient(
    circle at 30% 110%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
  margin: 1rem 0;
}

.whatsapp-toggle.instagram:hover {
  opacity: 0.9;
}

.whatsapp-toggle.facebook {
  background: radial-gradient(
    circle at 30% 110%, 
    #0064e0 0%, 
    #0064e0 5%, 
    #00afef 45%, 
    #285aeb 60%, 
    #1877f2 90%
  );
  margin: 1rem 0;
}


.whatsapp-menu {
  position: absolute;
  bottom: 3rem;
  right: 0;
  background: #fff;
  border-radius: 0.4rem;
  box-shadow: 0 0.4rem 0.8rem rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  min-width: 8rem;
}

.whatsapp-menu a {
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
  color: #2b2b2b;
  text-decoration: none;
}

.whatsapp-menu a:hover {
  background: #faf7f2;
}

.footer-whatsapp:hover .whatsapp-menu {
  display: flex;
}

/* =========================
   PORTFOLIO GRID — IMÁGENES COMPLETAS
========================= */

.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Fila del proyecto */
.portfolio-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 0.5rem 1.2rem rgba(0,0,0,0.08);
}

.services-logo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 0.5rem 1.2rem rgba(0,0,0,0.08);
}

/* Autor y libro */
.portfolio-author,
.portfolio-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* CONTENEDOR DE IMAGEN (clave) */
.portfolio-media {
  width: 100%;
  max-width: 16rem;
  height: 20rem; /* ALTURA COMPARTIDA */
  background: #faf7f2;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  box-shadow: inset 0 0 0.4rem rgba(0,0,0,0.08);
  margin-bottom: 0.75rem;
}

/* Imagen real */
.portfolio-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Textos */
.portfolio-author h3,
.portfolio-book h3 {
  margin: 0.3rem 0 0.1rem 0;
  font-size: clamp(0.65rem, 6vw, 1.05rem);
}

.portfolio-author p,
.portfolio-book p {
  margin: 0;
  font-size: clamp(0.5rem, 5vw, 0.85rem);
  color: var(--brown-mid);
}

.buy-button {
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.6rem, 6vw, 0.95rem);
    padding: 0.4rem 0.9rem;
    background: var(--brown-mid);
    border-radius: var(--radius-xl);
    box-shadow: 0 0.15rem 0.35rem rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.site-footer {
  background-color: #ede6dc; 
  color: black;
  padding: 2rem 1rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.site-logo {
  max-width: 150px;
  height: auto;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #333;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  transition: transform 0.3s ease, background 0.3s ease;
}

.social-icon.whatsapp:hover { background: #25D366; transform: translateY(-3px); }
.social-icon.instagram:hover { background: #E1306C; transform: translateY(-3px); }
.social-icon.facebook:hover { background: #1877F2; transform: translateY(-3px); }

.footer-info {
  font-size: 0.9rem;
  opacity: 0.8;
}

.contacto-links {
    list-style: none;
    padding: 0;
}

.contacto-links a {
    text-decoration: none; 
    color: #4a4a4a; 
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.contacto-links a:hover {
    color: #8b0000; 
}


.social-icons-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.social-icons-container a {
    text-decoration: none;
}

.anuncios-container {
  padding: 0.75rem;
  max-width: 60rem;
  margin: 0 auto;
  flex: 1;
  text-align: center;
}

.anuncios-header {
  margin-bottom: 4rem;
  position: relative;
  z-index: 2;
}

.anuncio-destacado-minimal {
    position: relative;
    max-width: 40rem;
    width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 4rem auto;
    overflow: hidden;
}

.anuncio-destacado-minimal:first-of-type {
  margin-top: 2rem;
}

.imagen-fondo {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.6);
    transition: transform 0.5s ease;
    border-radius: 15px;
}

.anuncio-destacado-minimal:hover .imagen-fondo {
    transform: scale(1.03);
}

.superposicion-texto {
    position: absolute;
    bottom: 0;
    width: 100%;
    left: 0;
    color: white;
    box-sizing: border-box;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    margin: 0;
    padding: 2rem;
}

.superposicion-texto h2 {
    font-size: clamp(0.8rem, 5vw, 2rem);
    line-height: 1.2;
    max-width: 30rem;
}

.superposicion-texto p {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 30rem;
}

.contenedor-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; 
    justify-content: flex-start; 
    margin-top: 1rem;
  }

.btn-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    border: 2px solid white;
    font-weight: bold;
    backdrop-filter: blur(5px); 
    transition: background 0.3s, transform 0.2s, color 0.3s;
    font-size: clamp(0.6rem, 4vw, 0.9rem);
    text-align: center;
}

.btn-minimal {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 30px;
    border: 2px solid white;
    font-weight: bold;
    backdrop-filter: blur(5px); /* Efecto cristal */
    transition: background 0.3s, transform 0.2s;
}

.btn-minimal:hover {
    background: rgba(255,255,255,1);
    color: #333;
    transform: scale(1.05);
}

.anuncio-destacado-minimal,
.superposicion-texto,
.contenedor-botones {
  max-width: 100%;
  overflow-wrap: break-word;
}

.auth-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group input {
    padding: 10px;
    font-size: 1rem;
}

.auth-form button {
    padding: 12px;
    cursor: pointer;
}

.auth-error {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #cc0000;
    background: #ffe6e6;
}

.auth-links {
    margin-top: 20px;
}

@keyframes scroll-testimonials {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* =========================
   Media queries
========================= */

@media (max-width: 30rem) {
  .portfolio-item {
    grid-template-columns: 1fr;
  }

  .portfolio-media {
    height: 14rem;
    max-width: 100%;
  }

  .testimonial-card {
    min-width: 12rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 36.1875rem)  {

  .anuncios-header h1 {
    width: 100%;      
    max-width: 40rem;        
    white-space: normal;    
    word-break: keep-all;   
    overflow-wrap: break-word; 
    font-size: clamp(1.5rem, 8vw, 1.5rem); 
    line-height: 1.2;
    text-align: center;
    margin: 0 auto 1rem auto;
  }

  .anuncio-destacado-minimal {
    display: flex;
    flex-direction: column;
    align-items: center; 
    padding: 0 0 0 0;
    max-width: 100%;
    margin: 2rem 0;
  }

  .imagen-fondo {
    width: 100%;
    height: auto; 
    object-fit: cover;
    border-radius: 10px; 
    filter: brightness(1);
  }

  .superposicion-texto {
    position: relative; 
    top: 0;            
    padding: 1.5rem;   
    text-align: center;
    width: 100%;
    bottom: 0rem;
    left: 0rem;
    right: 0rem;
    background: linear-gradient(transparent, rgb(0, 0, 0));
    border-radius: 15px; 
  }

  .superposicion-texto h2 {
    font-size: clamp(0.8rem, 5vw, 2rem);
  }

  .superposicion-texto p {
    font-size: clamp(0.8rem, 5vw, 1rem);
  }
}

@media (min-width: 48rem) {
  nav {
    flex-direction: row;
    justify-content: center;
  }

  .site-footer {
    grid-template-columns: 1fr auto 1fr;
  }

  .footer-whatsapp {
    grid-column: 3;
    justify-self: end;
  }
  .site-branding {
    flex-direction: row;
    justify-content: center;
    gap: 0.6rem;
    margin: 0.01rem 1rem 1rem 1rem;
  }
}

@media (max-width: 64rem) {
  .site-branding {
    flex-direction: column;
    text-align: center;
  }

  nav {
    flex-direction: column;
    gap: 0.6rem;
  }
}

@media (max-width: 90rem) {
  .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .portfolio-item {
    grid-template-columns: 1fr;
  }
}