/* Home Page Styles */

/* Hero Section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--color-off-white);
  overflow: hidden;
  padding: 150px 0 150px; /* Added top padding to clear the header, and bottom padding for balance */
}

.hero-image-pane {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  background-size: cover;
  background-position: center 20%;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
  animation: slideInRight 1.2s ease-out;
}

.hero .container {
  /* The container gives the left-side padding automatically */
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 45%; /* Restricts the text to the left half */
  animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 15% 100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
  }
}

.hero-subtitle {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
  color: var(--color-gold);
}

.hero-content h1 {
  font-size: 4rem;
  color: var(--color-secondary-dark);
  margin-bottom: var(--spacing-md);
  line-height: 1.1;
}

.hero-content p {
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
  color: var(--color-gray-700);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

/* About Preview Section */
.about-preview {
  padding: var(--spacing-xxl) 0;
  background-color: var(--color-white);
}

.about-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.about-image-collage {
  position: relative;
}

.main-collage-img {
  width: 100%;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.inset-collage-img {
  position: absolute;
  bottom: -40px;
  right: -50px;
  width: 60%;
  border: 6px solid var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.excellence-badge {
  position: absolute;
  bottom: 20px;
  left: -40px;
  background-color: var(--color-gold);
  color: var(--color-white);
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-heading);
  line-height: 1.2;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  border: 4px solid var(--color-white);
}

.excellence-badge strong {
  font-size: 2.8rem;
  font-weight: 700;
}

.excellence-badge span {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-text-content .section-title {
  margin-bottom: var(--spacing-sm);
}
.about-text-content p {
  color: var(--color-gray-700);
}

.about-features {
  display: flex;
  justify-content: space-around;
  margin: var(--spacing-lg) 0;
  padding: 0 var(--spacing-sm);
}

.about-feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  text-align: center;
}

.about-feature-item i {
  font-size: 1.8rem;
  color: var(--color-gold);
}

.about-feature-item span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-gray-800);
}

.about-button-wrapper {
  text-align: center;
  margin-top: var(--spacing-lg);
}

/* Features Section */
.features {
  padding: var(--spacing-xxl) 0;
  background-color: var(--color-off-white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.feature-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow-lg);
}

.feature-card-image {
  height: 250px;
  overflow: hidden;
}

.feature-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.feature-card:hover .feature-card-image img {
  transform: scale(1.05);
}

.feature-card-content {
  padding: var(--spacing-lg) var(--spacing-md);
}

.feature-card-content h3 {
  font-size: 1.5rem;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-sm);
}

.feature-card-content p {
  font-size: 0.95rem;
  color: var(--color-gray-700);
  line-height: 1.6;
  margin-bottom: 0;
}


/* Popular Tours Section */
.popular-tours {
  padding: var(--spacing-xxl) 0;
  background-color: var(--color-white);
}

.tours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
}

.hidden-tours {
  animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.tour-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-gray-200);
}

.tour-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow-lg);
  border-color: var(--color-gold);
}

.tour-image {
  height: 250px;
  overflow: hidden;
}

.tour-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tour-card:hover .tour-image img {
  transform: scale(1.1);
}

.tour-content {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tour-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-xs);
}

.tour-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-secondary-dark);
  margin: 0;
  flex: 1;
}

.tour-duration {
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  margin-left: 10px;
}

.tour-description {
  font-size: 0.95rem;
  color: var(--color-gray-700);
  margin-bottom: var(--spacing-sm);
  flex-grow: 1;
}

.tour-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--spacing-md);
}

.tour-cities span {
  background-color: var(--color-gray-200);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--color-gray-800);
}

.tour-content .btn {
  margin-top: auto;
}

/* Destinations Section */
.destinations {
  padding: var(--spacing-xxl) 0;
}

.destinations-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: var(--spacing-md);
  height: 750px;
}

.destination-card {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  transition: var(--transition-slow);
}

.destination-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
  transition: var(--transition-slow);
}

.destination-card:hover {
  transform: scale(1.03);
  box-shadow: var(--box-shadow-lg);
}

.destination-card.destination-large {
  grid-row: 1 / -1; /* Span all three rows */
}

.destination-content {
  position: relative;
  z-index: 2;
  padding: var(--spacing-md);
  color: var(--color-white);
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.5s ease;
}

.destination-card:hover .destination-content {
  transform: translateY(0);
  opacity: 1;
}

.destination-content h3 {
  color: var(--color-white);
  font-size: 2rem;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.destination-card.destination-small .destination-content h3 {
  font-size: 1.5rem;
}

.destination-content p {
  color: var(--color-gold);
  font-weight: 500;
  margin: 5px 0 0;
}


/* Testimonials Section */
.testimonials {
  padding: var(--spacing-xxl) 0;
  background: linear-gradient(135deg, hsl(43, 74%, 94%), hsl(196, 74%, 94%));
  position: relative;
  overflow: hidden;
}

.testimonial-partners {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.partner-text {
  font-weight: 500;
  color: var(--color-gray-700);
}

.testimonial-partners img {
  height: 50px;
  filter: grayscale(100%) opacity(0.7);
  transition: var(--transition);
}

.testimonial-partners img:hover {
  filter: grayscale(0%) opacity(1);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.testimonial-card {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-lg);
}

.testimonial-card .fa-quote-right {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 4rem;
  color: var(--color-gold);
  opacity: 0.15;
}

.testimonial-stars {
    color: var(--color-gold);
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-gray-800);
    font-style: italic;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 2;
}

.testimonial-author {
    font-weight: 600;
    color: var(--color-secondary);
    font-size: 0.9rem;
}

/* CTA Section */
.cta {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  padding: var(--spacing-xxl) 0;
  z-index: 1;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(45deg, rgba(26, 95, 122, 0.8), rgba(195, 88, 49, 0.7));
  z-index: -1;
}

.cta-content {
  text-align: center;
  color: var(--color-white);
  max-width: 800px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 3rem;
  color: var(--color-white);
  margin-bottom: var(--spacing-sm);
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* Instagram Gallery */
.instagram-gallery {
  padding: var(--spacing-xxl) 0;
  background-color: var(--color-white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.1) rotate(2deg);
}

.gallery-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(212, 175, 55, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  color: var(--color-white);
  font-size: 2.5rem;
}

/* Media Queries */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  /* MOBILE HERO SECTION STYLES */
  .hero {
    padding: 0;
    min-height: 85vh;
    justify-content: center;
    text-align: center;
    background: none; /* Remove background color from hero wrapper */
  }
  .hero-image-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: none; /* Reset clip-path */
    z-index: 1;
    animation: none; /* Disable desktop animation */
  }
  .hero-image-pane::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Add dark overlay for text readability */
  }
  .hero-content {
    max-width: 100%;
    animation: none; /* Disable desktop animation */
  }
  .hero-content h1,
  .hero-content p {
    color: var(--color-white);
  }
  .hero-content h1 {
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
  }
  .hero-buttons {
    justify-content: center;
  }
  /* END MOBILE HERO */

  .about-preview-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .destinations-grid {
    grid-template-columns: repeat(2, 1fr);
    height: auto;
  }
  .destination-card.destination-large {
    grid-row: auto; /* Reset grid span */
  }
  
  .tours-grid, .testimonials-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 3rem;
  }

  .inset-collage-img {
    display: none;
  }
  .excellence-badge {
    width: 100px;
    height: 100px;
    left: 10px;
    bottom: 10px;
  }
  .excellence-badge strong { font-size: 2rem; }

  .tours-grid, .testimonials-grid, .destinations-grid {
    grid-template-columns: 1fr;
  }
  .destination-card {
    height: 300px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cta-content h2 {
    font-size: 2.2rem;
  }
  .cta-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
}

@media (max-width: 576px) {
  section {
    padding: var(--spacing-xl) 0;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .destination-card {
    height: 250px;
  }
  .about-features {
    flex-direction: column;
    gap: 1.5rem;
  }
  .about-text-content {
    text-align: center;
  }
  .about-text-content .section-title,
  .about-text-content p {
    text-align: center;
  }
}

/* === NEW STYLES FOR MOROCCO MAGIC TOURS LOGO === */

#header .logo a, 
.footer .footer-logo a {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(45deg, #c5a646, #e7d28c, #dcc36a, #bfa044);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  letter-spacing: 0.5px;
  padding: 5px 0;
}

#header .logo a {
  font-size: 2rem; /* Adjusted for header */
}

.footer .footer-logo a {
    font-size: 1.8rem; /* A slightly smaller logo for the footer */
}

.logo img, .footer-logo img {
  display: none;
}

@media (max-width: 992px) {
    #header .logo a {
        font-size: 1.8rem;
    }
}


/* === FIXED TRANSPORTATION FORM SECTION === */
.transport-form-section {
    padding: var(--spacing-xxl) 0;
    position: relative;
    background-image: url('https://www.asiltur.com/uploads/editor/vip-transfer_2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.transport-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 20, 30, 0.75);
    backdrop-filter: blur(3px);
    z-index: 1;
}

.transport-form-section .container {
    position: relative;
    z-index: 2;
}

/* Update header text color for readability */
.transport-form-section .section-header .section-subtitle {
    color: var(--color-gold);
}
.transport-form-section .section-header .section-title,
.transport-form-section .section-header .section-description {
    color: #FFFFFF;
}

.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
    margin-top: var(--spacing-xl);
}

.form-tabs {
    display: flex;
    background: var(--color-gray-100);
}

.tab-link {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-gray-600);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-link.active {
    color: var(--color-secondary-dark);
    background: var(--color-white);
    border-bottom-color: var(--color-gold);
}

.tab-content {
    display: none;
    padding: var(--spacing-lg);
    animation: formFadeIn 0.5s ease;
}

@keyframes formFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content.active {
    display: block;
}

.form-description {
    font-size: 0.95rem;
    color: var(--color-gray-600);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.form-row {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    flex-basis: 100%;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-gray-700);
    margin-bottom: var(--spacing-xs);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px hsla(43, 74%, 56%, 0.2);
}

.form-wrapper .btn.full-width {
    width: 100%;
    padding-top: 15px;
    padding-bottom: 15px;
    font-size: 1.1rem;
    margin-top: var(--spacing-sm);
}

/* Gold Feature Cards */
.transport-features-grid {
    display: flex;
    gap: var(--spacing-xl);
    justify-content: center;
    margin-top: var(--spacing-xxl);
    flex-wrap: wrap;
}

.feature-card-gold {
    background: linear-gradient(135deg, #c5a646, #e7d28c);
    color: var(--color-secondary-dark);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px rgba(197, 166, 70, 0.3);
    flex: 1;
    min-width: 300px;
    max-width: 420px;
}

.feature-card-gold h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.feature-card-gold h3 i {
    margin-right: 10px;
    opacity: 0.8;
}

.feature-card-gold p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-secondary-dark);
    opacity: 0.9;
}

/* Responsive adjustments for the form */
@media (max-width: 576px) {
    .form-row {
        flex-direction: column;
        gap: var(--spacing-md);
        margin-bottom: 0;
    }
    .form-row .form-group {
      margin-bottom: var(--spacing-md);
    }
}