/* 
   Funeraria Rey David - Modern Premium Design 
   2024 Redesign
*/

:root {
  /* Color Palette */
  --primary-color: #1a1a1a;
  /* Deep Charcoal */
  --secondary-color: #c5a059;
  /* Muted Gold */
  --accent-color: #f4f4f4;
  /* Off-white/Cream */
  --text-color: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --black: #000000;

  /* Spacing */
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;

  /* Transitions */
  --transition: all 0.3s ease;

  /* Border Radius */
  --radius: 8px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--white);
}

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', serif;
  color: var(--primary-color);
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  /* Elegant tracking */
}

/* ... existing code ... */

/* Animation Utilities */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Service Card */
.service-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  /* Softer, premium shadow */
  text-align: center;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--spacing-lg) 0;
}

.text-center {
  text-align: center;
}

.bg-light {
  background-color: var(--accent-color);
}

.bg-dark {
  background-color: var(--primary-color);
  color: var(--white);
}

.bg-dark h2,
.bg-dark p,
.bg-dark cite {
  color: var(--white);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
  border: 2px solid transparent;
}

.primary-btn {
  background-color: var(--secondary-color);
  color: var(--white);
}

.primary-btn:hover {
  background-color: #b08d4b;
  transform: translateY(-2px);
}

.secondary-btn {
  background-color: transparent;
  border-color: var(--white);
  color: var(--white);
}

.secondary-btn:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

.submit-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.submit-btn:hover {
  background-color: var(--secondary-color);
}

/* Header & Navigation */
.main-header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo img {
  height: 60px;
  width: auto;
  border-radius: 4px;
}

.main-nav ul {
  display: flex;
  gap: 30px;
  align-items: center;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
}

.main-nav a:hover {
  color: var(--secondary-color);
}

.btn-contact {
  background-color: var(--primary-color);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 20px;
}

.btn-contact:hover {
  background-color: var(--secondary-color);
}

.btn-contact:hover {
  background-color: var(--secondary-color);
}

/* Trust Badges (Minimalist) */
.trust-badges {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  border-top: 1px solid #eee;
  padding-top: 20px;
  flex-wrap: wrap;
  /* Responsive */
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: left;
}

.badge-icon {
  font-size: 1.5rem;
  filter: grayscale(100%);
  /* Elegant minimalist look */
  opacity: 0.7;
}

/* Process Timeline (Step-by-Step) */
.process-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.step {
  text-align: center;
  flex: 1;
  min-width: 200px;
  position: relative;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 0 5px rgba(197, 160, 89, 0.2);
}

.step h3 {
  color: var(--white);
  /* For dark bg */
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.step p {
  font-size: 0.95rem;
  opacity: 0.8;
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin-top: 25px;
  display: none;
  /* Hidden on mobile */
}

@media (min-width: 768px) {
  .step-line {
    display: block;
    max-width: 100px;
  }
}

@media (min-width: 768px) {
  .step-line {
    display: block;
    max-width: 100px;
  }
}

/* Ethics Section */
.ethics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  justify-content: center;
}

.ethics-card {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  text-align: center;
  border-top: 4px solid var(--secondary-color);
  transition: transform 0.3s ease;
}

.ethics-card:hover {
  transform: translateY(-5px);
}

.ethics-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: inline-block;
  padding: 15px;
  background: #fafafa;
  border-radius: 50%;
  color: var(--secondary-color);
}

.ethics-card h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
  font-family: 'Playfair Display', serif;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--primary-color);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 0;
  /* Override if needed */
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  /* Fallback for slow loading */
  background-image: url('images/premium_hero.png');
  /* Ensure this image exists, or use fallback */
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* Dark overlay */
  z-index: -1;
}

.hero-content h1 {
  font-size: 3.5rem;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  color: #e0e0e0;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Intro Section */
.intro-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
}

.intro-text p {
  margin-bottom: 20px;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.icon-box {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
  /* Slower, smoother zoom */
}

.gallery-item:hover img {
  transform: scale(1.08);
  /* Less aggressive zoom */
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  padding: 10px;
  text-align: center;
  font-size: 0.9rem;
  transform: translateY(100%);
  transition: var(--transition);
}

.gallery-item:hover figcaption {
  transform: translateY(0);
}

/* Testimonials */
.testimonials-scroller {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: var(--radius);
  max-width: 350px;
  border-left: 4px solid var(--secondary-color);
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 15px;
  opacity: 0.9;
}

.testimonial-card cite {
  font-weight: 600;
  color: var(--secondary-color);
}

/* Contact/Inquiry Section */
.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
  margin-top: 40px;
  align-items: start;
}

.contact-form-box {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-top: 5px solid var(--secondary-color);
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s;
}

.info-item:hover {
  transform: translateX(10px);
}

.icon-circle {
  width: 50px;
  height: 50px;
  background: rgba(197, 160, 89, 0.1);
  color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.info-item h4 {
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.info-item p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* Comments Section */
.comment-list {
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.comment {
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid #eee;
  box-shadow: var(--shadow-sm);
}

.comment-name {
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.comment-text {
  color: var(--text-light);
}

.comment-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid #ddd;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.form-group textarea {
  height: 120px;
  resize: vertical;
}

/* Map Section */
.map-section iframe {
  filter: grayscale(100%);
  /* Elegant B&W map */
  transition: var(--transition);
}

.map-section iframe:hover {
  filter: grayscale(0%);
}

/* Contact Section */
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.contact-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.contact-item .icon {
  font-size: 1.5rem;
}

/* Footer */
footer {
  background-color: #111;
  color: #999;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a:hover {
  color: var(--secondary-color);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: var(--white);
  border: 1px solid #444;
  padding: 8px 15px;
  border-radius: 4px;
}

.social-links a:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  font-size: 0.9rem;
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  z-index: 2000;
  transition: transform 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: #fff;
}

/* Emergency Call Float */
.emergency-float {
  position: fixed;
  bottom: 105px;
  /* Positioned above WhatsApp */
  right: 37px;
  /* Center relative to 60px button: (60-46)/2 + 30 = 37 */
  width: 46px;
  height: 46px;
  background-color: #dc3545;
  /* Red for emergency */
  border-radius: 50%;
  z-index: 2000;
  transition: transform 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
}

.emergency-float:hover {
  transform: scale(1.1);
  background-color: #c82333;
}

.emergency-float svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .main-header {
    height: 60px;
  }

  .mobile-menu-btn {
    display: block;
    z-index: 1001;
  }

  .main-nav {
    position: fixed;
    left: -100%;
    top: 60px;
    width: 100%;
    background-color: var(--white);
    padding: 20px 0;
    transition: 0.3s;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
  }

  .main-nav.active {
    left: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}