/* Hide title and standard layout elements on home page */
:root {
  --koldan-hero-bg-light: linear-gradient(135deg, #1a237e 0%, #3f51b5 100%);
  --koldan-hero-bg-dark: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
}

[data-md-color-scheme="default"] .koldan-hero {
  background: 
    radial-gradient(circle at 20% 30%, rgba(63, 81, 181, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(26, 35, 126, 0.4) 0%, transparent 50%),
    var(--koldan-hero-bg-light);
}

[data-md-color-scheme="slate"] .koldan-hero {
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 150, 136, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(63, 81, 181, 0.1) 0%, transparent 50%),
    var(--koldan-hero-bg-dark);
}

.koldan-hero-wrapper {
  background-color: var(--md-primary-fg-color);
  margin: -2rem -1rem 0 -1rem;
}

.koldan-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10rem 1rem;
  text-align: center;
  color: white;
  border-radius: 0 0 50% 50% / 0 0 10% 10%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  transition: border-radius 0.5s ease;
}

.koldan-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.koldan-logo-large {
  width: 140px;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 15px rgba(255,255,255,0.2));
}

.koldan-hero h1 {
  font-size: 3.5rem !important;
  font-weight: 800 !important;
  margin-bottom: 1.5rem !important;
  color: white !important;
  line-height: 1.1;
  display: block !important;
}

.koldan-hero p {
  font-size: 1.6rem;
  max-width: 900px;
  margin: 0 auto 3rem auto;
  opacity: 0.9;
  line-height: 1.4;
}

.koldan-hero-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.koldan-hero-actions .md-button {
  padding: 0.8rem 2.5rem;
  border-radius: 2.5rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.koldan-hero-actions .md-button--primary {
  background-color: white;
  color: #1a237e;
  border-color: white;
}

.koldan-hero-actions .md-button--primary:hover {
  background-color: #f0f0f0;
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.koldan-hero-actions .md-button:not(.md-button--primary) {
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}

.koldan-hero-actions .md-button:not(.md-button--primary):hover {
  background-color: rgba(255,255,255,0.1);
  border-color: white;
  transform: translateY(-4px);
}

.koldan-content-section {
  background-color: var(--md-default-bg-color);
  position: relative;
  z-index: 1;
}

.koldan-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 5rem 1rem;
}

.koldan-feature-card {
  padding: 2.5rem;
  border-radius: 1.25rem;
  background-color: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  display: flex;
  flex-direction: column;
}

.koldan-feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: var(--md-primary-fg-color);
}

.koldan-feature-icon {
  font-size: 3rem;
  color: var(--md-primary-fg-color);
  margin-bottom: 2rem;
  height: 3rem;
  width: 3rem;
  display: flex;
  align-items: center;
}

.koldan-feature-icon svg {
  fill: currentColor;
  width: 100%;
  height: 100%;
}

/* Header scroll effect */
@media screen and (min-width: 60em) {
  /* On home page: starts transparent, becomes blurred/semi-transparent on scroll */
  [data-md-template="home.html"] .md-header {
    background-color: transparent !important;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none !important;
    position: fixed !important;
    top: -100px;
    width: 100%;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
  }

  [data-md-template="home.html"] body[data-md-state="blur"] .md-header {
    top: 0;
    opacity: 1;
    pointer-events: auto;
    background-color: var(--md-header-bg-color--transparent) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.2) !important;
  }

  /* On all other pages: use standard solid background ALWAYS */
  [data-md-template]:not([data-md-template="home.html"]) .md-header {
    background-color: var(--md-header-bg-color) !important;
    box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: none !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: sticky !important;
    top: 0;
    z-index: 100;
  }

  /* Responsive hide/show logic - on non-home pages ONLY */
  [data-md-template]:not([data-md-template="home.html"]) .md-header--hidden {
    transform: translateY(-100%) !important;
    pointer-events: none;
  }

  /* Keep header visible when it has focus or is active (e.g. search) */
  .md-header:focus-within {
    transform: translateY(0) !important;
  }
}

/* Mobile responsive sticky header behavior */
@media screen and (max-width: 59.9375em) {
  .md-header {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  [data-md-template]:not([data-md-template="home.html"]) .md-header--hidden {
    transform: translateY(-100%);
  }
  
  /* Ensure header background is solid on mobile even for home template on scroll */
  [data-md-template="home.html"] body[data-md-state="blur"] .md-header {
    background-color: var(--md-header-bg-color) !important;
    backdrop-filter: blur(20px) !important;
  }
}

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

.koldan-hero-content {
  animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  z-index: 2;
}

/* Mouse Scroll Animation from example */
.koldan-mouse-scroll {
  display: block;
  margin: 0 auto;
  width: 26px;
  height: 46px;
  border-radius: 13px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  position: absolute;
  bottom: 40px;
  left: 50%;
  margin-left: -13px;
  transition: opacity 0.3s;
  z-index: 2;
}

.koldan-mouse-scroll span {
  display: block;
  margin: 6px auto;
  width: 2px;
  height: 8px;
  border-radius: 4px;
  background: white;
  animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

.koldan-feature-card {
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  opacity: 0;
}

.koldan-feature-card:nth-child(1) { animation-delay: 0.2s; }
.koldan-feature-card:nth-child(2) { animation-delay: 0.3s; }
.koldan-feature-card:nth-child(3) { animation-delay: 0.4s; }
.koldan-feature-card:nth-child(4) { animation-delay: 0.5s; }

.koldan-feature-card h3 {
  margin-top: 0;
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
}

.koldan-feature-card p {
  color: var(--md-default-fg-color--light);
  line-height: 1.7;
  font-size: 1.1rem;
  margin: 0;
}

@media screen and (max-width: 768px) {
  .koldan-hero h1 {
    font-size: 2.5rem !important;
  }
  .koldan-hero p {
    font-size: 1.25rem;
  }
  .koldan-hero {
    padding: 6rem 1rem;
    border-radius: 0 0 2rem 2rem;
  }
}

/* Hide standard components on the home page */
[data-md-template="home.html"] .md-typeset h1,
[data-md-template="home.html"] .md-content,
[data-md-template="home.html"] .md-main__inner {
  display: none !important;
}

[data-md-template="home.html"] .md-sidebar {
  display: none !important;
}

.md-grid {
  max-width: initial;
}