/* ============================================================
   FRANCO SOVINO — Fotografía de Matrimonios
   style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500&display=swap');

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:          #FAFAF8;
  --color-surface:     #FFFFFF;
  --color-text:        #1A1A1A;
  --color-muted:       #6B6B6B;
  --color-accent:      #C8A96E;
  --color-accent-dark: #B0895A;
  --color-border:      #E8E4DF;
  --color-overlay:     rgba(0, 0, 0, 0.50);
  --color-whatsapp:    #25D366;
  --font-serif:        'Playfair Display', Georgia, serif;
  --font-sans:         'Inter', system-ui, sans-serif;
  --max-width:         1200px;
  --header-height:     80px;
  --transition:        300ms ease;
  --transition-slide:  700ms ease-in-out;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.3;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(250, 250, 248, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo img {
  height: 53px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.main-nav a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color var(--transition);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Instagram — header */
.nav-instagram {
  display: flex;
  align-items: center;
  color: var(--color-accent) !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}
.nav-instagram:hover { color: var(--color-accent-dark) !important; }
.nav-instagram svg { width: 18px; height: 18px; fill: currentColor; }

/* Instagram — footer */
.footer-instagram {
  display: block;
  margin-bottom: 0.6rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
  line-height: 1;
}
.footer-instagram:hover { color: var(--color-accent); }
.footer-instagram svg { width: 20px; height: 20px; fill: currentColor; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-text);
  transition: var(--transition);
  transform-origin: center;
}

/* === MOBILE NAV === */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-bg);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0 2rem;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .site-header.nav-open .main-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .main-nav a {
    padding: 1rem 2rem;
    width: 100%;
    text-align: center;
    border-bottom: none;
  }

  .site-header.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .site-header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-header.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* offset for fixed header */
main { padding-top: var(--header-height); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #1C1C1E;
  border-top: none;
  padding: 30px 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
}

.footer-logo img {
  height: 57px;
  width: auto;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

.footer-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

/* Left column (odd items): right-aligned */
.footer-nav a:nth-child(odd)  { text-align: right; }
/* Right column (even items): left-aligned */
.footer-nav a:nth-child(even) { text-align: left; }

.footer-nav a:hover { color: var(--color-accent); }

.footer-copy {
  text-align: right;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .footer-logo img { margin: 0 auto; }
  .footer-copy    { text-align: center; }
}

/* ============================================================
   WHATSAPP FAB
   ============================================================ */
.whatsapp-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.40);
  z-index: 200;
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.50);
}

.whatsapp-fab svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* ============================================================
   SLIDER (index.html)
   ============================================================ */
.slider-section {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-height));
  min-height: 480px;
  overflow: hidden;
  background: #111;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition-slide);
}

.slide.active { opacity: 1; }

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

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}

.slider-btn:hover { background: rgba(255,255,255,0.26); }
.slider-prev      { left: 1.5rem; }
.slider-next      { right: 1.5rem; }

.slider-btn svg {
  width: 20px; height: 20px;
  stroke: #fff; fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.slider-dots {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 10;
}

.slider-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.40);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.slider-dot.active {
  background: #fff;
  transform: scale(1.3);
}

.scroll-down-btn {
  position: absolute;
  bottom: 3.125rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background var(--transition), transform var(--transition);
  animation: bounce 2s ease-in-out infinite;
}

.scroll-down-btn:hover {
  background: rgba(255,255,255,0.28);
  animation-play-state: paused;
}

.scroll-down-btn svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ============================================================
   CTA SECTION (index.html)
   ============================================================ */
.cta-section {
  text-align: center;
  padding: 6rem 2rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.cta-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.cta-section p {
  font-size: 1.0625rem;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto 2.75rem;
  line-height: 1.85;
}

.btn-primary {
  display: inline-block;
  padding: 0.9rem 2.75rem;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
}

/* ============================================================
   PHOTO GRID (index.html)
   ============================================================ */
.gallery-section {
  padding: 5rem 0 0;
  background: var(--color-bg);
}

.gallery-section h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-text);
  margin-bottom: 3rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.photo-grid-item {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: pointer;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}

.photo-grid-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.88);
}

@media (max-width: 768px) {
  .slider-section {
    height: auto;
    min-height: unset;
    aspect-ratio: 4 / 3;
  }

  .scroll-down-btn { display: none; }
  .slider-btn { display: none; }
}

@media (max-width: 900px)  { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .photo-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.lightbox-overlay.active { opacity: 1; }

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 24px 72px rgba(0,0,0,0.55);
  display: block;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem; right: 1.25rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.30);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 501;
}

.lightbox-close:hover { background: rgba(255,255,255,0.24); }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.30);
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 501;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.24); }
.lightbox-nav-prev  { left: 1.25rem; }
.lightbox-nav-next  { right: 1.25rem; }

.lightbox-nav svg {
  width: 20px; height: 20px;
  stroke: #fff; fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 600px) {
  .lightbox-nav { display: none; }
}

/* ============================================================
   BIO PAGE
   ============================================================ */
.bio-section {
  padding: 70px 0 5rem;
}

.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  align-items: start;
}

.bio-photo {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.bio-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
}

.bio-text h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.bio-text .bio-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-accent);
  font-size: 1.125rem;
  margin-bottom: 2.75rem;
  display: block;
}

.bio-text p {
  color: var(--color-muted);
  margin-bottom: 1.4rem;
  font-size: 0.85rem;
  line-height: 1.9;
}

.bio-text .bio-closing {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--color-text);
  margin-top: 2.5rem;
  display: block;
}

@media (max-width: 768px) {
  .bio-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .bio-photo { position: static; }
  .bio-photo img { aspect-ratio: 4 / 3; }
}

/* ============================================================
   TESTIMONIALS PAGE
   ============================================================ */
.testimonials-intro {
  text-align: center;
  padding: 5rem 0 4rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.testimonials-intro h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-text);
  margin-bottom: 1rem;
}

.testimonials-intro p {
  color: var(--color-muted);
  font-size: 1.0625rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.8;
}

.testimonials-section {
  position: relative;
  padding: 5rem 0;
}

.testimonials-list {
  display: flex;
  flex-direction: column;
  gap: 6rem;
  max-width: 960px;
  margin: 0 auto;
}

/* Individual testimonial */
.testimonial-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  scroll-margin-top: calc(var(--header-height) + 2rem);
}

.testimonial-item img {
  width: 100%;
  max-width: 600px;
  height: 400px;
  object-fit: cover;
  border-radius: 2px;
}

.testimonial-item blockquote {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-muted);
  font-style: italic;
  margin: 0;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.testimonial-item cite {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 1rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.testimonial-item cite::before,
.testimonial-item cite::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--color-accent);
}

/* Fixed dot navigation — positioned just outside the content column */
.testimonials-dot-nav {
  position: fixed;
  right: 50px;
  top: 50%;
  transform: translateY(-50%) translateX(1.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity    500ms cubic-bezier(0.4, 0, 0.2, 1),
    transform  500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonials-dot-nav.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-50%) translateX(0);
}

.dot-nav-item {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(107, 107, 107, 0.35);
  display: block;
  transition:
    transform     400ms cubic-bezier(0.4, 0, 0.2, 1),
    background    400ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color  400ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow    400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dot-nav-item:hover {
  background: rgba(200, 169, 110, 0.3);
  border-color: var(--color-accent);
  transform: scale(1.3);
}

.dot-nav-item.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.7);
  box-shadow:
    0 0 0 3px rgba(200, 169, 110, 0.18),
    0 0 0 6px rgba(200, 169, 110, 0.06);
}

@media (max-width: 1024px) {
  .testimonials-dot-nav { display: none; }
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-section {
  padding: 4.1rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}

.contact-info h1 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.contact-info p {
  color: var(--color-muted);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.75rem;
}

.contact-info .contact-email {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--color-accent);
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.contact-info .contact-email:hover { color: var(--color-accent-dark); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-x: hidden;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.form-group label {
  font-size: 0.725rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.13);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Date input */
.form-group input[type="date"] {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding: 0.875rem 1rem; /* explicit padding prevents Chrome from collapsing when empty */
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  cursor: pointer;
}

/* Safari: clip the date input's native minimum width without affecting other inputs */
@media (max-width: 768px) {
  .form-group:has(input[type="date"]) {
    overflow: hidden;
  }
}

.form-error-msg {
  color: #C0392B;
  font-size: 0.875rem;
}

.form-success {
  display: none;
  padding: 3rem 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  text-align: center;
}

.form-success h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.form-success p {
  color: var(--color-muted);
  font-size: 1rem;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
}
