/* KKY Theme - Home Page CSS
 * Author: KKY Cloud Team
 * Description: Home page specific styles
 */

/* ==================== Banner ==================== */
.kky-banner {
  width: 100%;
  height: 560px;
  position: relative;
  overflow: hidden;
}

.kky-banner .banner-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.kky-banner .banner-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.kky-banner .banner-slide.active {
  opacity: 1;
  visibility: visible;
}

.kky-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(240,244,255,0.35) 50%, rgba(226,232,255,0.25) 100%);
  pointer-events: none;
  z-index: 0;
}

.kky-banner .banner-inner {
  position: relative;
  width: 1200px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  z-index: 1;
}

.kky-banner .banner-content {
  flex: 1;
  color: #1a1a2e;
  padding-right: 40px;
}

.kky-banner .banner-title {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  color: #0f172a;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.6);
}

.kky-banner .banner-subtitle {
  font-size: 18px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 540px;
}

.kky-banner .banner-actions {
  display: flex;
  gap: 16px;
}

.kky-banner .btn-primary,
.kky-banner .btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 34px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.kky-banner .btn-primary {
  background: #2B5BFF;
  color: #fff;
}

.kky-banner .btn-primary:hover {
  background: #1E47E5;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(43, 91, 255, 0.35);
}

.kky-banner .btn-secondary {
  background: transparent;
  color: #1a1a2e;
  border: 1px solid rgba(15, 23, 42, 0.4);
}

.kky-banner .btn-secondary:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: #0f172a;
}

.kky-banner .banner-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.kky-banner .banner-indicators .dot {
  width: 24px;
  height: 4px;
  background: rgba(15, 23, 42, 0.25);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.kky-banner .banner-indicators .dot.active {
  background: #2B5BFF;
}

/* ==================== Service Highlights ==================== */
.kky-service-section {
  padding: 70px 0;
  background: #fff;
}

.kky-section-title {
  text-align: center;
  margin-bottom: 50px;
}

.kky-section-title h2 {
  font-size: 32px;
  color: #1a1f2e;
  font-weight: 600;
  margin-bottom: 12px;
}

.kky-section-title p {
  font-size: 15px;
  color: #888;
  max-width: 600px;
  margin: 0 auto;
}

.kky-service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.kky-service-card {
  background: #fff;
  border: 1px solid #f0f2f5;
  border-radius: 8px;
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.kky-service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(43, 91, 255, 0.12);
  border-color: rgba(43, 91, 255, 0.2);
}

.kky-service-card .service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e3ebff 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #2B5BFF;
  transition: all 0.3s ease;
}

.kky-service-card:hover .service-icon {
  background: linear-gradient(135deg, #2B5BFF 0%, #1E47E5 100%);
  color: #fff;
  transform: scale(1.05);
}

.kky-service-card h3 {
  font-size: 18px;
  color: #1a1f2e;
  font-weight: 600;
  margin-bottom: 12px;
}

.kky-service-card p {
  font-size: 14px;
  color: #888;
  line-height: 1.7;
  margin-bottom: 20px;
}

.kky-service-card .learn-more {
  font-size: 14px;
  color: #2B5BFF;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: gap 0.2s ease;
}

.kky-service-card .learn-more:hover {
  gap: 6px;
}

.kky-service-card .learn-more::after {
  content: "→";
  margin-left: 4px;
  transition: margin-left 0.2s ease;
}

.kky-service-card:hover .learn-more::after {
  margin-left: 8px;
}

/* ==================== Server List (Tab + Cards) ==================== */
.kky-server-list-section {
  padding: 40px 0 60px;
  background: #f7f8fb;
}

.server-list-inner {
  width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Tab Bar */
.server-tab-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e8eaef;
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.server-tab-bar::-webkit-scrollbar {
  display: none;
}

.server-tab-item {
  flex-shrink: 0;
  position: relative;
  padding: 12px 20px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.server-tab-item a {
  font-size: 15px;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.server-tab-item:hover a {
  color: #2B5BFF;
}

.server-tab-item.active {
  color: #2B5BFF;
}

.server-tab-item.active a {
  color: #2B5BFF;
  font-weight: 600;
}

.server-tab-item.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: #2B5BFF;
  border-radius: 2px 2px 0 0;
}

/* Tab Content */
.server-tab-content {
  position: relative;
}

.server-tab-panel {
  display: none;
}

.server-tab-panel.active {
  display: block;
}

/* Panel Grid: left info + right cards */
.server-panel-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 15px;
  align-items: start;
}

/* Left: Info Panel */
.server-panel-info {
  background: #fff;
  border: 1px solid #f0f2f5;
  border-radius: 8px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
}

.server-panel-info .info-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1f2e;
  line-height: 1.4;
  margin-bottom: 16px;
}

.server-panel-info .info-desc {
  font-size: 14px;
  color: #888;
  line-height: 1.7;
  flex: 1;
}

.server-panel-info .info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background: #2B5BFF;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  width: fit-content;
  margin-top: 16px;
}

.server-panel-info .info-btn:hover {
  background: #1E47E5;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(43, 91, 255, 0.25);
}

/* Right: Product Cards Grid */
.server-panel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.server-product-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  padding: 16px 18px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 260px;
  height: 120px;
  gap: 8px;
}

.server-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border-color: #c8d4e8;
  background: #fff;
  color: #2B5BFF;
}

.server-product-card .card-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.server-product-card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #ff4757;
  color: #fff;
  font-size: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.server-product-card .card-name {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  line-height: 1.3;
}

.server-product-card:hover .card-name {
  color: #2B5BFF;
}

.server-product-card .card-tagline {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  word-break: break-all;
  word-wrap: break-word;
  white-space: normal;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== Features Section ==================== */
.kky-features-section {
  padding: 80px 0;
  background: #f7f8fb;
}

.kky-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.kky-feature-item {
  text-align: center;
  padding: 30px 20px;
  background: #fff;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.kky-feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.kky-feature-item .feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2B5BFF 0%, #1E47E5 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.kky-feature-item .feature-num {
  font-size: 32px;
  font-weight: 700;
  color: #2B5BFF;
  margin-bottom: 6px;
  line-height: 1;
}

.kky-feature-item .feature-label {
  font-size: 14px;
  color: #666;
}

/* ==================== CTA Section ==================== */
.kky-cta-section {
  padding: 70px 0;
  background: linear-gradient(135deg, #1e3a8a 0%, #2B5BFF 100%);
  text-align: center;
  color: #fff;
}

.kky-cta-section h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 14px;
}

.kky-cta-section p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.kky-cta-section .cta-button {
  display: inline-flex;
  align-items: center;
  padding: 14px 40px;
  background: #fff;
  color: #2B5BFF;
  font-size: 15px;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.kky-cta-section .cta-button:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  color: #1E47E5;
}

/* ==================== Responsive ==================== */
@media (max-width: 1440px) {
  .kky-banner .banner-inner,
  .kky-service-grid,
  .kky-features-grid {
    width: 100%;
    padding: 0 60px;
  }
}

@media (max-width: 1240px) {
  .kky-banner .banner-inner,
  .kky-service-grid,
  .kky-features-grid {
    width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 992px) {
  .kky-banner {
    height: auto;
    min-height: 420px;
    padding: 70px 0;
  }
  .kky-banner .banner-inner {
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
  }
  .kky-banner .banner-content {
    padding-right: 0;
    margin-bottom: 30px;
  }
  .kky-banner .banner-title {
    font-size: 30px;
  }
  .kky-banner .banner-subtitle {
    font-size: 15px;
    margin: 0 auto 30px;
  }
  .kky-banner .banner-actions {
    justify-content: center;
  }
  .kky-service-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .kky-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .kky-service-section,
  .kky-features-section,
  .kky-cta-section {
    padding: 50px 0;
  }
  .kky-section-title h2 {
    font-size: 26px;
  }
  .kky-cta-section h2 {
    font-size: 26px;
  }

  /* Server List - Tablet */
  .server-list-inner {
    width: 100%;
    padding: 0 16px;
  }
  .server-tab-item {
    padding: 10px 14px;
  }
  .server-tab-item a {
    font-size: 14px;
  }
  .server-panel-grid {
    grid-template-columns: 240px 1fr;
    gap: 16px;
  }
  .server-panel-info {
    min-height: 220px;
    padding: 24px 18px;
  }
  .server-panel-cards {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  .server-product-card {
    padding: 18px 14px;
  }
}

@media (max-width: 576px) {
  .kky-banner {
    min-height: 360px;
    padding: 50px 0;
  }
  .kky-banner .banner-title {
    font-size: 24px;
  }
  .kky-banner .banner-actions {
    flex-direction: column;
    width: 100%;
  }
  .kky-banner .btn-primary,
  .kky-banner .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .kky-features-grid {
    grid-template-columns: 1fr;
  }
  .kky-section-title h2,
  .kky-cta-section h2 {
    font-size: 22px;
  }

  /* Server List - Mobile */
  .kky-server-list-section {
    padding: 24px 0 40px;
  }
  .server-list-inner {
    padding: 0 12px;
  }
  .server-tab-bar {
    gap: 4px;
    margin-bottom: 16px;
  }
  .server-tab-item {
    padding: 8px 12px;
  }
  .server-tab-item a {
    font-size: 13px;
  }
  .server-panel-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .server-panel-info {
    min-height: auto;
    padding: 20px 16px;
  }
  .server-panel-info .info-title {
    font-size: 17px;
  }
  .server-panel-info .info-desc {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .server-panel-info .info-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
  }
  .server-panel-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .server-product-card {
    padding: 16px 14px;
    min-width: 0;
    max-width: none;
  }
  .server-product-card .card-icon {
    width: 28px;
    height: 28px;
  }
  .server-product-card .card-name {
    font-size: 14px;
  }
}
