/* ═══════════════════════════════════════════
   Půjčsinosič.cz — Styles
   ═══════════════════════════════════════════ */

:root {
    --c-forest:    #2d5016;
    --c-forest-d:  #1e3a0e;
    --c-lime:      #7cb342;
    --c-lime-l:    #a5d66e;
    --c-sand:      #f5f0e8;
    --c-sand-d:    #e8dfd2;
    --c-dark:      #1a1a1a;
    --c-gray:      #6b7280;
    --c-gray-l:    #d1d5db;
    --c-white:     #ffffff;
    --c-red:       #dc2626;
    --c-red-l:     #fef2f2;
    --c-green-l:   #f0fdf4;
    --c-occupied:  #ef4444;
    --c-selected:  #2d5016;
    --c-range:     #d4edbc;
    --shadow:      0 2px 12px rgba(0,0,0,.08);
    --radius:      10px;
    --font:        'DM Sans', sans-serif;
    --font-head:   'Playfair Display', serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--c-dark);
    background: var(--c-sand);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.header {
    background: var(--c-forest);
    color: var(--c-white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 960px;
    margin: 0 auto;
}
.logo {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c-white);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.logo span { color: var(--c-lime-l); }
.header-price {
    background: rgba(255,255,255,.12);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .02em;
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, var(--c-forest) 0%, var(--c-forest-d) 100%);
    color: var(--c-white);
    padding: 60px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(124,179,66,.15) 0%, transparent 60%);
}
.hero h1 {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
}
.hero p {
    font-size: 1.1rem;
    opacity: .85;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

/* ── Info section ── */
.info-section { padding: 50px 0; }
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.info-card {
    background: var(--c-white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.04);
    transition: transform .2s, box-shadow .2s;
}
.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.info-card .icon {
    width: 48px; height: 48px;
    background: var(--c-green-l);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    font-size: 1.4rem;
}
.info-card h3 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    margin-bottom: 8px;
}
.info-card p { color: var(--c-gray); font-size: .95rem; }

/* ── Booking section ── */
.booking-section {
    padding: 50px 0 60px;
}
.booking-section h2 {
    font-family: var(--font-head);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 8px;
}
.booking-subtitle {
    text-align: center;
    color: var(--c-gray);
    margin-bottom: 32px;
}
.booking-wrap {
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.04);
    overflow: hidden;
}
.booking-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
}
@media (max-width: 768px) {
    .booking-grid { grid-template-columns: 1fr; }
}

/* ── Calendar ── */
.calendar-panel { padding: 28px; }
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.cal-header h3 {
    font-family: var(--font-head);
    font-size: 1.2rem;
    min-width: 180px;
    text-align: center;
}
.cal-nav {
    background: none;
    border: 2px solid var(--c-gray-l);
    width: 36px; height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    color: var(--c-dark);
    transition: all .15s;
}
.cal-nav:hover { border-color: var(--c-forest); color: var(--c-forest); }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-dow {
    text-align: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--c-gray);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 0 8px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: .9rem;
    cursor: pointer;
    transition: all .15s;
    position: relative;
    font-weight: 500;
}
.cal-day:hover:not(.occupied):not(.empty):not(.past) {
    background: var(--c-green-l);
}
.cal-day.empty { visibility: hidden; }
.cal-day.past { color: var(--c-gray-l); cursor: default; }
.cal-day.today {
    font-weight: 700;
    box-shadow: inset 0 0 0 2px var(--c-forest);
}
.cal-day.occupied {
    background: var(--c-red-l);
    color: var(--c-occupied);
    cursor: not-allowed;
    text-decoration: line-through;
    font-weight: 400;
}
.cal-day.selected {
    background: var(--c-selected);
    color: var(--c-white);
    font-weight: 700;
}
.cal-day.in-range {
    background: var(--c-range);
    color: var(--c-forest-d);
}

.cal-legend {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    font-size: .8rem;
    color: var(--c-gray);
}
.cal-legend span {
    display: flex; align-items: center; gap: 6px;
}
.cal-legend .dot {
    width: 12px; height: 12px;
    border-radius: 4px;
    display: inline-block;
}
.dot-free { background: var(--c-green-l); border: 1px solid var(--c-lime); }
.dot-occupied { background: var(--c-red-l); border: 1px solid var(--c-occupied); }
.dot-selected { background: var(--c-selected); }

/* ── Booking form ── */
.form-panel {
    background: var(--c-sand);
    padding: 28px;
    border-left: 1px solid rgba(0,0,0,.06);
}
@media (max-width: 768px) {
    .form-panel { border-left: none; border-top: 1px solid rgba(0,0,0,.06); }
}
.form-panel h3 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.date-summary {
    background: var(--c-white);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: .9rem;
    line-height: 1.8;
    border: 1px solid rgba(0,0,0,.06);
}
.date-summary .label { color: var(--c-gray); }
.date-summary .value { font-weight: 600; float: right; }
.date-summary .total {
    font-size: 1.1rem;
    color: var(--c-forest);
    font-weight: 700;
}
.date-summary .divider {
    border: none;
    border-top: 1px dashed var(--c-gray-l);
    margin: 8px 0;
}

.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--c-dark);
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--c-gray-l);
    border-radius: 8px;
    font-size: .95rem;
    font-family: var(--font);
    transition: border-color .15s;
    background: var(--c-white);
}
.form-group input:focus {
    outline: none;
    border-color: var(--c-forest);
    box-shadow: 0 0 0 3px rgba(45,80,22,.1);
}
.form-group input.error { border-color: var(--c-red); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}
.btn-primary {
    background: var(--c-forest);
    color: var(--c-white);
    width: 100%;
}
.btn-primary:hover { background: var(--c-forest-d); transform: translateY(-1px); }
.btn-primary:disabled {
    background: var(--c-gray-l);
    color: var(--c-gray);
    cursor: not-allowed;
    transform: none;
}

.form-msg {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    display: none;
}
.form-msg.success { display: block; background: var(--c-green-l); color: var(--c-forest); }
.form-msg.error   { display: block; background: var(--c-red-l); color: var(--c-red); }

/* ── Footer ── */
.footer {
    background: var(--c-forest-d);
    color: rgba(255,255,255,.6);
    text-align: center;
    padding: 24px;
    font-size: .85rem;
}
.footer a { color: var(--c-lime-l); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── Admin ── */
.admin-login {
    max-width: 380px;
    margin: 80px auto;
    background: var(--c-white);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.admin-login h2 {
    font-family: var(--font-head);
    margin-bottom: 24px;
    text-align: center;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}
.admin-header h2 { font-family: var(--font-head); }

.admin-card {
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
}
.admin-card h3 {
    font-family: var(--font-head);
    margin-bottom: 16px;
    font-size: 1.15rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.admin-table th, .admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--c-gray-l);
}
.admin-table th {
    font-weight: 700;
    color: var(--c-gray);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.admin-table tr:hover td { background: var(--c-sand); }

.btn-sm {
    padding: 6px 14px;
    font-size: .8rem;
    border-radius: 6px;
}
.btn-danger { background: var(--c-red); color: var(--c-white); }
.btn-danger:hover { background: #b91c1c; }
.btn-outline {
    background: none;
    border: 1.5px solid var(--c-forest);
    color: var(--c-forest);
}
.btn-outline:hover { background: var(--c-green-l); }

.inline-form {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}
.inline-form .form-group { margin-bottom: 0; }
.inline-form input { padding: 9px 12px; }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 600;
}
.badge-new { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: var(--c-green-l); color: var(--c-forest); }
.badge-cancelled { background: var(--c-red-l); color: var(--c-red); }

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp .5s ease both; }
.fade-in-d1 { animation-delay: .1s; }
.fade-in-d2 { animation-delay: .2s; }
.fade-in-d3 { animation-delay: .3s; }
