/* Custom styles with sage green colors and cotton paper texture */

/* Import Cinzel font (similar to Engravers) from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&display=swap');

/* Import Engravers font (similar to Engravers MT) */
@font-face {
  font-family: 'Engravers';
  src: local('Engravers MT'), local('Engravers');
  font-weight: normal;
  font-style: normal;
}

/* Fallback: Use a similar serif font if Engravers is not available */
:root {
  --font-engravers: 'Engravers', 'Cinzel', 'Trajan Pro', 'Cormorant Garamond', serif;
  --color-sage: #5a6f5a;
  --color-sage-dark: #4a5b4a;
  --color-sage-medium: #6d856d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Wallpaper background - Final HD version without zoom, natural size for best detail visibility */
.wallpaper-bg {
  background-image: url('/static/images/wallpaper-final.jpg');
  background-repeat: repeat;
  background-size: auto auto;
  background-position: center top;
  background-attachment: fixed;
  min-height: 100vh;
}

/* Cotton paper texture for cards - simulating cotton fibers */
.cotton-card {
  background: linear-gradient(135deg, 
    #fefefd 0%, 
    #fcfcfb 25%, 
    #faf9f8 50%, 
    #fcfcfb 75%, 
    #fefefd 100%);
  position: relative;
  box-shadow: 
    0 2px 8px rgba(109, 133, 109, 0.1),
    0 8px 24px rgba(109, 133, 109, 0.08);
}

/* Add subtle texture overlay */
.cotton-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(109, 133, 109, 0.02) 2px,
      rgba(109, 133, 109, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(109, 133, 109, 0.02) 2px,
      rgba(109, 133, 109, 0.02) 4px
    );
  pointer-events: none;
  opacity: 0.5;
  border-radius: inherit;
}

/* Logo styling - using custom image */
.logo-container {
  padding: 1rem 0;
}

.logo-image {
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.8));
  transition: transform 0.3s ease;
}

.logo-image:hover {
  transform: scale(1.02);
}

/* Responsive logo sizing */
@media (max-width: 640px) {
  .logo-image {
    max-width: 280px !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .logo-image {
    max-width: 350px !important;
  }
}

/* Gift card styling */
.gift-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(109, 133, 109, 0.15);
}

.gift-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 4px 16px rgba(109, 133, 109, 0.15),
    0 12px 32px rgba(109, 133, 109, 0.12);
}

.gift-card.purchased {
  opacity: 0.65;
  position: relative;
}

.gift-card.purchased::after {
  content: '✓ Reservado';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(109, 133, 109, 0.95);
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 300;
  font-size: 1rem;
  z-index: 10;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Image container */
.gift-image-container {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 4:3 aspect ratio */
  overflow: hidden;
  background: #e8ede8;
  border-bottom: 1px solid rgba(109, 133, 109, 0.1);
}

.gift-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Button styles - sage green theme */
.btn-primary {
  background: linear-gradient(135deg, #6d856d 0%, #5a6f5a 100%);
  transition: all 0.3s ease;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6f5a 0%, #4a5b4a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(109, 133, 109, 0.4);
}

.btn-secondary {
  background: transparent;
  color: #5a6f5a;
  border: 1px solid rgba(109, 133, 109, 0.3);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(109, 133, 109, 0.05);
  border-color: #5a6f5a;
}

/* Header with semi-transparent background */
.header-bg {
  background: rgba(254, 254, 253, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(109, 133, 109, 0.15);
}

/* Hero section with cotton card */
.hero-cotton {
  background: linear-gradient(135deg, 
    rgba(254, 254, 253, 0.98) 0%, 
    rgba(252, 252, 251, 0.98) 50%, 
    rgba(250, 249, 248, 0.98) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(109, 133, 109, 0.15);
  box-shadow: 
    0 4px 16px rgba(109, 133, 109, 0.1),
    0 12px 32px rgba(109, 133, 109, 0.08);
}

/* Intro text styling matching main site */
.intro-text {
  font-family: var(--font-engravers), serif;
  font-size: 0.95rem;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: var(--color-sage);
  text-align: center;
  font-weight: normal;
}

@media (max-width: 768px) {
  .intro-text {
    font-size: 0.85rem;
    line-height: 1.7;
  }
}

/* Signature image styling */
.signature-image {
  max-width: 350px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .signature-image {
    max-width: 280px;
  }
}

/* Modal styles */
.modal-overlay {
  background: rgba(109, 133, 109, 0.3);
  backdrop-filter: blur(4px);
}

.modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* QR Code container */
.qr-code-container {
  background: white;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(109, 133, 109, 0.2);
  display: inline-block;
}

/* Payment tabs */
.payment-tab {
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: 300;
  color: #5a6f5a;
}

.payment-tab.active {
  border-bottom-color: #6d856d;
  color: #6d856d;
  font-weight: 400;
}

.payment-tab:hover {
  color: #6d856d;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #6d856d;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Footer with cotton background */
.footer-cotton {
  background: rgba(254, 254, 253, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(109, 133, 109, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gift-card:hover {
    transform: none;
  }
  
  .gift-image-container {
    padding-bottom: 80%;
  }
  
  .logo-container h1 {
    font-size: 3rem;
  }
  
  .wallpaper-bg {
    background-size: 400px auto;
  }
}

/* Typography adjustments */
h1, h2, h3, h4 {
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #5a6f5a;
}

p {
  font-weight: 300;
  line-height: 1.7;
  color: #4a5b4a;
}

/* Decorative line in sage green */
.decorative-line {
  width: 60px;
  height: 1px;
  background: #6d856d;
  margin: 0 auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(232, 237, 232, 0.5);
}

::-webkit-scrollbar-thumb {
  background: #6d856d;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a6f5a;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth transitions */
a, button {
  transition: all 0.3s ease;
}

/* Focus states for accessibility */
button:focus, a:focus {
  outline: 2px solid #6d856d;
  outline-offset: 2px;
}

/* Price divider in sage */
.price-divider {
  background: rgba(109, 133, 109, 0.3);
}

/* Input fields with cotton styling */
input[type="text"] {
  background: rgba(254, 254, 253, 0.8);
  border-color: rgba(109, 133, 109, 0.3);
}

input[type="text"]:focus {
  background: white;
  border-color: #6d856d;
  box-shadow: 0 0 0 3px rgba(109, 133, 109, 0.1);
}

/* Remove old header background styles */
.header-bg {
  background: none !important;
}

/* Responsive navigation menu */
@media (max-width: 1024px) {
  nav ul {
    flex-wrap: wrap;
    gap: 1rem !important;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  nav {
    display: none; /* Hide menu on mobile, can add hamburger later */
  }
  
  .logo-container img {
    max-width: 220px !important;
  }
}
