/*!
Theme Name: Dich Sub
Theme URI: http://underscores.me/
Author: GuxPlus
Author URI: https://guxplus.com/
Description: Gux team
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: dich_sub
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

Dich Sub is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Generic
	- Normalize
	- Box sizing
# Base
	- Typography
	- Elements
	- Links
	- Forms
## Layouts
# Components
	- Navigation
	- Posts and pages
	- Comments
	- Widgets
	- Media
	- Captions
	- Galleries
# plugins
	- Jetpack infinite scroll
# Utilities
	- Accessibility
	- Alignments

--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

.smooth-scroll { scroll-behavior: smooth; }
.parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
.animate-slide-up {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease-out;
}
.animate-slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.hover-scale:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}
.gradient-text {
  background: linear-gradient(90deg, #3b82f6, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.feature-image {
  max-height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
}
.action-button {
  width: 200px; /* Độ rộng thống nhất cho các button chức năng */
  display: inline-block;
  text-align: center;
}

/* Animation cho pricing cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.swiper-slide {
  animation: fadeInUp 0.6s ease-out forwards;
  flex: 0 0 calc(100% - 1rem);
}

.swiper-slide:nth-child(1) { animation-delay: 0.1s; }
.swiper-slide:nth-child(2) { animation-delay: 0.2s; }
.swiper-slide:nth-child(3) { animation-delay: 0.3s; }
.swiper-slide:nth-child(4) { animation-delay: 0.4s; }
.swiper-slide:nth-child(5) { animation-delay: 0.5s; }
.swiper-slide:nth-child(6) { animation-delay: 0.6s; }

/* Smooth transition for icon hover */
.swiper-slide img {
  transition: transform 0.3s ease-in-out;
}

.swiper-slide:hover img {
  transform: scale(1.1) rotate(5deg);
}

/* Flexible layout cho pricing cards - responsive width */
@media (min-width: 768px) {
  .swiper-slide {
    flex: 0 0 calc(50% - 1rem);
  }

  /* Khi chỉ có 2 items - cho width lớn hơn để fill */
  .swiper-slide:only-of-type ~ .swiper-slide:not(:last-child),
  .swiper-slide:first-of-type:last-of-type,
  .swiper-slide:nth-of-type(2):last-of-type {
    flex: 0 0 calc(48% - 1rem);
    max-width: 48% !important;
  }

  /* Khi có đúng 2 items */
  .swiper-slide:only-of-type {
    flex: 0 0 calc(48% - 1rem);
    max-width: 48% !important;
  }
}

@media (min-width: 1024px) {
  .swiper-slide {
    flex: 0 0 calc(33.333% - 1.066rem);
  }

  /* Khi có 2 items trên màn hình lớn */
  .swiper-slide:nth-child(2):last-child,
  .swiper-slide:nth-child(1):nth-last-child(2) {
    flex: 0 0 calc(48% - 1rem) !important;
    max-width: 48% !important;
  }
}

@media (min-width: 1280px) {
  .swiper-slide {
    flex: 0 0 calc(25% - 1.5rem);
  }

  /* Khi có 2 items trên XL screen */
  .swiper-slide:nth-child(2):last-child,
  .swiper-slide:nth-child(1):nth-last-child(2) {
    flex: 0 0 calc(48% - 1rem) !important;
    max-width: 48% !important;
  }
}
