/* =========================================
   Traveler Courier Landing — Modern Refresh
   CLEANED • COMMENTED • NO VISUAL CHANGE
   ========================================= */

/* -----------------------------------------
   1) ROOT VARIABLES
   Purpose: centralize colors, shadows, radius
   Example: color: var(--tcn-primary);
------------------------------------------ */
:root {
  --tcn-bg: #f7f9fc;                    /* page background */
  --tcn-card: #ffffff;                  /* card bg */
  --tcn-text: #1f2937;                  /* base text color */
  --tcn-primary: #0ea5e9;               /* brand primary (light) */
  --tcn-primary-600: #0284c7;           /* brand primary (dark) */
  --tcn-border: #e5e7eb;                /* hairline borders */
  --tcn-ring: rgba(14,165,233,.25);     /* focus/halo accent */
  --tcn-shadow: 0 6px 18px rgba(2,8,20,.06); /* soft depth */
  --tcn-radius: 12px;                   /* rounded corners */
}

/* -----------------------------------------
   2) LANDING WRAPPER (FINAL VERSION)
   Purpose: page max-width, centering, spacing
------------------------------------------ */
.tcn-landing-wrapper {
  max-width: 1100px;                    /* wider cap for desktop */
  padding-top: 40px;                    /* top rhythm */
  padding-bottom: 48px;                 /* bottom rhythm */
  margin-inline: auto;                  /* center horizontally */
  clear: both;                          /* prevent float overlap (theme-safe) */
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  color: var(--tcn-text);
}
.tcn-landing-wrapper h1 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 18px;
  text-align: start;
}

/* -----------------------------------------
   3) SEARCH BAR (legacy header search)
------------------------------------------ */
.tcn-search-bar { margin: 10px 0 28px; text-align: center; }
.tcn-search-bar form {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
@media (min-width: 1024px) {
  .tcn-search-bar form { justify-content: flex-start; gap: 12px; }
}
#tcn-search-form input[type="text"],
#tcn-search-type,
#tcn-search-form button {
  border-radius: 999px; border: 1px solid var(--tcn-border); box-shadow: var(--tcn-shadow); font-size: 16px;
}
#tcn-search-form input[type="text"] { padding: 12px 14px; width: 280px; max-width: 70vw; }
@media (min-width: 1024px) {
  #tcn-search-form input[type="text"] { width: 420px; max-width: 52vw; }
}
#tcn-search-type {
  padding: 12px 44px 12px 14px; appearance: none; background: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
@media (min-width: 1024px) { #tcn-search-type { min-width: 190px; } }
html[dir="rtl"] #tcn-search-type { background-position: left 14px center; padding-left: 44px; padding-right: 14px; }
#tcn-search-form button {
  padding: 12px 16px; color: #fff;
  background: linear-gradient(180deg, var(--tcn-primary), var(--tcn-primary-600));
  border: none; cursor: pointer;
}
@media (max-width: 600px) { /* legacy */
  .tcn-search-bar form { flex-direction: column; align-items: stretch; }
  #tcn-search-form input[type="text"],
  #tcn-search-type,
  #tcn-search-form button { width: 100%; }
}

/* -----------------------------------------
   4) COLUMNS (GRID) & CARDS
------------------------------------------ */
.tcn-columns {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 24px; align-items: start; margin-top: 24px;
}
.tcn-column {
  grid-column: span 6; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; box-shadow: 0 6px 18px rgba(2,8,20,.06); padding: 18px 18px 14px;
}
.tcn-column h2 { font-size: 18px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.tcn-column > .button {
  display: inline-block; margin: 2px 0 10px; padding: 10px 14px; border-radius: 10px;
  background: linear-gradient(180deg, #0ea5e9, #0284c7); color: #fff !important; text-decoration: none;
  box-shadow: 0 8px 18px rgba(14,165,233,.25); transition: transform .08s ease, filter .2s ease;
}
.tcn-column > .button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.tcn-column ul { margin: 8px 0 0; }
.tcn-column li { margin: 8px 0; }
.tcn-column li a { color: #0284c7; text-decoration: none; border-bottom: 1px dashed transparent; }
.tcn-column li a:hover { border-bottom-color: #0284c7; }
@media (max-width: 900px) {
  .tcn-landing-wrapper { padding-inline: 16px; }
  .tcn-columns { gap: 20px; }
  .tcn-column { grid-column: span 12; }
  .tcn-search-bar form { justify-content: stretch; }
}
@media (max-width: 600px) {
  .tcn-search-bar form { flex-direction: column; align-items: stretch; gap: 12px; }
  #tcn-search-form input[type="text"],
  #tcn-search-type,
  #tcn-search-form button { width: 100%; min-height: 48px; }
}

/* -----------------------------------------
   5) AUTH SECTION
------------------------------------------ */
.tcn-auth-section { margin-top: 16px; text-align: center; }
.tcn-auth-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.tcn-welcome { align-self: center; margin-inline-end: 8px; }
.tcn-auth-links .tcn-btn {
  display: inline-flex; gap: 8px; margin: 4px; padding: 10px 16px;
  background: linear-gradient(180deg, var(--tcn-primary), var(--tcn-primary-600));
  color: #fff; border-radius: 10px; text-decoration: none; box-shadow: 0 8px 18px rgba(14,165,233,.25);
}
.tcn-auth-links .tcn-btn:hover { filter: brightness(1.05); }
@media (min-width: 901px) { .tcn-auth-actions--in { justify-content: center; gap: 12px; } }

/* -----------------------------------------
   6) DESKTOP-ONLY LAYOUT HOOKS
------------------------------------------ */
@media (min-width: 901px) {
  .tcn-lang, .tcn-hero-inner, .tcn-auth, .tcn-steps, .tcn-feed, .tcn-trust-inner, .tcn-footer {
    max-width: 1100px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px;
  }
  .tcn-hero-inner { text-align: center; }
  .tcn-hero-title { margin-top: 6px; }
  .tcn-hero-sub { margin-bottom: 18px; }
  .tcn-hero-ctas { justify-content: center; }
  .tcn-search-form { margin: 8px auto 0; }
  .tcn-input-group { max-width: 720px; margin: 0 auto; }
  .tcn-steps-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .tcn-feed .tcn-tabs { justify-content: center; }
  .tcn-cards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* -----------------------------------------
   7) UNIVERSAL FIXES
------------------------------------------ */
.tcn-cards, .tcn-cards li, .tcn-column ul { list-style: none; }
.tcn-cards li::marker, .tcn-column ul li::marker { content: none; }
.tcn-card { overflow: hidden; }
.tcn-card-link { display: block; padding: 14px; text-decoration: none; }

/* -----------------------------------------
   8) HARDENED LANDING LAYER (STRUCTURE)
------------------------------------------ */
.tcn-landing {
  --tcn-max: 1100px; --tcn-g: 16px; --tcn-lg: 24px; --tcn-xl: 32px;
  --bg:#f7f9fc; --card:#fff; --text:#1f2937; --muted:#6b7280;
  --primary:#0ea5e9; --primary-600:#0284c7; --border:#e5e7eb;
  --ring:rgba(14,165,233,.25); --shadow:0 8px 22px rgba(2,8,20,.06);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  color: var(--text); background: var(--bg);
}
.tcn-landing * { box-sizing: border-box; }
.tcn-landing img { max-width: 100%; display: block; }
.tcn-landing ul, .tcn-landing ol { padding: 0; margin: 0; list-style: none; }
.tcn-landing p { margin: 0; }
.tcn-landing a { color: inherit; }
.tcn-landing .tcn-row { max-width: var(--tcn-max); margin-inline: auto; padding-inline: var(--tcn-lg); }
@media (max-width: 600px){ .tcn-landing .tcn-row { padding-inline: var(--tcn-g); } }
.tcn-landing .tcn-lang { padding-top: var(--tcn-g); }
@media (min-width: 901px){ .tcn-landing .tcn-lang .lang-switcher { display: flex; justify-content: flex-end; gap: 8px; } }
.tcn-landing .tcn-hero {
  padding: var(--tcn-xl) 0 var(--tcn-lg);
  background: radial-gradient(900px 380px at 50% -220px, rgba(14,165,233,.12), transparent 62%),
              linear-gradient(180deg, #fff, #f8fbff);
}
.tcn-landing .tcn-hero-inner { text-align: center; }
.tcn-landing .tcn-hero-title { font-weight: 800; font-size: clamp(28px, 3vw, 40px); letter-spacing: .2px; margin-bottom: 6px; }
.tcn-landing .tcn-hero-sub { color: var(--muted); max-width: 720px; margin: 0 auto var(--tcn-g); font-size: clamp(14px,1.4vw,18px); }
.tcn-landing .tcn-hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: var(--tcn-g); }
.tcn-landing .tcn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; cursor: pointer;
  transition: transform .08s ease, filter .2s ease; }
.tcn-landing .tcn-btn--primary { color:#fff; background: linear-gradient(180deg, var(--primary), var(--primary-600)); box-shadow: 0 10px 26px rgba(14,165,233,.28); }
.tcn-landing .tcn-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* search shell (desktop/tablet defaults) */
.tcn-landing .tcn-search { display: flex; justify-content: center; }
.tcn-landing .tcn-search-form { width: 100%; max-width: 740px; }
.tcn-landing .tcn-input-group {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 999px; background:#fff;
  box-shadow: var(--shadow); overflow: hidden;
}
.tcn-landing .tcn-input-group select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding: 12px 44px 12px 14px; min-width: 180px; border: 0; background: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; font-size: 16px;
}
.tcn-landing .tcn-input-group input[type="text"] { flex:1 1 auto; min-width: 160px; border: 0; padding: 12px 14px; font-size: 16px; outline: none; }
.tcn-landing .tcn-search-btn { border: 0; color: #fff; background: linear-gradient(180deg, var(--primary), var(--primary-600)); padding: 12px 16px; font-size: 16px; cursor: pointer; }

/* RTL for select chevron */
.tcn-landing[dir="rtl"] .tcn-input-group select { background-position: left 14px center; padding-left: 44px; padding-right: 14px; }

/* steps, feed, trust, footer … (unchanged) */
.tcn-landing .tcn-steps { padding: var(--tcn-lg) 0 0; }
.tcn-landing .tcn-steps-grid { display: grid; gap: var(--tcn-g); }
@media (min-width: 901px){ .tcn-landing .tcn-steps-grid { grid-template-columns: repeat(3, 1fr); } }
.tcn-landing .tcn-step { background:#fff; border:1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; text-align: center; }
.tcn-landing .tcn-step-ico { font-size: 22px; margin-bottom: 6px; }
.tcn-landing .tcn-step h3 { margin: 4px 0 6px; font-size: 16px; }
.tcn-landing .tcn-step p { color: var(--muted); font-size: 14px; }
.tcn-landing .tcn-feed { padding: var(--tcn-lg) 0; }
.tcn-landing .tcn-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.tcn-landing .tcn-tab { border:1px solid var(--border); background:#fff; color: var(--text); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.tcn-landing .tcn-tab.is-active { background: linear-gradient(180deg, var(--primary), var(--primary-600)); color:#fff; border-color: transparent; }
.tcn-landing .tcn-tabpanes { margin-top: 4px; }
.tcn-landing .tcn-cards { display: grid; gap: 14px; }
@media (min-width: 901px){ .tcn-landing .tcn-cards { grid-template-columns: repeat(2, 1fr); } }
.tcn-landing .tcn-card { background:#fff; border:1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.tcn-landing .tcn-card-link { display: block; padding: 14px; text-decoration: none; color: inherit; }
.tcn-landing .tcn-card-title { font-weight: 700; margin-bottom: 2px; }
.tcn-landing .tcn-card-meta { color: var(--muted); font-size: 14px; }
.tcn-landing .tcn-card--empty { text-align:center; color: var(--muted); padding: 18px; }
.tcn-landing .tcn-trust { padding: var(--tcn-lg) 0; background: linear-gradient(180deg, #effaff, #ffffff); border-top: 1px solid var(--border); }
.tcn-landing .tcn-trust-inner { display: flex; align-items: center; gap: 10px; justify-content: center; color: #0f172a; }
.tcn-landing .tcn-shield { font-size: 20px; }
.tcn-landing .tcn-footer { padding: var(--tcn-lg) 0 var(--tcn-xl); text-align: center; color: var(--muted); }
.tcn-landing .tcn-footer-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.tcn-landing .tcn-footer-links a { color: #0369a1; text-decoration: none; }
.tcn-landing .tcn-footer-links a:hover { text-decoration: underline; }

/* ======================================================
   📱 FINAL, PHONE-ONLY FIX — MODERN PILL SEARCH (≤600px)
   Row 1: text input (100% width)
   Row 2: select + search button on one row
   Also cancels the “arc” by disabling pill clipping.
   (Placed at END so it wins the cascade.)
====================================================== */
@media (max-width: 600px) {
  .tcn-landing .tcn-input-group{
    display:flex !important;
    flex-wrap:wrap !important;        /* allow next row */
    align-items:stretch !important;
    gap:10px !important;

    /* stop pill clipping that created the arc */
    overflow:visible !important;
    border-radius:14px !important;    /* normal radius on phones */
  }

  /* Row 1 — input takes the full line */
  .tcn-landing .tcn-input-group input[type="text"]{
    order:1; flex:1 0 100% !important;
    max-width: 95% !important;
    width:100% !important; min-width:0; 
  }

/* Row 2 — keep select + button on ONE line */
.tcn-landing .tcn-input-group select{
  order: 2;
  /* let the select grow and take all remaining space */
  flex: 1 1 calc(100% - 56px - 10px) !important; /* 56px = button, 10px = gap */
  min-width: 0 !important;
  max-width: 155px !important;
  width: auto !important;     /* undo any fixed widths (e.g., 90px) */
}

.tcn-landing .tcn-search-btn{
  order: 3;
  flex: 0 0 56px !important;  /* fixed width button */
  width: 56px !important;
  height: 48px;
  padding: 0 12px;
  white-space: nowrap;
}

  .tcn-landing .tcn-search-btn{
    order:3; flex:0 0 56px !important; width:56px !important;
    height:48px; padding:0 12px; white-space:nowrap;
  }

  /* defeat the generic mobile rule that made the button 100% width */
  #tcn-search-form button{ width:auto !important; }
}
