/* services.css - (re-using your last optimized version as a base) */
@import url("style.css");

/* CSS Custom Properties for easier maintenance */
:root {
  --container-max-width: 1100px;
  --spacing-unit: 1rem;
  --padding-small: calc(var(--spacing-unit) * 1.5); /* 1.5rem */
  --padding-medium: calc(var(--spacing-unit) * 2); /* 2rem */
  --padding-large: calc(var(--spacing-unit) * 3); /* 3rem */
  --padding-hero: calc(var(--spacing-unit) * 4); /* 4rem */
  --margin-bottom-medium: calc(var(--spacing-unit) * 2); /* 2rem */
  --margin-bottom-large: calc(var(--spacing-unit) * 3); /* 3rem */
  --border-radius-small: 8px;
  --border-radius-medium: 12px;
  --grid-gap-medium: calc(var(--spacing-unit) * 1.5); /* 1.5rem */
}

/* Global Layout & Spacing */
.services-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--padding-medium) var(--spacing-unit);
}

.hero-intro {
  padding: var(--padding-hero) var(--spacing-unit);
  text-align: center;
}

/* Section Headings */
.services-container h2 {
  text-align: center;
  margin-bottom: var(--margin-bottom-medium);
}

/* Service Card Styling & Layout */
.service-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap-medium);
  align-items: center;
  margin-bottom: var(--margin-bottom-large);
  /*background: var(--card-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: var(--border-radius-medium);
  padding: var(--padding-small);*/
}

/* Image and Video Frames within Service Cards */
.service-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-small);
  object-fit: cover;
}

.service-image.video iframe {
  width: 100%;
  height: 100%;
  min-height: 250px;
  border-radius: var(--border-radius-medium);
  border: none;
}

/* Service Card Content Details */
.service-content h3 {
  margin-top: 0;
  font-size: 1.4rem;
}

.service-content ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
}

/* Navigation - Mobile Toggle Button */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: inherit;
  font-size: 1.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Navigation - Logo Link */
.nav-logo a {
  text-decoration: none;
  color: inherit;
}

/* Call to Action (CTA) Section */
.cta {
  text-align: center;
  padding: var(--padding-large) var(--spacing-unit);
  margin-top: var(--padding-medium);
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.cta .button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius-small);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  text-decoration: none;
  transition: transform 0.2s ease;
}

.cta .button:hover {
  transform: translateY(-2px);
}

/* Desktop-specific ordering for service cards with 'service-card--reversed' class */
.service-card--reversed .service-image {
  order: 2; /* Image on right for specifically marked cards on desktop */
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .service-card {
    /* Switch to Flexbox for absolute control over stacking */
    display: flex !important;
    flex-direction: column !important; 
    gap: 1rem;
    padding: 1.2rem;
    text-align: left;
    /* Reset any grid-specific properties that might interfere */
    grid-template-columns: 1fr !important;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    margin-bottom: 30px; /* Space between the cards */
  }

  /* 1. THE IMAGE/VIDEO CONTAINER: Force to the top */
  .service-card .service-image,
  .service-card--reversed .service-image {
    order: 1 !important; 
    width: 100% !important;
    display: block !important;
  }

  /* 2. THE TEXT CONTENT: Force below the image */
  .service-card .service-content,
  .service-card--reversed .service-content {
    order: 2 !important;
    width: 100% !important;
    padding: 0;
  }

  /* 3. VIDEO SPECIFICS: Force visibility and shape */
  .service-image.video {
    position: relative !important;
    height: 210px !important; /* Fixed height works best when aspect-ratio fails */
    background: #000; 
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
  }

  .service-image.video iframe {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
  }

  /* 4. LIST STYLING: Prevent text from squishing */
  .service-content ul {
    padding-left: 1.2rem;
    margin-top: 10px;
  }
  
  .service-content li {
    margin-bottom: 8px;
    font-size: 0.95rem;
  }

  .service-content h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    margin-top: 5px;
  }
}