/* Custom CSS for Clidash Landing Page */

/* Custom override to make the site narrower (approx 75% width) */
.main-container {
  max-width: 1110px !important;
}

/* Specific narrower constraint for Hero section on PC */
@media screen and (min-width: 992px) {
  .main-div {
    max-width: 1400px !important; /* Narrower than the 1110px global container */
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Also constrain the large container used in footer */
.container-large {
  max-width: 79rem !important; /* approx 75% of 105rem */
}

/* Center the last item (Integrations) in the 3-column grid */
@media screen and (min-width: 992px) {
  .cards-grids .reviews-block:last-child {
      grid-column: 2 / 3;
  }
}

/* Overrides for Calendly embedding responsiveness */
.meeting-wrapper {
  height: auto !important;
  min-height: 750px; /* Ensure space is tailored to widget */
}

/* Remove circular border radius from contact container to prevent clipping */
.contact-div {
  border-radius: 16px !important; /* Soft rounded corners instead of circle */
  overflow: hidden;
}

/* On mobile, adjust min-height if needed */
@media screen and (max-width: 479px) {
  .meeting-wrapper {
    min-height: 850px;
  }
}

/* Footer Links: Vertical Stack & Larger Text */
.footer-menu-wrapper {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start; /* Or center depending on design preference, assuming left align based on context */
}

.footer-link {
  font-size: 18px !important; /* Increase size */
  line-height: 1.4;
  padding: 5px 0; /* Add touch target area */
}

/* Review Blocks: Tilt Animation */
.reviews-block {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  perspective: 1000px; /* Adds depth */
}

.reviews-block:hover {
  transform: rotate(-2deg) scale(1.02);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* Optional: adds pop */
  z-index: 10;
}

/* New Review Blocks (Book a demo / Get onboard): Scale Up Animation */
.reviews-new {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 16px; /* Match style of other blocks */
  /* Ensure content respects the border radius */
  overflow: hidden; 
}

.reviews-new:hover {
  transform: scale(1.05); /* Proper scale up */
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 10;
  cursor: pointer;
}


/* Center footer links in their column */
@media screen and (min-width: 480px) {
  .footer-menu-wrapper {
      align-items: flex-start !important; /* Left align the text/links */
      justify-self: center !important;    /* Center the whole block in the grid column */
      width: fit-content !important;      /* Shrink width to content so centering works */
  }
}

/* Pricing Card animation (same as reviews block) */
.pricing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  perspective: 1000px;
}

.pricing-card:hover {
  transform: rotate(-2deg) scale(1.02);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  z-index: 10;
}

/* Increase spacing outside pricing card on mobile */
@media screen and (max-width: 479px) {
  .pricing-card {
      margin-left: 20px !important;
      margin-right: 20px !important;
      width: auto !important;
  }

  .reviews-block {
      margin-left: 20px !important;
      margin-right: 20px !important;
      width: auto !important;
  }
}

/* YouTube Embed improvements */
.w-video.w-embed iframe {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Hero Image Hover Animation */
.hero-image {
  transition: transform 0.4s ease-out, box-shadow 0.4s ease-out, filter 0.4s ease;
}

.hero-image:hover {
  /* Using !important to override inline styles from existing interactions if present */
  transform: translateY(-8px) scale(1.02) !important;
  filter: brightness(1.05); /* Slight brightness boost */
  z-index: 5;
}

/* User Request: Make main-div wider and add cursor gradient */

/* Widen the container for the hero section */
#home-section .main-container {
    max-width: 98% !important; /* Close to full width */
    width: 98% !important;
    padding-left: 10px; /* minimal padding */
    padding-right: 10px;
}

/* Ensure the cursor tracking works */
#home-section .main-div {
    position: relative;
    overflow: hidden; /* To contain the gradient */
}

/* Gradient effect using pseudo-element */
#home-section .main-div::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px; /* Match main-div border radius */
    background: radial-gradient(600px circle at var(--x, 50%) var(--y, 50%), rgba(39, 0, 187, 0.15), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Let clicks pass through */
    z-index: 1; /* Above background, below content */
}

#home-section .main-div:hover::after {
    opacity: 1;
}

/* Ensure content is above the gradient */
#home-section .main-div > * {
    position: relative;
    z-index: 2;
}

/* Rotating shadow gradient for Video */
@property --video-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* Ensure wrapper stacking context */
.w-video.w-embed {
  position: relative;
  z-index: 1; 
  overflow: visible !important; /* Allow the shadow gradient to spill out */
  box-shadow: none !important; /* Remove existing static shadow */
}

/* The rotating gradient */
.w-video.w-embed::before {
  content: "";
  position: absolute;
  inset: -12px; /* Extend further for better visibility */
  z-index: -1;
  background: conic-gradient(
    from var(--video-angle),
    var(--blue),
    var(--shiny-cta-highlight),
    #8f00ff,
    var(--shiny-cta-highlight),
    var(--blue)
  );
  border-radius: 20px;
  filter: blur(20px);
  opacity: 0.8; /* Increased opacity */
  animation: video-rotate 2s linear infinite; /* Slower rotation */
}

@keyframes video-rotate {
  0% { --video-angle: 0deg; }
  100% { --video-angle: 360deg; }
}


/* --- Cards Grid Entrance Animations --- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px) rotate(-2deg); /* slight rotation to match the hover effect tilt for fun, or just plain up */
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

.cards-grids .reviews-block {
  opacity: 0; /* Ideally this should be handled by JS to avoid accessibility/SEO issues if JS fails, but for this request: */
  /* REMOVED: animation-fill-mode: forwards; */
  /* Removing fill-mode forwards allows the element to revert to its class rules after animation.
     We will set opacity: 1 on the .animate-in class so it stays visible, 
     but the transform will revert to 'none' allowing the hover effect to take over again. */
}

/* Fallback: If no JS, we might want them visible. 
   Usually we'd add a class 'js-loading' to body. 
   For now, we assume JS works or we rely on the class addition.
   To be safe, let's make opacity 0 ONLY if we plan to add formatting via JS.
   Actually, let's keep it simple. Opacity 0 here implies they are invisible until animated.
*/

.cards-grids .reviews-block.animate-in {
  opacity: 1; /* Keep visible after animation */
  animation-name: fadeInUp;
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Stagger Delays */
.cards-grids .reviews-block:nth-child(1) { animation-delay: 0.1s; }
.cards-grids .reviews-block:nth-child(2) { animation-delay: 0.2s; }
.cards-grids .reviews-block:nth-child(3) { animation-delay: 0.3s; }
.cards-grids .reviews-block:nth-child(4) { animation-delay: 0.4s; }
.cards-grids .reviews-block:nth-child(5) { animation-delay: 0.5s; }
.cards-grids .reviews-block:nth-child(6) { animation-delay: 0.6s; }
.cards-grids .reviews-block:nth-child(7) { animation-delay: 0.7s; }

/* --- Book a Demo Button Customizations --- */

/* 1. Sliding Arrow on Hover */
.button.is-navbar .icon {
  transition: transform 0.3s ease;
}

.button.is-navbar:hover .icon {
  transform: translateX(4px);
}

/* 2. Shiny CTA Integration for Book a Demo */
/* See shiny-cta.css for @property definitions and keyframes */

/* Shared Styles for both buttons */
.button.is-navbar,
.button.is-border {
    border-radius: 999px !important; /* Increase corner radius */
}

.button.is-navbar {
    /* Theme Colors - Matching Clidash Blue */
    --shiny-cta-bg: #2700bb; 
    --shiny-cta-bg-subtle: #1a0080;
    --shiny-cta-fg: #ffffff;
    --shiny-cta-highlight: #5b33ff;
    --shiny-cta-highlight-subtle: #84b4ff;

    /* Increase width and ensure inline alignment */
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
    white-space: nowrap;
    gap: 0.75rem; /* Ensure consistent spacing */
    
    /* Restore Flexbox behavior overridden by shiny-cta.css */
    display: flex !important;
    align-items: center;
    justify-content: center;

    --animation: gradient-angle linear infinite;
    --duration: 3s;
    --shadow-size: 0px;
    
    isolation: isolate;
    position: relative;
    overflow: hidden;
    
    /* Apply Shiny Gradient Background */
    background: linear-gradient(var(--shiny-cta-bg), var(--shiny-cta-bg)) padding-box,
                conic-gradient(
                    from calc(var(--gradient-angle) - var(--gradient-angle-offset)),
                    transparent,
                    var(--shiny-cta-highlight) var(--gradient-percent),
                    var(--gradient-shine) calc(var(--gradient-percent) * 2),
                    var(--shiny-cta-highlight) calc(var(--gradient-percent) * 3),
                    transparent calc(var(--gradient-percent) * 4)
                ) border-box;
    
    border: 1px solid transparent; 
    
    /* Animation Transition */
    --transition: 800ms cubic-bezier(0.25, 1, 0.5, 1);
    transition: var(--transition);
    transition-property: --gradient-angle-offset, --gradient-percent, --gradient-shine, background-color, border-color, color, transform; 
}

/* Pseudo Pattern - Dots */
.button.is-navbar::before {
    content: "";
    pointer-events: none;
    position: absolute;
    inset-inline-start: 50%;
    inset-block-start: 50%;
    translate: -50% -50%;
    z-index: -1;
    
    --size: calc(100% - var(--shadow-size) * 3);
    --position: 2px;
    --space: calc(var(--position) * 2);
    width: var(--size);
    height: var(--size);
    background: radial-gradient(
        circle at var(--position) var(--position),
        white calc(var(--position) / 4),
        transparent 0
    ) padding-box;
    background-size: var(--space) var(--space);
    background-repeat: space;
    mask-image: conic-gradient(
        from calc(var(--gradient-angle) + 45deg),
        black,
        transparent 10% 90%,
        black
    );
    border-radius: inherit;
    opacity: 0.4;
}

/* Inner Shimmer */
.button.is-navbar::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset-inline-start: 50%;
    inset-block-start: 50%;
    translate: -50% -50%;
    z-index: -1;

    --animation: shimmer linear infinite;
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(
        -50deg,
        transparent,
        var(--shiny-cta-highlight),
        transparent
    );
    mask-image: radial-gradient(circle at bottom, transparent 40%, black);
    opacity: 0.6;
}

/* Ensure Text and Icon sit on top */
.button.is-navbar > * {
    z-index: 2;
    position: relative;
}

/* Bind Animations */
.button.is-navbar,
.button.is-navbar::before,
.button.is-navbar::after {
    animation: var(--animation) var(--duration),
               var(--animation) calc(var(--duration) / 0.4) reverse paused;
    animation-composition: add;
}

/* Hover State */
.button.is-navbar:is(:hover, :focus-visible) {
    --gradient-percent: 20%;
    --gradient-angle-offset: 95deg;
    --gradient-shine: var(--shiny-cta-highlight-subtle);
}

.button.is-navbar:is(:hover, :focus-visible),
.button.is-navbar:is(:hover, :focus-visible)::before,
.button.is-navbar:is(:hover, :focus-visible)::after {
    animation-play-state: running;
}

/* 3. Shimmer Effect for Explore Features (.button.is-border) */
.button.is-border {
    position: relative;
    overflow: hidden;
    /* Ensure border persists or is handled, usually transparent bg */
}

/* Keep bordered button content above shimmer overlay */
.button.is-border > * {
    position: relative;
    z-index: 11;
}

/* Keep nav Login text visible on light bordered button */
.login-button-text {
    color: var(--blue) !important;
}

.button.is-border::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        120deg, 
        transparent 20%, 
        rgba(255, 255, 255, 0.4) 40%, 
        rgba(255, 255, 255, 0.8) 50%, 
        rgba(255, 255, 255, 0.4) 60%, 
        transparent 80%
    );
    transform: translateX(-100%); /* Start off-screen left */
    pointer-events: none; /* Let clicks pass through */
    transition: transform 5s ease;
    z-index: 10;
}

.button.is-border:hover::after {
    transform: translateX(100%); /* Slide to right */
    transition: transform 0.6s ease;
}

/* FAQ Accordion Hover Animation */
.combine-faq2_accordion {
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.combine-faq2_accordion:hover {
    background-color: #f8f8f8; /* Subtle light grey */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

/* --- Getting Started Steps Optimization --- */

/* Bring steps closer together and center align */
.cards-grids-new {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 40px; /* Reduced specific gap, adjustable */
}

/* Reduce width of middle arrow container */
.image-content {
    width: 10vw !important;
    padding: 0 !important;
    flex: 0 0 auto;
}

/* Make steps responsive but constrained */
.reviews-new {
    flex: 0 1 400px; /* Grow to 400px, shrink if needed */
    width: 100%;
}

/* Mobile Responsiveness */
@media screen and (max-width: 991px) {
    .cards-grids-new {
        flex-direction: column;
        gap: 30px;
    }
    
    .image-content {
        margin: 10px 0;
        width: auto !important;
    }

    /* Rotate and show the specific arrow image requested */
    .image.mobile-close {
        display: block !important;
        transform: rotate(90deg);
        margin: 0 auto;
        width: 120px; /* Increased size for mobile visibility */
        max-width: 200px;
    }

    /* Hide the default mobile arrow to prevent duplicates/confusion */
    .image.mobile-open {
        display: none !important;
    }
    
    .reviews-new {
        flex: auto;
        max-width: 100%;
    }
}




/* Footer 3-Column Layout Overrides */
.footer-top-wrapper {
    grid-template-columns: 1fr 1fr 1fr !important;
    column-gap: 40px !important;
}

@media screen and (max-width: 991px) {
    .footer-top-wrapper {
         grid-template-columns: 1fr !important;
         row-gap: 40px !important;
    }
}

.footer-contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px; /* Match spacing */
}

/* Override previous centering for menu wrapper to align with other columns */
.footer-menu-wrapper {
    justify-self: start !important;
    width: 100% !important; /* Ensure it takes full width of column to align contents */
}

/* Make all heading-2 weight 700 */
h2.heading-h2 {
  font-weight: 700 !important;
}

/* Increase padding for "Connects easily..." text on mobile */
@media screen and (max-width: 479px) {
  .logos-wrapper .paragraph-medium {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Typing effect cursor */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  display: inline-block;
  margin-left: 4px;
  opacity: 1;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Mobile nav support (base only). Visual modal styling lives in index.html inline CSS. */
@media screen and (max-width: 991px) {
  #home-section .main-div {
    overflow: visible !important;
  }

  #home-section .main-div::after {
    display: none;
  }

  .navbar-component {
    position: relative;
    z-index: 1200;
  }

  .navbar-menu-button {
    position: relative;
    z-index: 3101;
  }
}
