/* ==========================================================================
   DNS-Prices: Structural Layout & Formatting (layout.css)
   Pure formatting, layout architecture, grid system, flex containers,
   and responsive media queries without hardcoded color definitions.
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Navigation Bar */
.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Clean Brand Logo Switcher */
.logo-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-brand:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.logo-brand.is-discovery .logo-text {
  color: #fff;
}




/* Content Container */
.container {
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1.5rem;
  flex: 1;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 2rem;
}

/* Search Form Structure */
.search-form {
  max-width: 750px;
  margin: 0 auto 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-input-wrapper {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.4rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(8px);
}

.search-input-wrapper:focus-within {
  border-color: var(--primary-accent);
  box-shadow: 0 0 20px var(--primary-glow);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.1rem;
  padding: 0.8rem 1.2rem;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-dim);
}

/* TLD Chips Wrapper */
.tld-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

/* Results Section & Header Bar */
.results-container {
  margin-top: 2rem;
}

.results-header-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.group-toggle-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Results Grid */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

/* Card Geometry */
.card-result {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  min-height: 230px;
  position: relative;
  overflow: hidden;
}

.card-result:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.header-tag-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.card-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Side Rail Ad Layout */
.layout-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
  flex: 1;
}

.ad-side-rail {
  display: none;
  width: 160px;
  min-width: 160px;
  padding: 2.5rem 0.5rem;
}

.ad-rail-sticky {
  position: sticky;
  top: 85px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Responsive Viewport Media Queries
   ========================================================================== */

/* Widescreen Desktop */
@media (min-width: 1680px) {
  .ad-side-rail {
    display: block;
  }
}

/* Tablet & Mobile Devices */
@media (max-width: 768px) {
  .header-nav {
    padding: 0.85rem 1rem;
  }

  .container {
    padding: 1.5rem 1rem;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-sub {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .search-input-wrapper {
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .btn-search {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.25rem;
  }

  .tld-chips-wrapper {
    gap: 0.4rem;
  }

  .results-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .group-toggle-bar {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .matrix-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card-result {
    min-height: auto;
    padding: 1rem;
  }

  .card-header {
    gap: 0.4rem;
  }

  .domain-name {
    font-size: 1.1rem;
  }

  .price-val-reg {
    font-size: 1.2rem;
  }
}

/* Small Smartphone Viewport */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .logo-brand {
    font-size: 1.2rem;
  }
}
