/* ===== VARIABLES ===== */
:root {
  /* Colors */
  --primary-color: #ff6b6b;
  --secondary-color: #6c5ce7;
  --accent-color: #00d2d3;
  --dark-color: #2d3436;
  --light-color: #f9f9f9;
  --white: #ffffff;
  --black: #000000;

  /* Gradient */
  --gradient-primary: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );

  /* Typography */
  --heading-font: "Montserrat", sans-serif;
  --body-font: "Roboto", sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-round: 50%;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Container */
  --container-max-width: 1200px;
  --container-padding: 1.5rem;
}

/* ===== RESET & BASE STYLES ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--white);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

section {
  padding: var(--spacing-lg) 0;
}

/* ===== UTILITY CLASSES ===== */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
}

.btn-primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-service {
  width: 100%;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-sm);
}

.btn-service:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-xs);
  position: relative;
  display: inline-block;
}

.section-divider {
  height: 4px;
  width: 70px;
  background: var(--gradient-primary);
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

/* ===== WHATSAPP BUTTON ===== */
.whatsapp-button {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  -webkit-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  z-index: 100;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  /* Ensure touch target size for accessibility */
  min-width: 44px;
  min-height: 44px;
  /* Better visibility with slight transparency */
  opacity: 0.95;
  /* Fix for iOS Safari safe area */
  padding: 0;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  line-height: 1;
}

.whatsapp-button:hover,
.whatsapp-button:focus {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
  -webkit-box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  opacity: 1;
}

.whatsapp-button:active {
  -webkit-transform: scale(0.95);
  transform: scale(0.95);
}

.whatsapp-icon {
  font-size: 30px;
  color: white;
  display: inline-block;
  vertical-align: middle;
  line-height: normal;
  margin: 0;
  padding: 0;
  /* Prevent shifting on different devices */
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  padding: 1rem 0;
  /* Add transition for height changes */
  transition: padding var(--transition-normal),
    background-color var(--transition-normal);
}

/* Compact header on scroll */
.header.compact {
  padding: 0.5rem 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: var(--shadow-md);
}

.header.compact .logo-img {
  height: 40px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  transition: height var(--transition-normal);
}

.main-nav {
  display: flex;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-link {
  padding: 0.8rem 1rem;
  color: var(--dark-color);
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-normal);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 70%;
}

.nav-button {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  margin-left: var(--spacing-sm);
  font-weight: 600;
}

.nav-button:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--white);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  /* Ensure proper touch target size */
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  align-items: center;
  justify-content: center;
}

.hamburger-lines {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
}

.line {
  height: 3px;
  width: 100%;
  background-color: var(--dark-color);
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* ===== HERO SECTION ===== */
.hero-section {
  padding: calc(var(--spacing-lg) * 1.5) 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: table; /* Fallback for older browsers */
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.hero-text,
.hero-image {
  display: table-cell; /* Fallback for older browsers */
  vertical-align: middle;
  width: 50%; /* Fallback */
  float: left; /* Fallback */
}

/* Clear floats for fallback */
.hero-content:after {
  content: "";
  display: table;
  clear: both;
}

@supports (display: flex) {
  .hero-text,
  .hero-image {
    float: none;
    width: auto;
    display: block;
  }

  .hero-text {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
  }

  .hero-image {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
}

.hero-img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-round);
  box-shadow: var(--shadow-lg);
  border: 5px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: var(--spacing-xs);
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  letter-spacing: 1px;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.9;
}

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

/* ===== ABOUT SECTION ===== */
.about-section {
  background-color: var(--light-color);
}

.credentials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.credential-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.credential-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.credential-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.about-content {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.about-text {
  flex: 1.5;
}

.about-text p:first-child {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
}

.about-image {
  flex: 1;
}

.about-img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.about-image.secondary-image {
  display: flex;
  justify-content: center;
}

.additional-content {
  margin-top: var(--spacing-md);
}

/* ===== SERVICES SECTION ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.service-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-md);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
}

.service-svg {
  width: 30px;
  height: 30px;
  fill: var(--white);
}

.service-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.service-description {
  margin-bottom: var(--spacing-sm);
  flex-grow: 1;
}

.service-features {
  margin-bottom: var(--spacing-sm);
}

.service-features li {
  margin-bottom: var(--spacing-xs);
}

.service-features i {
  color: var(--primary-color);
  margin-right: 8px;
}

/* ===== LOCATIONS SECTION ===== */
.locations-section {
  background-color: var(--light-color);
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-md);
}

.location-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

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

.location-image {
  height: 200px;
  overflow: hidden;
}

.location-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

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

.location-info {
  padding: var(--spacing-md);
}

.location-name {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
}

.location-address {
  font-size: 0.9rem;
  color: var(--dark-color);
  margin-bottom: var(--spacing-sm);
}

.location-address i {
  color: var(--primary-color);
  margin-right: 8px;
}

.location-description {
  margin-bottom: var(--spacing-sm);
}

.location-btn {
  width: 100%;
  text-align: center;
}

/* ===== TRANSFORMATIONS SECTION ===== */
.transformation-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tab-btn {
  padding: 0.6rem 1.5rem;
  background-color: transparent;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-md);
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn:hover,
.tab-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.transformations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.transformation-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

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

.transformation-image {
  height: 300px;
  overflow: hidden;
}

.transformation-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

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

.transformation-info {
  padding: var(--spacing-md);
}

.client-name {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
}

.transformation-duration,
.transformation-result {
  font-size: 0.9rem;
  margin-bottom: var(--spacing-xs);
}

.transformation-duration i,
.transformation-result i {
  color: var(--primary-color);
  margin-right: 8px;
}

.transformation-description {
  font-size: 0.95rem;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials-section {
  background-color: var(--light-color);
  padding: var(--spacing-lg) 0;
}

/* Custom Jayne Tingle Testimonial Styles */
.jt-testimonials {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-md) 0;
}

/* Make slides visible by default - Glide.js handles visibility */
.glide__slide {
  opacity: 1;
}

.jt-testimonial-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 90%;
}

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

.jt-testimonial-quote {
  position: relative;
  padding: 0 var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  flex-grow: 1;
}

.jt-testimonial-quote i.fa-quote-left {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--primary-color);
  opacity: 0.3;
  font-size: 1.5rem;
}

.jt-testimonial-quote i.fa-quote-right {
  position: absolute;
  bottom: 0;
  right: 0;
  color: var(--primary-color);
  opacity: 0.3;
  font-size: 1.5rem;
}

.jt-testimonial-text {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0;
  padding-right: 10px;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  text-align: left;
}

.jt-testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--spacing-sm);
  text-align: center;
}

.jt-author-name {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--dark-color);
}

.jt-author-title {
  font-size: 0.9rem;
  color: var(--primary-color);
  margin-bottom: 0;
}

/* Custom Glide.js Controls */
.glide__arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  left: 0;
  z-index: 10;
}

.glide__arrow {
  position: absolute;
  background-color: var(--white);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--dark-color);
}

.glide__arrow:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: scale(1.1);
}

.glide__arrow--left {
  left: -5px;
}

.glide__arrow--right {
  right: -5px;
}

.glide__bullets {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-md);
  gap: 8px;
}

.glide__bullet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--dark-color);
  opacity: 0.3;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.glide__bullet:hover,
.glide__bullet--active {
  opacity: 1;
  background-color: var(--primary-color);
  transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .jt-testimonial-card {
    padding: var(--spacing-sm);
  }

  .jt-testimonial-text {
    font-size: 0.95rem;
  }

  .glide__arrow {
    width: 36px;
    height: 36px;
  }

  .glide__arrow--left {
    left: 0;
  }

  .glide__arrow--right {
    right: 0;
  }
}

@media (max-width: 576px) {
  .jt-testimonial-card {
    max-width: 95%;
  }

  .jt-testimonial-quote {
    padding: 0 var(--spacing-sm);
  }

  .jt-testimonial-text {
    font-size: 0.9rem;
  }

  .jt-testimonial-quote i.fa-quote-left,
  .jt-testimonial-quote i.fa-quote-right {
    font-size: 1.2rem;
  }

  .glide__arrow {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
}

/* ===== GALLERY SECTION ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  height: 250px;
  position: relative;
}

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

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  z-index: 2001;
}

.lightbox-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-sm);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-nav.prev {
  left: -60px;
}

.lightbox-nav.next {
  right: -60px;
}

.lightbox-nav:hover {
  opacity: 0.8;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  background-color: var(--white);
}

.contact-content {
  display: flex;
  justify-content: center;
}

.contact-info {
  max-width: 600px;
  width: 100%;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.contact-icon {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-right: var(--spacing-sm);
  width: 40px;
  text-align: center;
}

.contact-details {
  flex: 1;
}

.contact-details h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.contact-cta {
  text-align: center;
  margin-top: var(--spacing-md);
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--dark-color);
  color: var(--white);
  padding: var(--spacing-md) 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  margin-bottom: var(--spacing-md);
}

.footer-logo-img {
  width: 80px;
  height: auto;
  margin: 0 auto var(--spacing-sm);
}

.footer-title {
  font-size: 1.8rem;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.footer-subtitle {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 5px;
  opacity: 0.8;
}

.footer-tagline {
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.6;
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: var(--transition-normal);
}

.social-link:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

.footer-bottom {
  width: 100%;
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 5px;
}

.attribution {
  font-size: 0.8rem;
  opacity: 0.5;
}

.attribution a {
  color: var(--accent-color);
}

.attribution a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  :root {
    --spacing-xl: 6rem;
    --spacing-lg: 3rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }
}

@media (max-width: 992px) {
  :root {
    --spacing-xl: 5rem;
    --spacing-lg: 2.5rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-img {
    max-width: 300px;
    margin-bottom: var(--spacing-md);
  }

  .about-content {
    flex-direction: column;
  }

  .about-image {
    margin-top: var(--spacing-sm);
    text-align: center;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .about-img {
    max-width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin: 0 auto;
  }

  .location-card {
    max-width: 450px;
    margin: 0 auto;
  }
}

@media (max-width: 1000px) {
  .header {
    padding: 0.8rem 0;
  }

  .header.compact {
    padding: 0.4rem 0;
  }

  .logo-img {
    height: 40px;
  }

  .header.compact .logo-img {
    height: 35px;
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    transition: var(--transition-normal);
    padding: var(--spacing-lg) var(--spacing-sm);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.active {
    right: 0;
  }

  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    padding: var(--spacing-sm) 0;
    display: block;
    width: 100%;
    /* Ensure adequate touch target size */
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav-link::after {
    display: none;
  }

  .nav-button {
    margin: var(--spacing-sm) 0 0;
    display: block;
    text-align: center;
    /* Ensure adequate touch target size */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-toggle.active .line1 {
    transform: translateY(10px) rotate(45deg);
  }

  .mobile-nav-toggle.active .line2 {
    opacity: 0;
  }

  .mobile-nav-toggle.active .line3 {
    transform: translateY(-10px) rotate(-45deg);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .credentials {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .transformation-tabs {
    flex-direction: column;
    align-items: center;
  }

  .tab-btn {
    width: 100%;
    max-width: 300px;
  }

  .lightbox-nav.prev {
    left: 10px;
  }

  .lightbox-nav.next {
    right: 10px;
  }

  /* Centre Blaize image on mobile */
  .about-image.secondary-image {
    margin: 0 auto;
    max-width: 300px;
  }

  .about-image.secondary-image .about-img {
    width: 100%;
    object-fit: cover;
    object-position: center;
  }

  .footer {
    padding-bottom: calc(
      48px + 1.4rem
    ); /* Adjusted to match height of mobile nav social + its padding */
    margin-bottom: 0;
  }

  .whatsapp-button {
    display: none !important;
  }
}

@media (max-width: 576px) {
  :root {
    --spacing-lg: 2rem;
    --spacing-md: 1.5rem;
  }

  html {
    font-size: 14px;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-section {
    padding-top: calc(80px + var(--spacing-md));
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .btn {
    width: 100%;
  }

  .whatsapp-button {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    /* Safety distance from bottom of screen */
    margin-bottom: env(safe-area-inset-bottom, 0px);
    /* Ensure icon stays centered */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    /* Extra insurance for alignment */
    line-height: 50px;
  }

  .whatsapp-icon {
    font-size: 24px;
    /* Ensure icon stays centered */
    line-height: 1;
    /* Force proper positioning */
    position: relative;
    top: 0;
  }

  .testimonial-content {
    padding: var(--spacing-sm);
  }

  .location-image {
    height: 150px;
  }

  .service-title,
  .location-name,
  .client-name {
    font-size: 1.3rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .gallery-item {
    height: 150px;
  }

  /* Increase tap target size for reduced header */
  .mobile-nav-toggle {
    padding: 12px;
  }
}

/* Skip to content link for accessibility */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s;
}

.skip-to-content:focus {
  left: 0;
  width: auto;
  height: auto;
  outline: 5px solid var(--accent-color);
}

/* Ensure Blaize's image is centered on mobile */
.about-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.about-image.secondary-image {
  display: flex;
  justify-content: center;
}

.about-image.secondary-image img {
  width: 100%;
  max-width: 400px;
  object-fit: contain;
}

@media screen and (max-width: 1000px) {
  .about-image.secondary-image {
    margin: 0 auto;
    max-width: 300px;
  }

  .about-image.secondary-image img {
    max-width: 100%;
  }
}

/* Fix for Safari flickering during animations */
.fade-in,
[data-aos] {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Browser warning for outdated browsers */
.browser-warning {
  background-color: #ffcc00;
  padding: 15px;
  text-align: center;
  font-weight: bold;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.browser-warning a {
  color: #0066cc;
  text-decoration: underline;
}

.browser-warning a:hover {
  text-decoration: none;
}

/* IE and Edge-specific fixes */
.is-ie .section-divider,
.is-edge .section-divider {
  background: #ff6b6b;
}

.is-ie .btn-primary,
.is-edge .btn-primary {
  background: #ff6b6b;
}

.is-ie .service-icon,
.is-edge .service-icon {
  background: #ff6b6b;
}

/* Fix for object-fit in IE/Edge */
.is-ie .hero-img,
.is-ie .about-img,
.is-ie .location-img,
.is-ie .transformation-img,
.is-ie .gallery-img,
.is-edge .hero-img,
.is-edge .about-img,
.is-edge .location-img,
.is-edge .transformation-img,
.is-edge .gallery-img {
  position: relative;
  height: 100%;
  width: 100%;
  font-family: "object-fit: cover;";
}

/* Fix for flexbox in Safari */
.is-old-safari .hero-content,
.is-old-safari .about-content,
.is-old-safari .services-grid,
.is-old-safari .locations-grid,
.is-old-safari .transformations-grid,
.is-old-safari .gallery-grid {
  display: block;
}

.is-old-safari .hero-text,
.is-old-safari .hero-image,
.is-old-safari .about-text,
.is-old-safari .about-image {
  display: inline-block;
  width: 48%;
  vertical-align: top;
  margin: 0 1%;
}

.is-old-safari .service-card,
.is-old-safari .location-card,
.is-old-safari .transformation-card,
.is-old-safari .gallery-item {
  display: inline-block;
  width: 100%;
  max-width: 300px;
  margin: 15px;
  vertical-align: top;
}

/* Disciplines showcase */
.disciplines-showcase {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
  flex-wrap: wrap;
}

.discipline-image {
  -webkit-box-flex: 0;
  -ms-flex: 0 1 calc(50% - var(--spacing-md));
  flex: 0 1 calc(50% - var(--spacing-md));
  max-width: 500px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.discipline-image:hover {
  -webkit-transform: translateY(-5px);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.discipline-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  object-position: center;
  display: block;
  -webkit-transition: transform 0.5s ease;
  transition: transform 0.5s ease;
}

.discipline-image:hover .discipline-img {
  -webkit-transform: scale(1.03);
  transform: scale(1.03);
}

.discipline-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 12px 15px;
  font-weight: 600;
  text-align: center;
  font-size: 1.1rem;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* Responsive styles for disciplines showcase */
@media (max-width: 992px) {
  .discipline-image {
    -ms-flex: 0 1 calc(50% - var(--spacing-sm));
    flex: 0 1 calc(50% - var(--spacing-sm));
  }

  .disciplines-showcase {
    gap: var(--spacing-sm);
  }

  .discipline-img {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .disciplines-showcase {
    flex-direction: column;
    align-items: center;
  }

  .discipline-image {
    -ms-flex: 0 1 100%;
    flex: 0 1 100%;
    width: 100%;
    max-width: 450px;
    margin-bottom: var(--spacing-sm);
  }

  .discipline-img {
    height: 275px;
  }
}

/* Mobile nav social/contact icons */
.mobile-nav-social {
  display: none;
}

@media (max-width: 1000px) {
  .mobile-nav-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.97);
    padding: 0.7rem 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.07);
    border-top: 1px solid #eee;
    height: 48px; /* Explicit height to ensure footer padding matches */
  }
  .mobile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.5rem;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  .mobile-social-link:hover,
  .mobile-social-link:focus {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-2px) scale(1.08);
    text-decoration: none;
  }
}

@media (min-width: 1001px) {
  .mobile-nav-social {
    display: none !important;
  }
}

/* Fix footer position for desktop screens */
@media (min-width: 1001px) {
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  main {
    flex: 1 0 auto;
  }

  .footer {
    flex-shrink: 0;
  }
}

/* AOS Animation Enhancements */
[data-aos] {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  perspective: 1000;
  -webkit-perspective: 1000;
  -moz-perspective: 1000;
  -ms-perspective: 1000;
}

/* Add some custom animations beyond the standard AOS ones */
.img-reveal {
  position: relative;
  overflow: hidden;
}

.img-reveal::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  transform: translateX(-100%);
  animation: img-reveal 1.5s cubic-bezier(0.65, 0.05, 0.36, 1) forwards;
}

@keyframes img-reveal {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Subtle animation for elements to make them feel alive */
.hero-title,
.hero-subtitle,
.section-title,
.footer-title {
  animation: textFadeIn 1s ease-out forwards;
}

@keyframes textFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced button animations */
.btn:hover {
  animation: none !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md) !important;
}

/* Fix Firefox flexbox issues */
@-moz-document url-prefix() {
  .hero-content,
  .about-content,
  .services-grid,
  .locations-grid,
  .transformations-grid {
    width: 100%;
    display: -moz-box;
    display: flex;
  }

  .hero-text,
  .hero-image,
  .about-text,
  .about-image {
    -moz-box-flex: 1;
    flex: 1;
  }
}

/* IE11 fixes */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  /* Use standard colors instead of variables for IE */
  .btn-primary,
  .service-icon,
  .tab-btn.active,
  .section-divider {
    background: #ff6b6b !important;
  }

  .btn-primary:hover,
  .btn-outline:hover {
    background: #6c5ce7 !important;
  }

  /* Fix flexbox */
  .about-content,
  .hero-content {
    display: -ms-flexbox;
    display: flex;
  }

  .about-text,
  .hero-text,
  .about-image,
  .hero-image {
    -ms-flex: 1 1 50%;
    flex: 1 1 50%;
  }

  /* Fix grid layouts */
  .services-grid,
  .locations-grid,
  .transformations-grid,
  .gallery-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  .service-card,
  .location-card,
  .transformation-card,
  .gallery-item {
    -ms-flex: 0 0 calc(33.333% - 2rem);
    flex: 0 0 calc(33.333% - 2rem);
    margin: 1rem;
  }
}

/* Fix z-index stacking issues */
.header {
  z-index: 1000;
}

.mobile-nav-overlay {
  z-index: 999;
}

.main-nav {
  z-index: 1001;
}

.mobile-nav-social {
  z-index: 1100;
}

.whatsapp-button {
  z-index: 100;
}

/* Fix for Safari image loading */
.hero-img,
.about-img,
.location-img,
.transformation-img,
.gallery-img,
.logo-img {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Correct path references for deployment */

/* Fix Edge animation issues */
@supports (-ms-ime-align: auto) {
  .fade-in,
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
.video-container-16-9 {
  aspect-ratio: 16 / 9;
  width: 100%; /* Ensure it takes the full width available */
  height: auto; /* Allow height to adjust based on aspect ratio */
}

@media (max-width: 768px) {
  .testimonial-content {
    padding: var(--spacing-sm);
  }
  .testimonial-text {
    font-size: 0.95rem;
    max-height: 200px;
  }
  .testimonial-quote i.fa-quote-left,
  .testimonial-quote i.fa-quote-right {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .testimonial-text {
    font-size: 0.9rem;
    padding-right: 5px;
  }
}
