/* Enhanced CSS for Magēa Restaurant */
/* Keeping original color variables */
:root {
  --primary-color: #be956f;
  --secondary-color: #a87c5a;
  --text-color: #49643b;
  --light-text: #f5f5f5;
  --background: #f9f7ef;
  
  /* Adding new variables for consistency */
  --shadow-sm: 0 2px 5px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
}

/* GLOBAL RESET & TYPOGRAPHY - Enhanced */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed header */
  font-size: 16px;
}

body {
  background: var(--background);
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-medium);
}

h1, .hero-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3rem, 6vw, 4.5rem);
  color: var(--primary-color);
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm);
  margin: 0;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.01em;
}

h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
  font-weight: 300;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* DECORATIVE UNDERLINE & HR - Refined */
.decorative-underline {
  position: relative;
  cursor: pointer;
  display: inline-block;
}

.decorative-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-medium);
}

.decorative-underline:hover::after {
  width: 100%;
}

hr.decorative-hr {
  border: none;
  height: 0;
  width: 250px;
  margin: var(--spacing-md) auto;
  position: relative;
  background: none;
}

hr.decorative-hr::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

hr.decorative-hr::after {
  content: "\f005";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  color: var(--primary-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 6px rgba(190,149,111,0.5);
  font-size: 1.4rem;
  background-color: var(--background);
  padding: 0 10px;
}

/* SECTION DIVIDER - Enhanced */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--spacing-lg) 0;
}

.section-divider .line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--primary-color), transparent);
  max-width: 300px;
}

.section-divider .icon {
  margin: 0 var(--spacing-sm);
  color: var(--primary-color);
  filter: drop-shadow(0 0 6px rgba(190,149,111,0.5));
  transition: transform var(--transition-medium);
}

.section-divider:hover .icon {
  transform: rotate(10deg) scale(1.05);
}

/* LOADER - Improved */
.loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: var(--background);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 9999;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader img {
  animation: pulse 2s infinite ease-in-out;
  max-width: 180px;
}

.loader-circle {
  width: 50px;
  height: 50px;
  border: 5px solid var(--primary-color);
  color: #fdeeb5;
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* HEADER - Enhanced */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  background: #f9f7ef;
  border-bottom: 1px solid rgba(190, 149, 111, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}

header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(245, 237, 218, 0.98);
}

header.hidden {
  transform: translateY(-100%);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.logo {
  height: 60px;
  transition: transform var(--transition-medium);
  border-radius: var(--border-radius-lg);
}

.logo:hover {
  transform: scale(1.05);
}

nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

nav ul li a {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: var(--text-color);
  position: relative;
  padding: 5px 0;
  transition: color var(--transition-medium);
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width var(--transition-medium);
}

nav ul li a:hover {
  color: var(--primary-color);
}

nav ul li a:hover::after {
  width: 100%;
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-color);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.mobile-nav-toggle:hover {
  color: var(--primary-color);
}

@media screen and (max-width: 768px) {
  .mobile-nav-toggle { 
    display: block; 
  }
  
  nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.86, 0, 0.07, 1);
    background: #f9f7ef;
  }
  
  nav.open { 
    max-height: 300px; 
  }
  
  nav ul {
    flex-direction: column;
    text-align: center;
    padding: var(--spacing-sm) 0;
    gap: 15px;
  }
  
  nav ul li a {
    display: block;
    padding: 8px 0;
  }
  
  nav ul li a::after {
    display: none;
  }
}

/* HERO SECTION - Enhanced */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px; /* Account for fixed header */
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url("assets/food13.jpg") center/cover no-repeat;
  filter: brightness(90%);
  z-index: -2;
  transform: scale(1.03); /* Slight zoom for parallax effect */
  transition: transform 0.5s ease;
}

.hero:hover::before {
  transform: scale(1);
}

#hero-video {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -2;
  display: none;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--spacing-md);
  max-width: 800px;
  margin: 0 auto;
}

.hero-image {
  max-width: 100%;
  height: auto;
  max-height: 250px;
  filter: drop-shadow(0 0 15px rgba(255,255,255,0.3));
  transition: transform var(--transition-slow);
}

.hero-content:hover .hero-image {
  transform: scale(1.02);
}

.cta-button {
  display: inline-block;
  padding: 15px 25px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 40px;
  font-weight: 600;
  transition: all var(--transition-medium);
  margin-top: var(--spacing-md);
  box-shadow: var(--shadow-md);
}

.cta-button:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

@media screen and (max-width: 768px) {
  .hero::before { display: none; }
  #hero-video { display: block; }
  .hero-content {
    padding: var(--spacing-sm);
  }
}

/* ABOUT SECTION - Enhanced */
.about {
  padding: var(--spacing-lg) var(--spacing-sm);
  text-align: center;
  position: relative;
}

.about .about-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Timeline for story steps */
.timeline-container {
  position: relative;
  margin: var(--spacing-lg) auto;
  padding-left: 50px;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background-color: #e3e3e3;
}

.timeline-fill {
  position: absolute;
  top: 0;
  left: 20px;
  width: 2px;
  background-color: var(--primary-color);
  height: 0%;
  transition: height 0.6s ease;
}

.story-step {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
  margin: 40px auto;
  max-width: 500px;
  background: rgba(255,255,255,0.92);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  text-align: left;
  position: relative;
  border-left: 3px solid var(--primary-color);
}

.story-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.story-step h3 {
  color: var(--text-color);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.story-step p {
  color: #333;
  font-size: 1rem;
  line-height: 1.7;
}

.story-step::before {
  content: '';
  position: absolute;
  left: -55px;
  top: 10px;
  width: 16px;
  height: 16px;
  background: #e3e3e3;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  transition: 0.3s;
  z-index: 2;
}

.story-step.visible::before {
  background: var(--primary-color);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(190,149,111,0.5);
}

/* TEAM SECTION - Enhanced */
.team {
  padding: var(--spacing-lg) var(--spacing-sm);
  text-align: center;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.team-member {
  background: var(--background);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.team-member:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.team-member img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-bottom: 2px solid var(--background);
  transition: transform var(--transition-slow);
}

.team-member:hover img {
  transform: scale(1.03);
}

.team-member-info {
  padding: var(--spacing-md);
  color: #000;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.team-member-info h3 {
  margin-bottom: 5px;
  color: var(--primary-color);
  font-size: 1.4rem;
}

.team-member-info p {
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.team-member-info .social-links {
  margin-top: auto;
}

.team-member-info .social-links a {
  margin: 0 8px;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: color var(--transition-medium), transform var(--transition-medium);
  display: inline-block;
}

.team-member-info .social-links a:hover {
  color: var(--secondary-color);
  transform: translateY(-3px);
}

/* OPTIMIZED GALLERY SECTION */

/* Simplified gallery styles to reduce rendering overhead */
.gallery {
  padding: var(--spacing-lg) var(--spacing-sm);
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 40px auto 0;
  contain: layout style; /* Improves rendering performance */
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Simplified shadow */
  transition: transform 0.3s ease; /* Reduced transitions */
  will-change: transform; /* Hint to browser for optimization */
  contain: content; /* Performance optimization */
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Removed transition for images */
}

.gallery-item figcaption {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #f5f5f5;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease; /* Simplified transition */
  white-space: nowrap;
}

.gallery-item:hover figcaption {
  opacity: 1;
}

/* Optimized lightbox */
.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  display: none; /* Changed from visibility/opacity for better performance */
  align-items: center;
  justify-content: center;
}

.gallery-lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* Optimized fade-in animations */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media queries for better responsive performance */
@media screen and (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
  }
}

@media screen and (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
  }
}

@media screen and (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* TESTIMONIALS SECTION - Enhanced */
.testimonials {
  padding: var(--spacing-lg) var(--spacing-sm);
  text-align: center;
  background: #2f2f2f;
  color: var(--light-text);
  position: relative;
}

.testimonials::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('assets/IMG_1330(1)-min.jpeg') center/cover fixed;
  opacity: 0.4;
  z-index: 0;
}

.testimonials h2 {
  color: var(--light-text);
}

.testimonials-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.testimonials blockquote {
  position: relative;
  font-style: italic;
  margin: 40px auto;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  color: var(--light-text);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-medium);
}

.testimonials blockquote:hover {
  transform: translateY(-5px);
}

.testimonials blockquote::before {
  content: "";
  font-size: 4rem;
  color: var(--primary-color);
  position: absolute;
  left: 10px;
  top: -20px;
  opacity: 0.5;
}

.testimonials blockquote p {
  color: var(--light-text);
  font-size: 1.1rem;
  line-height: 1.7;
}

.testimonials blockquote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-weight: bold;
  color: var(--primary-color);
}

.view-google-maps-button {
  display: inline-block;
  margin-top: var(--spacing-md);
  padding: 12px 25px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  transition: background var(--transition-medium), transform var(--transition-medium), box-shadow var(--transition-medium);
  box-shadow: var(--shadow-md);
}

.view-google-maps-button:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* CONTACT SECTION - Enhanced */
.contact {
  padding: var(--spacing-lg) var(--spacing-sm);
  text-align: center;
  background: linear-gradient(to bottom, var(--background), rgba(255,255,255,0.8));
}

.contact .contact-container {
  max-width: 600px;
  margin: 0 auto;
}

.contact p {
  font-size: 1.2rem;
  max-width: 500px;
  margin: 0 auto var(--spacing-md);
}

.contact-button {
  display: inline-block;
  padding: 15px 35px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 30px;
  font-weight: 600;
  transition: background var(--transition-medium), transform var(--transition-medium), box-shadow var(--transition-medium);
  box-shadow: var(--shadow-md);
  letter-spacing: 0.5px;
}

.contact-button:hover {
  background: var(--secondary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* FOOTER - Enhanced */
footer {
  background-color: #333;
  color: #888;
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-sm);
}

footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

footer p {
  margin-bottom: 10px;
  color: #aaa;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: var(--spacing-sm);
}

.footer-nav ul li a {
  color: var(--primary-color);
  font-weight: 500;
  transition: color var(--transition-medium);
  padding: 5px 0;
}

.footer-nav ul li a:hover {
  color: #fff;
}

.btn-kefalostech {
  display: inline-block;
  padding: 8px 15px;
  font-weight: bold;
  font-size: 0.9rem;
  background: linear-gradient(45deg, #ffc107, #ff8800);
  color: #fff;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(255,136,0,0.3);
  transition: all var(--transition-medium);
}

.btn-kefalostech:hover {
  background: linear-gradient(45deg, #ff8800, #ffc107);
  box-shadow: 0 6px 20px rgba(255,136,0,0.5);
  transform: scale(1.05);
}

/* SCROLL TO TOP BTN - Enhanced */
#scrollToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  background: var(--primary-color);
  color: #fff;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
  z-index: 1000;
}

#scrollToTop.show {
  opacity: 1;
  visibility: visible;
}

#scrollToTop:hover {
  background: var(--secondary-color);
  transform: translateY(-5px) scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* SVG DECORATIONS - Enhanced */
.decorative-svg {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  width: 100%;
  opacity: 0.6;
}

.decorative-about {
  top: 10%;
  left: 0;
  width: 95%;
}

.decorative-gallery {
  top: 5%;
  left: 0;
  width: 95%;
}

.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
  transition: transform var(--transition-slow);
}

.wave-divider:hover svg {
  transform: translateY(-5px);
}

.wave-top {
  margin-bottom: -2px;
}

/* ANIMATIONS - Enhanced */
@keyframes fadeIn { 
  0% { opacity: 0; } 
  100% { opacity: 1; } 
}

@keyframes fadeInDown { 
  0% { opacity: 0; transform: translateY(-30px); } 
  100% { opacity: 1; transform: translateY(0); } 
}

@keyframes fadeInUp { 
  0% { opacity: 0; transform: translateY(30px); } 
  100% { opacity: 1; transform: translateY(0); } 
}

@keyframes zoomIn { 
  0% { opacity: 0; transform: scale(0.9); } 
  50% { opacity: 0.7; } 
  100% { opacity: 1; transform: scale(1); } 
}

@keyframes scaleIn { 
  0% { transform: scale(0.8); opacity: 0; } 
  60% { transform: scale(1.1); opacity: 0.7; } 
  100% { transform: scale(1); opacity: 1; } 
}

@keyframes cardUp { 
  0% { opacity: 0; transform: translateY(40px); } 
  100% { opacity: 1; transform: translateY(0); } 
}

.animate-fadeIn { 
  animation: fadeIn 1s ease forwards; 
}

.animate-fadeInDown { 
  animation: fadeInDown 1s ease forwards; 
}

.animate-fadeInUp { 
  animation: fadeInUp 1s ease forwards; 
}

.animate-zoomIn { 
  animation: zoomIn 1s ease forwards; 
}

.animate-scaleIn { 
  animation: scaleIn 1s ease forwards; 
}

.animate-cardUp { 
  opacity: 0; 
  transform: translateY(40px); 
  animation: cardUp 1s 0.2s forwards; 
}

/* Staggered animation for team members */
.team-member:nth-child(2) {
  animation-delay: 0.3s;
}

.team-member:nth-child(3) {
  animation-delay: 0.4s;
}

.team-member:nth-child(4) {
  animation-delay: 0.5s;
}

/* RESPONSIVE ADJUSTMENTS */
@media screen and (max-width: 992px) {
  html {
    font-size: 15px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
}

@media screen and (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .hero-title { 
    font-size: 2.5rem; 
  }
  
  .hero-subtitle { 
    font-size: 1.2rem; 
  }
  
  .about, .team, .gallery, .testimonials, .contact { 
    padding: 60px 15px; 
  }
  
  .story-step h3 { 
    font-size: 1.4rem; 
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  
  .team-member img {
    height: 220px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
  }
  
  .gallery-item figcaption {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  
  .footer-nav ul {
    gap: 15px;
  }
}

@media screen and (max-width: 480px) {
  html {
    font-size: 13px;
  }
  
  .hero-title { 
    font-size: 2rem; 
  }
  
  .hero-subtitle { 
    font-size: 1rem; 
  }
  
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Fade-in animations for scrolling */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Add reveal animations for sections */
.reveal {
  position: relative;
  opacity: 0;
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
}

.reveal-left {
  transform: translateX(-100px);
}

.reveal-right {
  transform: translateX(100px);
}

.reveal-up {
  transform: translateY(100px);
}

.reveal.active {
  transform: translateX(0);
}

/* Add smooth hover effects for all interactive elements */
a, button, .logo, .team-member, .gallery-item {
  will-change: transform;
}

/* Improve accessibility */
a:focus, button:focus {
  outline: 2px dashed var(--primary-color);
  outline-offset: 3px;
}

a:focus:not(:focus-visible), button:focus:not(:focus-visible) {
  outline: none;
}

/* Add subtle background patterns */
.bg-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23be956f' fill-opacity='0.2' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

.family {
  padding: 60px 20px;
  background-color: #fffaf5;
}

.family-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.family-photo {
  flex: 1 1 300px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.family-text {
  flex: 2 1 400px;
  font-family: 'Poppins', sans-serif;
  color: #333;
  line-height: 1.6;
}
