/**
 * مطعم الصلاة على النبي - Main Stylesheet
 * Color Palette: #00b5c2 (Cyan), #003f5c (Dark Blue), #dbe7ec (Light Blue), #87CEEB (Sky Blue)
 */

/* ====================================
   CSS Variables & Reset
   ==================================== */
:root {
  --primary-color: #00b5c2;
  --secondary-color: #003f5c;
  --light-bg: #dbe7ec;
  --sky-blue: #87ceeb;
  --white: #ffffff;
  --text-dark: #2b2b2b;
  --text-gray: #555555;
  --transition: 0.3s ease-in-out;
  --radius: 10px;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Cairo", sans-serif;
  background-color: var(--white);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  margin: 0 !important;
  padding: 0 !important;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* ====================================
   Preloader
   ==================================== */
.preload {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--sky-blue);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: 0.6s ease;
}

.preload.loaded {
  transform: translateY(-100%);
}

.preload .circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--white);
  border-top-color: var(--text-dark);
  margin-bottom: 30px;
  animation: rotate360 1s linear infinite;
}

@keyframes rotate360 {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.preload .text {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-top: 20px;
}

/* ====================================
   Background Slider (Home Page)
   ==================================== */
.background-slider {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.background-slider img {
  position: absolute;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  opacity: 0;
  animation: smoothSlider 12s infinite;
  transition: opacity 1s ease-in-out;
}

.background-slider img:nth-child(1) {
  animation-delay: 0s;
}
.background-slider img:nth-child(2) {
  animation-delay: 4s;
}
.background-slider img:nth-child(3) {
  animation-delay: 8s;
}

@keyframes smoothSlider {
  0%,
  100% {
    opacity: 0;
  }
  10%,
  30% {
    opacity: 0.65;
  }
  33.33% {
    opacity: 0;
  }
}

/* ====================================
   Main Header (Home Page)
   ==================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  text-align: center;
  padding: 15px 0;
  background-color: rgba(230, 247, 255, 0.95);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.header-logo img {
  width: 150px;
  height: auto;
}

.lang-switch {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
}

.lang-switch:hover {
  background-color: var(--primary-color);
}

/* ====================================
   Title Box (Home Page)
   ==================================== */
.title-box {
  padding-top: 140px;
  text-align: center;
  margin-bottom: 30px;
}

.title-box h1 {
  font-size: 36px;
  color: var(--secondary-color);
  background-color: rgba(255, 255, 255, 0.9);
  display: inline-block;
  padding: 15px 35px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ====================================
   Branches Container (Home Page)
   ==================================== */
.branches-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin: 50px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.branch-card {
  background-color: var(--white);
  border: 2px solid var(--primary-color);
  border-radius: 20px;
  overflow: hidden;
  width: 330px;
  min-height: 500px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
}

.branch-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 181, 194, 0.3);
}

.branch-image {
  flex-shrink: 0;
}

.branch-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.branch-info {
  padding: 20px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.branch-info h2 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 12px;
  font-weight: 700;
}

.branch-info p {
  margin: 6px 0;
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.5;
}

.branch-info p i {
  margin-left: 5px;
  color: var(--primary-color);
}

/* Phone Link Styles */
.phone-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.phone-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Social Media Icons */
.branch-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--light-bg);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--light-bg);
  color: var(--text-dark);
  font-size: 18px;
  transition: all var(--transition);
  text-decoration: none;
  flex-shrink: 0;
}

.social-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-icon.facebook {
  background-color: #1877f2;
  color: white;
}

.social-icon.facebook:hover {
  background-color: #0c63d4;
}

.social-icon.instagram {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  color: white;
}

.social-icon.instagram:hover {
  background: linear-gradient(
    45deg,
    #e08322 0%,
    #d5572b 25%,
    #cb1632 50%,
    #bb1255 75%,
    #ab0777 100%
  );
}

.social-icon.tiktok {
  background-color: #000000;
  color: white;
}

.social-icon.tiktok:hover {
  background-color: #ff0050;
}

.social-icon.whatsapp {
  background-color: #25d366;
  color: white;
}

.social-icon.whatsapp:hover {
  background-color: #20ba5a;
}

/* ====================================
   Branch Header (Branch Pages)
   ==================================== */
.branch-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--white);
  text-align: center;
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
}

.branch-header h1 {
  font-size: 28px;
  margin: 10px 0;
}

.back-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 8px;
  color: var(--white);
  font-weight: bold;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.branch-header .lang-switch {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
}

.branch-header .lang-switch:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ====================================
   Sections
   ==================================== */
.section {
  padding: 60px 20px;
}

.section-title {
  text-align: center;
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: var(--text-gray);
  font-size: 16px;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ====================================
   Intro Section
   ==================================== */
.intro-section {
  background: linear-gradient(
    to bottom,
    rgba(219, 231, 236, 0.5),
    var(--white)
  );
}

.intro-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.intro-content h2 {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.about-text h3 {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 24px;
}

.about-text p {
  color: var(--text-gray);
  font-size: 16px;
  margin-bottom: 15px;
  line-height: 1.8;
}

/* ====================================
   Menu Section
   ==================================== */
.menu-section {
  background-color: #f9f9f9;
}

.menu-search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto 30px;
}

.menu-search {
  width: 100%;
  padding: 12px 45px 12px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  font-size: 16px;
  font-family: "Cairo", sans-serif;
}

.menu-search-container i {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 20px;
}

.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.menu-tab {
  background-color: var(--white);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 50px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.menu-tab:hover,
.menu-tab.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.dish-card {
  display: flex;
  background: var(--white);
  border: 1px solid #eee;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 15px;
  align-items: center;
  transition: var(--transition);
  position: relative;
}

.dish-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 181, 194, 0.2);
}

.dish-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-left: 15px;
}

.dish-content {
  flex: 1;
}

.dish-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #ddd;
}

.dish-header h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

.price {
  font-size: 16px;
  color: var(--primary-color);
  font-weight: bold;
  white-space: nowrap;
}

.description {
  font-size: 14px;
  color: var(--text-gray);
  margin: 8px 0 0;
}

.badge-popular {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.loading-spinner {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light-bg);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: rotate360 1s linear infinite;
  margin: 0 auto 20px;
}

.no-data,
.error {
  text-align: center;
  padding: 40px;
  color: var(--text-gray);
}

/* ====================================
   Testimonials Section
   ==================================== */
.testimonials-section {
  background-color: var(--light-bg);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.testimonial-card h3 {
  font-size: 18px;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.testimonial-card h3 span {
  font-size: 14px;
  color: var(--text-gray);
  font-weight: normal;
}

.stars {
  color: #ffd700;
  font-size: 20px;
  margin-bottom: 10px;
}

.testimonial-card p {
  color: var(--text-gray);
  font-size: 15px;
  line-height: 1.6;
}

/* ====================================
   Offers Section
   ==================================== */
.offers-section {
  background-color: var(--white);
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.offer-card {
  background: linear-gradient(135deg, var(--primary-color), var(--sky-blue));
  color: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.offer-card:hover {
  transform: translateY(-5px);
}

.offer-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
}

.offer-card p {
  font-size: 16px;
  margin-bottom: 10px;
}

.offer-validity {
  display: inline-block;
  background: rgba(255, 255, 255, 0.3);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  margin-top: 10px;
}

/* ====================================
   Gallery Section
   ==================================== */
.gallery-section {
  background-color: #f9f9f9;
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.gallery-tab {
  background-color: #e0f7fa;
  color: var(--primary-color);
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Cairo", sans-serif;
}

.gallery-tab:hover,
.gallery-tab.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.gallery-swiper {
  width: 100%;
  padding-bottom: 50px;
}

.gallery-swiper .swiper-slide img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.swiper-pagination-bullet {
  background: var(--primary-color) !important;
}

.swiper-pagination-bullet-active {
  background: var(--secondary-color) !important;
}

.d-none {
  display: none !important;
}

/* ====================================
   Partners Section
   ==================================== */
.partners-section {
  background-color: var(--white);
}

.partner-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.partner-card img {
  max-height: 60px;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: var(--transition);
}

.partner-card:hover img {
  filter: grayscale(0%);
}

/* ====================================
   Location Section
   ==================================== */
.location-section {
  background-color: var(--light-bg);
}

.location-address {
  text-align: center;
  font-size: 18px;
  color: var(--text-gray);
  margin-bottom: 25px;
}

.map-container {
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 auto;
}

/* ====================================
   Footer
   ==================================== */
.footer {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 40px 20px 20px;
}

.footer-section {
  margin-bottom: 30px;
}

.footer-section h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 20px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--white);
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.contact-info p {
  margin-bottom: 10px;
}

/* Footer Phone Links */
.footer-phone {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.footer-phone:hover {
  color: var(--sky-blue);
  border-bottom: 1px solid var(--sky-blue);
}

.social-links {
  margin-top: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 22px;
  transition: all var(--transition);
  text-decoration: none;
}

.social-icon-footer {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.social-icon-footer:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-icon-footer.facebook:hover {
  background-color: #1877f2;
}

.social-icon-footer.instagram:hover {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
}

.social-icon-footer.tiktok:hover {
  background-color: #000000;
}

.social-icon-footer.whatsapp:hover {
  background-color: #25d366;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.developer a {
  color: var(--primary-color);
  font-weight: bold;
}

.developer a:hover {
  color: var(--sky-blue);
}

/* Simple Footer for Home Page */
.simple-footer {
  background-color: var(--secondary-color);
  color: var(--white);
  text-align: center;
  padding: 30px 20px 20px 20px;
  margin: 60px 0 0 0;
}

.simple-footer a {
  color: var(--primary-color);
  font-weight: bold;
}

.simple-footer p {
  margin: 5px 0;
}

.simple-footer p:last-child {
  margin-bottom: 0;
}

/* ====================================
   Back to Top Button
   ==================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 999;
  background-color: var(--primary-color);
  color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
}

/* ====================================
   Responsive Design
   ==================================== */
@media (max-width: 768px) {
  .title-box h1 {
    font-size: 28px;
    padding: 10px 20px;
  }

  .branch-card {
    width: 100%;
    max-width: 350px;
    min-height: auto;
  }

  .branch-image img {
    height: 180px;
  }

  .branch-info {
    padding: 15px;
  }

  .branch-info h2 {
    font-size: 18px;
  }

  .branch-info p {
    font-size: 13px;
    margin: 5px 0;
  }

  .social-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .section-title {
    font-size: 26px;
  }

  .dish-card {
    flex-direction: column;
    text-align: center;
  }

  .dish-card img {
    width: 100%;
    height: 200px;
    margin-left: 0;
    margin-bottom: 15px;
  }

  .dish-header {
    flex-direction: column;
    gap: 10px;
  }

  .back-btn {
    position: static;
    transform: none;
    display: block;
    margin: 10px auto;
    width: fit-content;
  }

  .branch-header .lang-switch {
    position: static;
    transform: none;
    display: block;
    margin: 10px auto;
    width: fit-content;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .menu-tab {
    font-size: 14px;
    padding: 10px 20px;
  }

  .dish-header h4 {
    font-size: 16px;
  }
}
