/* ============================================================
   DomenanapRedaj.com — Frontend stylesheet
   ============================================================ */

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

:root {
    --primary:      #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light:#eff6ff;
    --success:      #16a34a;
    --success-bg:   #f0fdf4;
    --danger:       #dc2626;
    --danger-bg:    #fef2f2;
    --text:         #0f172a;
    --text-muted:   #64748b;
    --bg:           #f8fafc;
    --card:         #ffffff;
    --border:       #e2e8f0;
    --radius:       14px;
    --shadow:       0 4px 32px rgba(0,0,0,.08);
    --shadow-sm:    0 1px 4px rgba(0,0,0,.06);
    --font:         'Inter', system-ui, -apple-system, sans-serif;
    --nav-h:        64px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Navigation ─────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-lang { margin-left: auto; }

.nav-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.nav-brand span { color: var(--primary); }

.nav-lang {
    display: flex;
    gap: .25rem;
}

.lang-btn {
    padding: .35rem .7rem;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
    border: 1.5px solid transparent;
    transition: all .2s;
}

.lang-btn.active,
.lang-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
    color: #fff;
    padding: 5rem 1.5rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 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.03'%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;
}

.hero-inner {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 100px;
    padding: .35rem .9rem;
    font-size: .82rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero-badge::before { content: '🌐'; }

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
}

.hero h1 .domain-name {
    display: block;
    color: #93c5fd;
}

.hero-subtitle {
    font-size: 1.05rem;
    opacity: .85;
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-price {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    padding: .6rem 1.2rem;
    font-size: .95rem;
}

.hero-price strong { font-size: 1.2rem; color: #86efac; }

/* ─── Main ───────────────────────────────────────────────── */

main { flex: 1; }

.section {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* ─── Form card ──────────────────────────────────────────── */

.form-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.form-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: .4rem;
}

.form-card-subtitle {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 2rem;
}

/* ─── Form elements ──────────────────────────────────────── */

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: .4rem;
    color: var(--text);
}

.form-group label .req {
    color: var(--danger);
    margin-left: .15rem;
}

.form-control {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: .95rem;
    font-family: var(--font);
    color: var(--text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    appearance: none;
}

.form-control::placeholder { color: #94a3b8; }

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-control.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.form-error {
    font-size: .8rem;
    color: var(--danger);
    margin-top: .3rem;
    display: none;
}

.form-error.visible { display: block; }

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Price group */
.input-group {
    display: flex;
}

.input-group .form-control {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}

.input-group-addon {
    display: flex;
    align-items: center;
    padding: 0 .85rem;
    background: #f1f5f9;
    border: 1.5px solid var(--border);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: .9rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* Honeypot */
.hp-field { display: none !important; visibility: hidden; position: absolute; }

/* Submit button */
.btn-submit {
    width: 100%;
    padding: .85rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background .2s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: .5rem;
}

.btn-submit:hover  { background: var(--primary-dark); }
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* ─── Alerts ─────────────────────────────────────────────── */

.alert {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .92rem;
}

.alert-icon { font-size: 1.2rem; flex-shrink: 0; line-height: 1.4; }
.alert-text strong { display: block; font-size: 1rem; margin-bottom: .2rem; }

.alert-success { background: var(--success-bg); color: #14532d; border: 1px solid #86efac; }
.alert-danger  { background: var(--danger-bg);  color: #7f1d1d; border: 1px solid #fca5a5; }

.alert.hidden { display: none; }

/* ─── Nav search ─────────────────────────────────────────── */

.nav-search {
    flex: 1;
    min-width: 0;
    max-width: 320px;
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #f1f5f9;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: .35rem .75rem;
    transition: border-color .15s, box-shadow .15s;
}

.nav-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    background: #fff;
}

.nav-search-icon { font-size: .9rem; flex-shrink: 0; opacity: .6; }

.nav-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: .875rem;
    font-family: var(--font);
    color: var(--text);
    background: transparent;
    min-width: 0;
}

.nav-search-input::placeholder { color: #94a3b8; }

.domain-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.domain-input-wrap .form-control { flex: 1; }

.domain-owned-badge {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.domain-owned-badge[hidden] { display: none !important; }


@media (max-width: 600px) {
    .nav-search { max-width: none; }
    .nav-brand span { display: none; }
}

/* ─── Footer ─────────────────────────────────────────────── */

footer {
    border-top: 1px solid var(--border);
    background: var(--card);
    padding: 1.25rem 1.5rem;
    text-align: center;
    font-size: .82rem;
    color: var(--text-muted);
}

/* ─── Spinner ────────────────────────────────────────────── */

.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
}

.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 640px) {
    .hero { padding: 3.5rem 1rem 5rem; }
    .form-card { padding: 1.75rem 1.25rem; margin-top: -2rem; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-card-title { font-size: 1.2rem; }
    .nav-inner { padding: 0 1rem; }
}
