/* Specific Section Styles */

/* Section Title */
.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-primary);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 3px;
}

/* Hero Services Section - Kept for backward compatibility */
.hero-services {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.hero-services .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-services .hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #FFFFFF;
  z-index: 2;
  padding: 0 20px;
}

.hero-services .section-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #FFFFFF !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  position: static;
  text-align: center;
  font-weight: 800;
  letter-spacing: 1px;
}

.hero-services .hero-text h1 {
  font-weight: bold;
}

.hero-services .hero-text p {
  font-size: 1.5rem;
  margin: 0;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Overlay خفيف خلف النص */
.hero-services::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(29,111,66,0.35);
  z-index: 1;
}

/* Services page specific hero section styling */
.services-page .hero-section {
  background-image: url('../images/placeholders/hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #1D6F42;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

/* Responsive adjustments for services hero */
@media (max-width: 768px) {
  .services-page .hero-section {
    background-attachment: scroll;
    min-height: 500px;
    height: auto;
    padding: 2rem 0;
  }
}

@media (max-width: 480px) {
  .services-page .hero-section {
    min-height: 400px;
  }
}

/* Services hero transparent green overlay without blur */
.services-page .hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(29, 111, 66, 0.2); /* Subtle transparent green overlay */
  z-index: 1;
  opacity: 0.8; /* More visible overlay */
}

/* Services hero content styling */
.services-page .hero-section .hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 0 2rem;
  color: #fff;
  text-align: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Safe content zone to prevent text overlap */
  padding-top: 2rem;
  padding-bottom: 2rem;
  /* Ensure text remains sharp and unaffected by backdrop-filter */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.services-page .hero-section .hero-title {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: #FFFFFF;
  font-weight: 800;
  text-align: center;
  margin: 0 0 1rem 0;
  display: block;
  line-height: 1.2;
  /* Ensure text remains sharp and unaffected by backdrop-filter */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.services-page .hero-section .hero-subtitle {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(31, 122, 90, 0.6) 0%, rgba(201, 162, 77, 0.6) 100%);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: inline-block;
  margin: 0 auto 1rem auto;
  line-height: 1.5;
  max-width: 800px;
  /* Ensure text remains sharp and unaffected by backdrop-filter */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Services section base styling */
.services-section {
  display: block;
  visibility: visible;
  opacity: 1;
}

/* Services page specific adjustments - Updated for consistency */
.services-section .services-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  padding: 0 1rem;
  /* Force visibility */
  visibility: visible !important;
  opacity: 1 !important;
}

/* Improve mobile responsiveness for services */
@media (max-width: 768px) {
  .services-section .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0;
  }
  
  /* Use aspect ratio instead of fixed heights for better responsiveness */
  .services-section .service-image {
    aspect-ratio: 16 / 9;
  }
  
  .services-section .service-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }
  
  .services-section .service-price {
    font-size: 1.2rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .services-section .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .services-section .service-image {
    aspect-ratio: 16 / 9;
  }
}





/* Professional Hero Section - for other pages */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  
  /* Professional background image settings - optimized cropping for all devices */
  background-image: url('../images/placeholders/hero-bg.jpg');
  background-size: cover;
  background-position: center center; /* Center crop for optimal viewing on all devices */
  background-repeat: no-repeat;
  background-attachment: fixed; /* Creates parallax effect on desktop */
  
  /* Fallback background color */
  background-color: #1D6F42;
}

/* Responsive hero adjustments */
@media (max-width: 768px) {
  .hero-section {
    background-attachment: scroll;
    background-position: center center; /* Maintain centered crop on mobile */
    min-height: 500px;
    height: auto;
    padding: 2rem 0;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .hero-title {
    font-size: 1.6rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 0.85rem;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 400px;
    background-position: center center; /* Consistent center crop on small screens */
  }
  
  .hero-title {
    font-size: 1.2rem;
  }
  
  .hero-subtitle {
    font-size: 0.65rem;
    padding: 0.6rem;
  }
}

/* Extra small mobile screens like iPhone SE */
@media (max-width: 375px) {
  .hero-section {
    min-height: 380px;
    background-position: center center;
  }
  
  .hero-title {
    font-size: 1.1rem; /* Even smaller for very small screens */
  }
  
  .hero-subtitle {
    font-size: 0.6rem; /* Even smaller for very small screens */
    padding: 0.5rem;
  }
  
  .hero-content {
    padding: 0 0.6rem;
  }
  
  /* Specific extra small mobile styling for homepage hero to match services page */
  .hero-section.services-hero {
    padding-top: 3rem; /* Increase for extra small mobile */
  }
  
  /* Apply same extra small mobile styling to all other hero sections */
  .hero-section:not(.services-hero) {
    padding-top: 3rem; /* Consistent extra small mobile positioning */
  }
  
  .hero-section.services-hero .hero-title {
    font-size: 1.3rem;
  }
  
  .hero-section.services-hero .hero-subtitle {
    font-size: 0.9rem;
    font-weight: bold; /* Ensure bold on extra small mobile */
  }
}

/* iPhone 5/SE specific */
@media (max-width: 320px) {
  .hero-title {
    font-size: 1.0rem; /* Smallest size for tiny screens */
  }
  
  .hero-subtitle {
    font-size: 0.55rem; /* Smallest size for tiny screens */
    padding: 0.4rem;
  }
  
  .hero-content {
    padding: 0 0.5rem;
  }
  
  /* Specific iPhone 5/SE styling for homepage hero to match services page */
  .hero-section.services-hero {
    padding-top: 2.5rem; /* Increase for iPhone 5/SE */
  }
  
  /* Apply same iPhone 5/SE styling to all other hero sections */
  .hero-section:not(.services-hero) {
    padding-top: 2.5rem; /* Consistent iPhone 5/SE positioning */
  }
  
  .hero-section.services-hero .hero-title {
    font-size: 1.1rem;
  }
  
  .hero-section.services-hero .hero-subtitle {
    font-size: 0.75rem;
    font-weight: bold; /* Ensure bold on iPhone 5/SE */
  }
}

/* Professional transparent green overlay without blur */
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(29, 111, 66, 0.2); /* Subtle transparent green overlay */
  z-index: 1;
  opacity: 0.8; /* More visible overlay */
}

.hero-content {
  position: relative;
  z-index: 3; /* Higher than backdrop filter layers */
  max-width: 900px;
  padding: 0 2rem;
  color: #fff;
  text-align: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Safe content zone to prevent text overlap */
  padding-top: 2rem;
  padding-bottom: 2rem;
  /* Ensure text remains sharp and unaffected by backdrop-filter */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Ensure text stays within safe boundaries */
.hero-content .hero-title,
.hero-content .hero-subtitle {
  max-width: 100%;
  padding: 0 1rem;
  margin-left: auto;
  margin-right: auto;
}

/* Safe area for text content */
.hero-safe-zone {
  position: relative;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  margin: 1rem;
}

.hero-title {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: #FFFFFF;
  font-weight: 800;
  text-align: center;
  margin: 0 0 1rem 0;
  display: block;
  line-height: 1.2;
  /* Ensure text remains sharp and unaffected by backdrop-filter */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Specific styling for homepage hero to match services page visual appearance */
.hero-section.services-hero {
  padding-top: 5rem; /* Move content further down */
}
  
.hero-section.services-hero .hero-title {
  font-size: clamp(2.0rem, 4.2vw, 3.2rem); /* Much larger for better visibility */
}
  
.hero-section.services-hero .hero-subtitle {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem); /* Significantly larger subtitle */
  font-weight: bold; /* Make subtitle bold */
}
  
/* Apply same styling to all hero sections for consistency */
.hero-section:not(.services-hero) {
  padding-top: 5rem; /* Move content down for consistency */
}
  
.hero-section:not(.services-hero) .hero-subtitle {
  font-weight: bold; /* Make all hero subtitles bold */
}

.hero-subtitle {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(31, 122, 90, 0.6) 0%, rgba(201, 162, 77, 0.6) 100%);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: inline-block;
  margin: 0 auto 1rem auto;
  line-height: 1.5;
  max-width: 800px;
  /* Ensure text remains sharp and unaffected by backdrop-filter */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-section p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  text-align: center;
}

.hero-section h1 {
  color: #fff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  display: inline-block;
  margin: 0 auto 1rem auto;
  font-weight: 800;
  letter-spacing: 1px;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* Services Section */
.services-section {
  position: relative;
  padding: 6rem 0;
  background-color: #ffffff;
}

/* Service Cards */
.services-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  padding: 20px 0;
  overflow-x: hidden;
}

.service-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.5s, box-shadow 0.5s;
  position: relative;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}

.btn-details {
  display: none; /* Hide since we removed the buttons */
}

.service-image {
  position: relative;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 220px;
  min-height: 200px;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s;
  /* Prevent text overlap on images */
  position: relative;
  z-index: 1;
  /* Ensure high-quality image rendering */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  /* Prevent image dragging */
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

/* Safe content area for service cards */
.service-card .service-content {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  margin-top: -20px;
  border-radius: 16px 16px 0 0;
  padding-top: 25px;
}

.service-card:hover .service-image img {
  transform: scale(1.08);
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(29,111,66,0.45);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  font-weight: bold;
  font-size: 18px;
  transition: opacity 0.4s;
}

.service-card:hover .overlay {
  opacity: 1;
}

.service-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.service-content h3 {
  color: #1D6F42;
  margin-bottom: 8px;
  font-size: 1.3rem;
  font-weight: 600;
}

.service-content p {
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}



/* Responsive Desktop/Tablet */
@media (min-width: 769px) and (max-width: 1199px) {
  .services-carousel,
  .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    overflow-x: hidden;
  }
  
  /* Ensure proper centering on desktop */
  .hero-content {
    align-items: center;
    text-align: center;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  /* Consistent styles for services hero */
  .hero-services .section-title {
    font-size: 2.5rem;
  }
  
  .hero-services .hero-text p {
    font-size: 1.6rem;
  }
  
  /* Section title consistency */
  .section-title {
    font-size: 2.1rem;
    color: var(--color-primary);
  }
  
  /* Adjust hero section for tablet */
  .hero-section {
    min-height: 500px;
    background-attachment: scroll;
  }
}

/* Responsive Mobile: Carousel أفقي */
@media (max-width: 768px) {
  .services-carousel,
  .services-grid {
    display: flex;
    overflow-x: auto;
    gap: 18px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px;
  }
  
  .service-card {
    flex: 0 0 80%;
    scroll-snap-align: start;
  }

  .service-image img {
    height: 180px;
    aspect-ratio: 16/9;
  }
  
  /* Mobile services hero sizing */
  .hero-services .section-title {
    font-size: 1.8rem;
  }
  
  .hero-services .hero-text p {
    font-size: 1.2rem;
  }
  
  /* Section title consistency */
  .section-title {
    font-size: 1.9rem;
    color: var(--color-primary);
  }
  
  /* Adjust hero section for mobile */
  .hero-section {
    min-height: 400px;
    background-attachment: scroll;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    padding: 0.8rem 1.2rem;
  }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
  .hero-content {
    max-width: 900px;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.8rem;
  }
  
  .hero-btns {
    gap: 2rem;
  }
  
  /* Consistent services hero sizing */
  .hero-services .section-title {
    font-size: 3.5rem;
  }
  
  .hero-services .hero-text p {
    font-size: 2rem;
  }
}

.services-section > .container {
  position: relative;
  z-index: 2;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  padding: 0 1rem;
}

/* Improve mobile responsiveness */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Why Choose Us Section */
.why-choose-section {
  position: relative;
  padding: 6rem 0;
  background-color: #ffffff;
}

.why-choose-section > .container {
  position: relative;
  z-index: 2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
}

.stat-card {
  text-align: center;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Storage Calculator Section */
.calculator-section {
  position: relative;
  padding: 6rem 0;
  background-color: #ffffff;
}

.calculator-container {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

/* Testimonials Section */
.testimonials-section {
  position: relative;
  padding: 6rem 0;
  background-color: #ffffff;
}

.testimonials-container {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  width: 100%;
  direction: rtl;
}

.testimonials-wrapper {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
  direction: ltr;
  /* Ensure proper alignment for slider */
  text-align: right;
  width: 100%;
  height: auto;
}

.testimonial-slide {
  flex: 0 0 100%;
  display: block;
  min-width: 100%;
  width: 100%;
  height: auto;
  /* Ensure proper RTL display */
  text-align: right;
  box-sizing: border-box;
}

.testimonials-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.testimonial-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
  transition: var(--transition);
}

.testimonial-dot.active {
  background-color: var(--color-primary);
}

/* FAQ Section */
.faq-section {
  position: relative;
  padding: 6rem 0;
  background-color: #ffffff;
}

.faq-container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

/* Contact Section */
.contact-section {
  position: relative;
  padding: 6rem 0;
  background-color: #ffffff;
}

.contact-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.info-icon {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.info-text {
  color: var(--color-text);
}

/* Footer */
.footer {
  background-color: var(--color-neutral);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  padding: 0 1rem;
}

.footer-logo {
  margin-bottom: 1.5rem;
}

.footer-logo h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-links h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 2px;
  background: var(--color-accent);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--color-text);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--color-primary);
  padding-right: 0.5rem;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #ddd;
  color: var(--color-text);
  font-size: 0.9rem;
}

/* Responsive adjustments for background sections */
@media screen and (max-width: 768px) {
  .hero-title {
    font-size: 1.6rem;
  }
  
  .hero-subtitle {
    font-size: 0.85rem;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .services-section,
  .why-choose-section,
  .calculator-section,
  .testimonials-section,
  .faq-section,
  .contact-section {
    padding: 4rem 0;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

