/**
 * Theme Name: Extendable Child
 * Template:   extendable
 */

/* Prevent horizontal scrolling from alignfull blocks and animations */
html, body {
    max-width: 100% !important;
    overflow-x: clip !important;
}

/* Base styling for both columns */
.slc-booking-border, 
.gv-booking-border {
    display: flex !important;
    flex-direction: column;
    box-sizing: border-box !important;
    border-radius: 12px;
    padding: 20px 20px 20px 20px !important; /* Top, Right, Bottom, Left */
    margin-bottom: 10px;
    height: auto !important; /* Allows it to grow with the widget */
    overflow: visible !important;
}

/* Specific Border Colors */
.slc-booking-border {
    border: 4px solid #E71D36 !important;
}

.gv-booking-border {
    border: 4px solid #C5FF15 !important;
}

/* Force the Square Iframe to respect the container */
.slc-booking-border iframe, 
.gv-booking-border iframe {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0 !important; /* We use the parent's padding instead */
}

/* Target the figure wrapper with your custom class, then the table inside */
figure.fsr-style-stripes table tbody tr:nth-child(odd) {
    background-color: #444444 !important;
}

/* Ensure the cell background doesn't override the row background */
figure.fsr-style-stripes table tbody tr:nth-child(odd) td {
    background-color: transparent !important;
    border: none !important;
}

/* Hide on mobile */
.desktop-only {
    display: none !important;
}

/* Show only on desktop and tablets */
@media (min-width: 768px) {
    .desktop-only {
        display: block !important; 
    }
}

/* Hide on desktop and tablets */
.mobile-only {
    display: none;
}

/* Show only on screens smaller than 768px */
@media (max-width: 767px) {
    .mobile-only {
        display: block;
    }
}

/* 1. Set the Group wrapper as the anchor */
.video-button-wrapper {
  position: relative; 
  display: block;
}

/* 2. Target the WordPress button wrapper inside your custom group */
.video-button-wrapper .wp-block-button {
  position: absolute;
  top: 84%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  
  /* Optional: prevents the button wrapper from taking up full width */
  width: max-content; 
}

/* CSS Styles for Landing Pages */
/* Flatout Sim Racing Brand Colors */
    :root {
      --fsr-red: #E00A1E;
      --fsr-lime: #A2FF00;
      --fsr-dark-grey: #2E2E2E;
      --fsr-platinum: #E5E5E5;
      --fsr-black: #000000;
      --fsr-white: #FFFFFF;
      /* Keep header height and top padding in sync to avoid "extra" black space. */
      --fsr-topbar-height: 60px;
    }
  
    /* Base Reset for the Block */
    .fsr-landing-wrapper {
      font-family: 'Inter', 'Helvetica Neue', sans-serif;
      margin: 0;
      padding: var(--fsr-topbar-height) 0 0 0;
      line-height: 1.6;
      box-sizing: border-box;
      overflow-x: hidden;
      /* Set from page-flatout-custom-sim-rig-building.php via Media Library URLs */
      --fsr-hero-bg-image: none;
      --fsr-cta-checkered-image: none;
      /* Transparent fallback so the benefits silhouette pseudo-element stays invisible
         until `track-silhouette` is set in the template. */
      --fsr-benefits-track-silhouette-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22black%22%20opacity%3D%220%22%2F%3E%3C%2Fsvg%3E");
    }
  
    .fsr-landing-wrapper * {
      box-sizing: border-box;
    }
  
    /* Typography */
    .fsr-landing-wrapper h1, .fsr-landing-wrapper h2, .fsr-landing-wrapper h3 {
      text-transform: uppercase;
      font-weight: 900;
      letter-spacing: -0.02em;
      margin-bottom: 0.5rem;
    }
  
    .fsr-landing-wrapper p {
      font-size: 1.125rem;
      margin-bottom: 1.5rem;
    }
  
    /* Buttons (CTAs) */
    .fsr-btn {
      display: inline-block;
      padding: 1rem 2rem;
      font-size: 1.125rem;
      font-weight: 800;
      text-transform: uppercase;
      text-decoration: none;
      transition: all 0.3s ease;
      cursor: pointer;
      border: none;
    }
  
    .fsr-btn-primary {
      background-color: var(--fsr-lime);
      color: var(--fsr-black);
    }
  
    .fsr-btn-primary:hover {
      background-color: var(--fsr-white);
      color: var(--fsr-black);
      transform: translateY(-2px);
    }
  
    .fsr-btn-secondary {
      background-color: var(--fsr-white);
      color: var(--fsr-red);
    }
  
    .fsr-btn-secondary:hover {
      background-color: var(--fsr-black);
      color: var(--fsr-white);
    }
  
    /* HERO SECTION (Colorway: Black bg, White/Lime text) */
    .fsr-hero {
      position: relative;
      background-color: var(--fsr-black);
      color: var(--fsr-white);
      padding: 8rem 2rem;
      text-align: center;
      background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.9)), var(--fsr-hero-bg-image, none);
      background-size: cover;
      background-position: center;
    }
  
    .fsr-hero h1 {
      font-size: clamp(3.25rem, 6.5vw, 6.5rem);
      color: var(--fsr-white);
      line-height: 1.1;
    }
  
    .fsr-hero h1 span {
      color: var(--fsr-lime);
    }
  
    .fsr-hero p {
      max-width: 800px;
      margin: 1.5rem auto 2.5rem;
      color: var(--fsr-platinum);
      font-size: 1.25rem;
    }
  
    /* VALUE PROPS (Colorway: White bg, Black/Red text) */
    .fsr-benefits {
      background-color: var(--fsr-white);
      color: var(--fsr-black);
      padding: 5rem clamp(1rem, 4vw, 2rem);
      position: relative; /* anchor for track silhouette background */
      overflow: hidden;
    }
  
    /* BENEFITS TRACK SILHOUETTE (covers entire fsr-benefits section) */
    .fsr-benefits::before {
      content: '';
      position: absolute;
      inset: 0;
      z-index: 0;
      pointer-events: none;

      background-color: transparent;
      opacity: 1;

      background-image: var(--fsr-benefits-track-silhouette-image);
      background-repeat: no-repeat;
      background-position: center;
      /* Use 90% x 90% so the silhouette never touches the section edges */
      background-size: 90% 90%;

      filter: invert(0.90) brightness(0.9);
    }

    .fsr-benefits-logos,
    .fsr-benefits-grid {
      position: relative;
      z-index: 1;
    }

    .fsr-benefits-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
      gap: clamp(1.35rem, 2.7vw, 2.15rem);
      max-width: min(1280px, 100%);
      margin: 0 auto;
    }

    .fsr-benefit-card {
      position: relative;
      z-index: 1; /* ensure content renders above the silhouette */
    }
  
    .fsr-benefit-card h3 {
      color: var(--fsr-red);
      font-size: 1.75rem;
      border-bottom: 4px solid var(--fsr-black);
      padding-bottom: 0.5rem;
      display: inline-block;
      letter-spacing: 0.06em;
    }

    .fsr-benefits-logos {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: clamp(1.25rem, 3.5vw, 2.75rem);
      max-width: 1200px;
      margin: 0 auto 3rem;
      padding-bottom: 3rem;
      border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .fsr-benefits-logos img {
      height: clamp(1.35rem, 3.8vw, 2rem);
      width: auto;
      max-width: min(9rem, 32vw);
      object-fit: contain;
      object-position: center;
      filter: grayscale(100%);
      opacity: 0.42;
      transition: opacity 0.3s ease, filter 0.3s ease;
    }

    .fsr-benefits-logos img:hover {
      opacity: 0.72;
      filter: grayscale(85%);
    }
  
    /* SHOWCASE GRID (Colorway: Dark Grey bg, Platinum/Lime text) */
    .fsr-showcase {
      background-color: var(--fsr-dark-grey);
      color: var(--fsr-platinum);
      padding: 5rem 2rem;
    }
  
    .fsr-showcase-header {
      text-align: center;
      margin-bottom: 4rem;
    }
  
    .fsr-showcase-header h2 {
      color: var(--fsr-lime);
      font-size: 3.75rem;
    }
  
    .fsr-gallery {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 1.5rem;
      max-width: 1200px;
      margin: 0 auto;
    }
  
    .fsr-gallery img {
      width: 100%;
      height: 350px;
      object-fit: cover;
      border-radius: 4px;
      transition: transform 0.3s ease;
    }
  
    .fsr-gallery img:hover {
      transform: scale(1.02);
    }
  
    /* MID-FUNNEL CTA BANNER (Colorway: Red bg, White/Black text + checkered overlay) */
    .fsr-cta-banner {
      position: relative;
      background-color: var(--fsr-red);
      color: var(--fsr-white);
      text-align: center;
      padding: 4rem 2rem;
      overflow: hidden;
    }

    .fsr-cta-banner::before {
      content: '';
      position: absolute;
      inset: 0;
      left: 4%;
      background-image: var(--fsr-cta-checkered-image, none);
      background-size: cover;
      opacity: 0.1;
      pointer-events: none;
    }

    .fsr-cta-banner > * {
      position: relative;
      z-index: 1;
    }

    .fsr-cta-banner h2 {
      font-size: 3.75rem;
      color: var(--fsr-white);
    }
  
    /* Responsive Adjustments */
    @media (max-width: 768px) {
      .fsr-hero { padding: 5rem 1rem; }
      .fsr-benefits, .fsr-showcase { padding: 3rem 1rem; }
      .fsr-benefits-logos {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        gap: 1rem 1.5rem;
      }

      /* Mobile: avoid pseudo-element sticky quirks by pinning the background to the viewport. */
      .fsr-benefits {
        background-image: none;
      }

      /* Keep the same silhouette rendering as desktop (same filter/opacity),
         but pin it to the viewport on mobile. */
      .fsr-benefits::before {
        display: block;
        background-attachment: fixed;
        background-position: center top;
      }
    }

    /* Fixed top bar */
    .fsr-topbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: var(--fsr-topbar-height);
      background: #000000;
      margin: 0;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
    }

    .fsr-flatout-logo {
      display: block;
      /* Keep the logo centered vertically, but never exceed 65% of header height. */
      max-height: 55%;
      height: auto;
      width: auto;
    }

	/* 1. The main container needs 'position: relative' to anchor the overlay */
	.services-box {
		position: relative;
		z-index: 1; /* Ensures content stays on top */
		overflow: hidden; /* Keeps the overlay inside the box corners */
	}

	/* 2. The overlay layer */
	.services-box::before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		/* Your requested gradient */
		background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.85));
		z-index: -1; /* Pushes the black tint behind your text but in front of the image */
	}

	.gift-card-box {
		position: relative; /* Your red background */
		z-index: 1;
	}

	.gift-card-box::before {
		content: "";
		position: absolute;
		top: 0;
		left: 10;
		width: 100%;
		height: 100%;
		/* This points to your checkered image */
    	background-image: url('https://driveflatout.com/wp-content/uploads/2024/09/Checkered-Flag-Pattern_Near_Black_Mirror_Medium.png');
    	background-size: cover;
		/* ADJUST OPACITY HERE: 0.1 is very faint, 0.5 is half-strength */
		opacity: 0.05; 

		z-index: -1; 
	}

	.button-arrow .wp-block-button__link::after {
		content: "↗";
		margin-left: 8px;
		font-family: serif; /* Forcing a standard font often prevents emoji conversion */
	}

    /* Apply this class to any <a> tag or container */
	.link-arrow::after {
		content: "↗";
		margin-left: 8px;
		font-family: serif;
		display: inline-block; /* Ensures margin and transform properties work correctly */
		text-decoration: none; /* Prevents the arrow from being underlined if the link is */
	}

	/* Optional: Prevent the arrow from wrapping to a new line alone */
	.link-arrow {
		white-space: nowrap;
	}