/* ================================================
   TOMASO HOMEPAGE STYLES
   Matches tomasomarketing.net design
   ================================================ */

/* Base */
.tomaso-homepage {
  direction: rtl;
  font-family: var(--font-primary, 'Assistant', sans-serif);
  overflow: hidden;
  position: relative;
}

/* Animations */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-25%); }
}
@keyframes clients-scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}
@keyframes clients-scroll-right {
  0% { transform: translateX(-33.333%); }
  100% { transform: translateX(0); }
}

/* Sections */
.tomaso-section {
  position: relative;
  padding: 128px 0;
}

.tomaso-section-dark {
  background: #060620;
}

.tomaso-border-top {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Container */
.tomaso-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Headings */
.tomaso-heading {
  font-family: var(--font-display, 'Bebas Neue', cursive);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

/* Section Header */
.tomaso-section-header {
  text-align: center;
  margin-bottom: 80px;
}

.tomaso-section-subheading {
  font-size: 1.25rem;
  color: #9ca3af;
  max-width: 600px;
  margin: 0 auto;
}

/* Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary, #38C4DA), #38C4DA 30%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.tomaso-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 12px;
  font-family: var(--font-primary, 'Assistant', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.tomaso-btn-primary {
  background: var(--color-primary, #38C4DA);
  color: #000 !important;
}

.tomaso-btn-primary:hover {
  background: #2bb3c8;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(56, 196, 218, 0.3);
  color: #000 !important;
}

.tomaso-btn-outline {
  background: transparent;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tomaso-btn-outline:hover {
  border-color: var(--color-primary, #38C4DA);
  color: var(--color-primary, #38C4DA) !important;
  box-shadow: 0 0 30px rgba(56, 196, 218, 0.1);
}

.tomaso-btn-whatsapp {
  background: #25D366;
  color: #fff !important;
}

.tomaso-btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
  color: #fff !important;
}

.tomaso-btn-whatsapp svg {
  width: 20px;
  height: 20px;
}

/* Cards */
.tomaso-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s ease;
}

.tomaso-card:hover {
  border-color: rgba(56, 196, 218, 0.3);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tomaso-card:hover h3 {
  color: var(--color-primary, #38C4DA) !important;
}

/* Play Button */
.tomaso-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.tomaso-play-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  margin-left: 3px;
  transition: fill 0.3s;
}

/* Grayscale images */
.tomaso-img-grayscale {
  filter: grayscale(100%);
  transition: all 0.5s ease !important;
}

/* Video hover effects */
.tomaso-homepage [data-video-id]:hover .tomaso-img-grayscale {
  filter: grayscale(0%) !important;
  transform: scale(1.05);
}

.tomaso-homepage [data-video-id]:hover .tomaso-play-btn {
  background: var(--color-primary, #38C4DA);
  border-color: var(--color-primary, #38C4DA);
  box-shadow: 0 0 30px rgba(56, 196, 218, 0.6);
}

.tomaso-homepage [data-video-id]:hover .tomaso-play-btn svg {
  fill: #000;
}

/* Testimonial cards */
.tomaso-testimonial-card:hover {
  border-color: rgba(56, 196, 218, 0.5) !important;
}

.tomaso-testimonial-card:hover img {
  transform: scale(1.1);
}

/* Testimonials grid */
.tomaso-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Services grid */
.tomaso-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* Videos grid */
.tomaso-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Team grid */
.tomaso-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-bottom: 48px;
}

/* Team hover effects */
.tomaso-team-member:hover img {
  filter: grayscale(0%) !important;
  transform: scale(1.1);
}

.tomaso-team-member:hover h3 {
  color: var(--color-primary, #38C4DA) !important;
}

.tomaso-team-member:hover .tomaso-team-glow {
  opacity: 0.4 !important;
}

/* ================================================
   CLIENTS CAROUSEL
   ================================================ */
.tomaso-client-logo-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  width: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px;
  transition: all 0.3s ease;
}

.tomaso-client-logo-box:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(56, 196, 218, 0.4);
  transform: scale(1.05);
}

.tomaso-client-logo-box img {
  max-height: 70px;
  max-width: 170px;
  object-fit: contain;
  opacity: 0.95;
  filter: brightness(1.2);
  transition: all 0.3s;
}

.tomaso-client-logo-box:hover img {
  opacity: 1;
  filter: brightness(1.4);
}

/* Pause carousel on hover */
.tomaso-clients-track:hover {
  animation-play-state: paused !important;
}

/* Video Modal */
.tomaso-video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
}

.tomaso-video-modal.active {
  display: flex;
}

.tomaso-video-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  aspect-ratio: 16/9;
}

.tomaso-video-modal-content.vertical {
  max-width: 400px;
  aspect-ratio: 9/16;
}

.tomaso-video-modal-content iframe {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: none;
}

.tomaso-video-modal-close {
  position: absolute;
  top: -48px;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.tomaso-video-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-primary, #38C4DA);
  color: var(--color-primary, #38C4DA);
}

/* Scroll Animations */
.tomaso-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.tomaso-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.tomaso-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.tomaso-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.tomaso-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.tomaso-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.tomaso-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.tomaso-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.tomaso-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

.tomaso-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (min-width: 768px) {
  .tomaso-testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .tomaso-testimonials-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 768px) {
  .tomaso-section {
    padding: 48px 0;
  }

  .tomaso-section-header {
    margin-bottom: 32px;
  }

  .tomaso-heading {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    margin-bottom: 10px;
  }

  .tomaso-container {
    padding: 0 16px;
  }

  .tomaso-hero-content h1 {
    font-size: 2.8rem !important;
  }

  .tomaso-hero-content p {
    font-size: 0.95rem !important;
    margin-bottom: 24px !important;
  }

  /* Services: center text on mobile */
  .tomaso-services-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .tomaso-card .tomaso-card-body {
    text-align: center !important;
    padding: 24px 20px !important;
  }

  .tomaso-card .tomaso-card-body > div:first-child {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .tomaso-videos-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .tomaso-team-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .tomaso-video-modal-content {
    width: 95%;
    max-width: none;
  }

  .tomaso-video-modal-content.vertical {
    max-width: 90%;
  }

  .tomaso-marquee-track {
    animation-duration: 20s !important;
  }

  /* Reduce hero min-height on mobile */
  .tomaso-hero {
    min-height: 85vh !important;
  }

  /* Reduce section subheading */
  .tomaso-section-subheading {
    font-size: 1rem;
  }

  /* Testimonials grid mobile */
  .tomaso-testimonials-grid {
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .tomaso-btn {
    padding: 14px 24px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  .tomaso-hero-content h1 {
    font-size: 2.3rem !important;
  }

  .tomaso-section {
    padding: 40px 0;
  }
}

/* ================================================
   HIDE WORDPRESS DEFAULT ELEMENTS ON HOMEPAGE
   ================================================ */
.page-template-template-home .entry-header,
.page-template-template-home .entry-title,
.page-template-template-home .ast-single-post {
  max-width: 100% !important;
  padding: 0 !important;
}

.page-template-template-home .site-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.page-template-template-home .ast-container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.page-template-template-home .site-main > article {
  margin: 0 !important;
  padding: 0 !important;
}

.page-template-template-home .entry-content {
  margin: 0 !important;
}

/* Hide old Elementor page content on homepage */
.page-template-template-home .entry-content > .elementor,
.page-template-template-home .entry-content > [data-elementor-type="wp-page"] {
  display: none !important;
}

/* Hide the pink promotional strip in the header */
.elementor-element-7369f84 {
  display: none !important;
}

/* Hide the old contact form section in the footer */
.elementor-element-2347a2b0 {
  display: none !important;
}
