/* Testimonials Section - Fixed Visibility */
.testimonials-section {
  background-color: #EBAA4A;
  padding: 80px 0;
  position: relative;
  overflow: visible;
  width: 100%;
  min-height: 100vh;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  visibility: visible !important;
  opacity: 1 !important;
}

.testimonials-section .container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Section Title */
.testimonials-section .section-title {
  text-align: center;
  color: #FFFFFF;
  font-family: 'Lato', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 60px;
  padding: 0 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Testimonials Grid - Explicit Dimensions */
.testimonials-grid {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 40px;
  width: 100% !important;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 400px !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  z-index: 1;
}

/* Individual Testimonial Tile - Explicit Dimensions */
.testimonial {
  width: 320px !important;
  min-width: 320px !important;
  height: 450px !important;
  min-height: 450px !important;
  background-color: #EBAA4A !important;
  border-radius: 16px;
  padding: 40px 30px !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  z-index: 2;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.testimonial:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Author Container - Fixed Positioning */
.testimonial .author {
  position: relative !important;
  width: 120px !important;
  height: 120px !important;
  margin-bottom: 30px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 3;
  flex-shrink: 0;
}

/* Diamond Background - Fixed Visibility */
.testimonial .author::before {
  content: '';
  position: absolute;
  width: 120px !important;
  height: 120px !important;
  top: 0;
  left: 0;
  background-color: #2E2F3E !important;
  transform: rotate(45deg);
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  z-index: 1;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Author Image - Fixed Positioning */
.testimonial .author img {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50%;
  object-fit: cover;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2 !important;
  background-color: #FFFFFF;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

/* Quote Text - Fixed Visibility */
.testimonial p {
  font-family: 'Lato', sans-serif;
  font-size: 16px !important;
  font-weight: 400;
  line-height: 1.6;
  color: #FFFFFF !important;
  margin-bottom: 20px !important;
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 10px;
  visibility: visible !important;
  opacity: 1 !important;
  text-align: center;
  max-width: 100%;
}

/* Quotation Marks - Fixed Visibility */
.testimonial p::before,
.testimonial p::after {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF !important;
  opacity: 0.5 !important;
  position: absolute;
  visibility: visible !important;
}

.testimonial p::before {
  content: '"';
  left: -10px;
  top: -10px;
}

.testimonial p::after {
  content: '"';
  right: -10px;
  bottom: -10px;
}

/* Author Name - Fixed Visibility */
.testimonial .author span {
  font-family: 'Lato', sans-serif;
  font-size: 16px !important;
  font-weight: 600;
  color: #FFFFFF !important;
  margin-top: 20px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-align: center;
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 3;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .testimonials-section {
    padding: 60px 0;
  }
  
  .testimonials-section .section-title {
    font-size: 32px;
    margin-bottom: 50px;
  }
  
  .testimonials-grid {
    gap: 30px;
  }
  
  .testimonial {
    width: 300px !important;
    min-width: 300px !important;
    height: 420px !important;
    padding: 35px 25px !important;
  }
}

@media (max-width: 768px) {
  .testimonials-section {
    padding: 50px 0;
  }
  
  .testimonials-section .section-title {
    font-size: 28px;
    margin-bottom: 40px;
  }
  
  .testimonials-grid {
    gap: 40px;
    flex-direction: column;
    align-items: center;
  }
  
  .testimonial {
    width: 100% !important;
    max-width: 350px !important;
    min-width: 280px !important;
    height: 400px !important;
    padding: 30px 20px !important;
  }
  
  .testimonial .author {
    width: 100px !important;
    height: 100px !important;
    margin-bottom: 25px !important;
  }
  
  .testimonial .author::before {
    width: 100px !important;
    height: 100px !important;
  }
  
  .testimonial .author img {
    width: 75px !important;
    height: 75px !important;
  }
}

@media (max-width: 480px) {
  .testimonials-section {
    padding: 40px 0;
  }
  
  .testimonials-section .section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  
  .testimonial {
    max-width: 300px !important;
    min-width: 260px !important;
    height: 380px !important;
    padding: 25px 16px !important;
  }
  
  .testimonial .author {
    width: 90px !important;
    height: 90px !important;
    margin-bottom: 20px !important;
  }
  
  .testimonial .author::before {
    width: 90px !important;
    height: 90px !important;
  }
  
  .testimonial .author img {
    width: 65px !important;
    height: 65px !important;
  }
  
  .testimonial p {
    font-size: 14px !important;
  }
  
  .testimonial .author span {
    font-size: 14px !important;
  }
}

/* Force Visibility */
.testimonials-section,
.testimonials-section *,
.testimonial,
.testimonial *,
.testimonial .author,
.testimonial .author img {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Font loading */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;600;700&display=swap');

/* Loading State */
.testimonials-grid.loading {
  opacity: 0.7;
}

.testimonial.loading {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 25%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.8) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Accessibility */
.testimonial-card:focus-within {
  outline: 2px solid var(--color-white, #EBAA4A);
  outline-offset: 4px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .testimonial-card {
    background: var(--color-white, #EBAA4A);
    border: 2px solid var(--color-dark, #2e2f3e);
  }
  
  .testimonial-avatar {
    border-color: var(--color-dark, #2e2f3e);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .testimonial-card {
    transition: none;
  }
  
  .testimonial-card:hover {
    transform: none;
  }
  
  .testimonial-card.loading {
    animation: none;
  }
}

/* Print styles */
@media print {
  .testimonials-section {
    background: none !important;
    color: black !important;
  }
  
  .testimonials-grid {
    display: block;
  }
  
  .testimonial-card {
    display: block;
    margin-bottom: 20px;
    page-break-inside: avoid;
    background: none;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .testimonial-quote::before,
  .testimonial-quote::after {
    color: black;
  }
}

/* Debug styles (remove in production) */
.debug .photo-diamond-container {
  border: 2px dashed red;
}

.debug .diamond-decoration {
  border: 2px dashed blue;
}

.debug .testimonial-photo-container {
  border: 2px dashed green;
}

/* Ensure Lato font is loaded */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

/* Loading state */
.testimonials-section.loading {
  opacity: 0.8;
}

.testimonials-section.loading::after {
  content: 'Loading testimonials...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  z-index: 10;
}

/* Testimonials Section Styles */
.testimonials-section {
  background: linear-gradient(135deg, #F4A261 0%, #E76F51 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.testimonials-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Section Title */
.testimonials-section .section-title {
  text-align: center;
  color: var(--color-white, #EBAA4A);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 60px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Testimonials Grid */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Individual Testimonial Cards */
.testimonial-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 320px;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Testimonial Avatar */
.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 24px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Testimonial Quote */
.testimonial-quote {
  font-size: 1rem;
  color: var(--color-dark, #2e2f3e);
  line-height: 1.6;
  margin-bottom: 20px;
  font-style: italic;
  flex: 1;
  display: flex;
  align-items: center;
  text-align: center;
}

.testimonial-quote::before {
  content: '\"';
  font-size: 2rem;
  color: #E76F51;
  font-weight: bold;
  margin-right: 8px;
  line-height: 1;
}

.testimonial-quote::after {
  content: '\"';
  font-size: 2rem;
  color: #E76F51;
  font-weight: bold;
  margin-left: 8px;
  line-height: 1;
}

/* Testimonial Author */
.testimonial-author {
  font-size: 0.95rem;
  color: var(--color-dark, #2e2f3e);
  font-weight: 600;
  margin-top: auto;
}

/* Loading State */
.testimonials-grid.loading {
  opacity: 0.7;
}

.testimonial-card.loading {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 25%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.8) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .testimonials-section {
    padding: 60px 0;
  }
  
  .testimonials-section .section-title {
    font-size: 2.25rem;
    margin-bottom: 50px;
  }
  
  .testimonials-grid {
    gap: 30px;
    max-width: 900px;
  }
  
  .testimonial-card {
    padding: 35px 25px;
    min-height: 300px;
  }
  
  .testimonial-avatar {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
  }
  
  .testimonial-quote {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .testimonials-section {
    padding: 50px 0;
  }
  
  .testimonials-section .container {
    padding: 0 16px;
  }
  
  .testimonials-section .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 500px;
  }
  
  .testimonial-card {
    padding: 30px 20px;
    min-height: 280px;
  }
  
  .testimonial-avatar {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
  }
  
  .testimonial-quote {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }
  
  .testimonial-author {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .testimonials-section {
    padding: 40px 0;
  }
  
  .testimonials-section .container {
    padding: 0 12px;
  }
  
  .testimonials-section .section-title {
    font-size: 1.75rem;
    margin-bottom: 30px;
  }
  
  .testimonials-grid {
    gap: 20px;
  }
  
  .testimonial-card {
    padding: 25px 16px;
    min-height: 260px;
  }
  
  .testimonial-avatar {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
  }
  
  .testimonial-quote {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }
  
  .testimonial-quote::before,
  .testimonial-quote::after {
    font-size: 1.5rem;
  }
  
  .testimonial-author {
    font-size: 0.85rem;
  }
}

/* Accessibility */
.testimonial-card:focus-within {
  outline: 2px solid var(--color-white, #EBAA4A);
  outline-offset: 4px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .testimonial-card {
    background: var(--color-white, #EBAA4A);
    border: 2px solid var(--color-dark, #2e2f3e);
  }
  
  .testimonial-avatar {
    border-color: var(--color-dark, #2e2f3e);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .testimonial-card {
    transition: none;
  }
  
  .testimonial-card:hover {
    transform: none;
  }
  
  .testimonial-card.loading {
    animation: none;
  }
}

/* Print styles */
@media print {
  .testimonials-section {
    background: none !important;
    color: black !important;
  }
  
  .testimonials-grid {
    display: block;
  }
  
  .testimonial-card {
    display: block;
    margin-bottom: 20px;
    page-break-inside: avoid;
    background: none;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .testimonial-quote::before,
  .testimonial-quote::after {
    color: black;
  }
}