/* ==========================================================
   City Tourism — Public Site Stylesheet
   Colors are injected as CSS variables from the DB (see
   includes/header.php) so the whole site re-themes instantly.
   ========================================================== */

:root {
    --primary: #0d6e6e;
    --secondary: #f5a623;
    --dark: #1c2b2b;
    --light: #f7f9f9;
    --white: #ffffff;
    --gray-100: #f4f6f6;
    --gray-200: #e7ebeb;
    --gray-400: #b7c2c2;
    --gray-600: #6b7878;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 4px 18px rgba(20, 40, 40, 0.08);
    --shadow-lg: 0 12px 34px rgba(20, 40, 40, 0.14);
    --transition: all .2s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Segoe UI', 'Poppins', system-ui, -apple-system, sans-serif;
    color: var(--dark);
    background: var(--light);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .eyebrow {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .78rem;
}
.section-head h2 { font-size: 2rem; margin-top: 6px; }
.section-head p { color: var(--gray-600); }
.section-alt { background: var(--white); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-secondary { background: var(--secondary); color: var(--dark); }
.btn-secondary:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-outline-dark { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: var(--white); }
.btn-sm { padding: 8px 16px; font-size: .82rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: #d64545; color: var(--white); }
.btn-danger:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--white);
    box-shadow: 0 1px 0 var(--gray-200);
}
.topbar {
    background: var(--dark);
    color: var(--gray-400);
    font-size: .8rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: var(--gray-400); }
.topbar .topbar-links { display: flex; gap: 18px; }
.topbar .topbar-links a:hover { color: var(--white); }

.navbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.25rem; color: var(--dark); }
.brand img { height: 44px; width: 44px; object-fit: cover; border-radius: 10px; }
.brand .brand-text small { display: block; font-size: .68rem; font-weight: 500; color: var(--gray-600); }

.nav-links { display: flex; align-items: center; gap: 28px; font-weight: 600; font-size: .93rem; }
.nav-links a { color: var(--dark); position: relative; padding: 6px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--dark); }

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--white); flex-direction: column; align-items: flex-start;
        padding: 16px 20px; gap: 14px; box-shadow: var(--shadow);
        display: none;
    }
    .nav-links.open { display: flex; }
    .topbar .topbar-links { display: none; }
}

/* ---------- Banner / Hero ---------- */
.hero {
    position: relative;
    min-height: 480px;
    display: flex; align-items: center;
    background-size: cover; background-position: center;
    color: var(--white);
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, rgba(13,110,110,.88), rgba(28,43,43,.75));
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: 2.8rem; max-width: 680px; }
.hero p { font-size: 1.15rem; max-width: 560px; color: rgba(255,255,255,.9); }
.hero .hero-actions { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
@media (max-width: 640px) {
    .hero h1 { font-size: 2rem; }
    .hero { min-height: 400px; }
}

/* ---------- Search bar ---------- */
.search-bar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 14px;
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-top: 30px;
    position: relative; z-index: 3;
}
.search-bar input, .search-bar select {
    flex: 1; min-width: 160px;
    border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
    padding: 12px 14px; font-size: .95rem; font-family: inherit; color: var(--dark);
}
.search-bar input:focus, .search-bar select:focus { outline: 2px solid var(--primary); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { height: 180px; width: 100%; object-fit: cover; background: var(--gray-200); }
.card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.card-tag {
    display: inline-block; background: rgba(13,110,110,.1); color: var(--primary);
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; width: fit-content;
}
.card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.card p.desc { color: var(--gray-600); font-size: .9rem; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 6px; color: var(--gray-600); font-size: .85rem; margin-bottom: 8px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.price { font-weight: 700; color: var(--primary); }

/* ---------- Category pills ---------- */
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.pill {
    padding: 9px 18px; border-radius: 999px; background: var(--white);
    border: 1px solid var(--gray-200); font-weight: 600; font-size: .85rem; color: var(--dark);
    transition: var(--transition);
}
.pill:hover, .pill.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ---------- Stats strip ---------- */
.stats-strip { background: var(--primary); color: var(--white); padding: 40px 0; }
.stats-strip .grid-4 { text-align: center; }
.stats-strip .num { font-size: 2.2rem; font-weight: 800; }
.stats-strip .label { color: rgba(255,255,255,.85); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Forms ---------- */
.form-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 34px; max-width: 480px; margin: 0 auto;
}
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=tel], input[type=url], input[type=date], input[type=time], input[type=file],
select, textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem; color: var(--dark);
    background: var(--white);
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.form-hint { font-size: .78rem; color: var(--gray-600); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .9rem; font-weight: 500; }
.alert-success { background: #e4f7ed; color: #15794d; border: 1px solid #b7e8ce; }
.alert-error { background: #fdecec; color: #b13636; border: 1px solid #f5c2c2; }
.alert-info { background: #e9f2fb; color: #1a5c9e; border: 1px solid #bfdcf5; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge-success { background: #e4f7ed; color: #15794d; }
.badge-warning { background: #fef3e0; color: #a5690b; }
.badge-danger  { background: #fdecec; color: #b13636; }
.badge-muted   { background: var(--gray-200); color: var(--gray-600); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--gray-400); padding: 56px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 34px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font-size: .95rem; margin-bottom: 16px; }
.site-footer a { color: var(--gray-400); display: block; margin-bottom: 10px; font-size: .9rem; }
.site-footer a:hover { color: var(--white); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 38px; width: 38px; border-radius: 8px; object-fit: cover; }
.footer-brand span { color: var(--white); font-weight: 800; font-size: 1.1rem; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center; margin: 0;
}
.social-row a:hover { background: var(--primary); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px;
    text-align: center; font-size: .82rem; color: var(--gray-600);
}

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-600); }
.empty-state .icon { font-size: 2.6rem; margin-bottom: 10px; }

/* ---------- Detail pages ---------- */
.detail-hero { height: 320px; background-size: cover; background-position: center; border-radius: var(--radius); margin-bottom: -60px; position: relative; }
.detail-hero::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.45)); border-radius: var(--radius); }
.detail-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 30px; position: relative; z-index: 2; }
.info-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; color: var(--gray-600); font-size: .92rem; }
.info-row b { color: var(--dark); min-width: 90px; display: inline-block; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
