/* ============================================
   SmileFarmer Public Website — Mobile-First
   ใช้ theme เดิม (สีทอง/น้ำตาล)
   ============================================ */

:root {
    --primary-color: #F4D793;
    --primary-hover: #F0A04B;
    --primary-light: #fef8e9;
    --primary-dark: #E38B29;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

/* === Base === */
body {
    font-family: 'Sarabun', 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
}

a { color: var(--primary-dark); }
a:hover { color: var(--primary-hover); }

/* === Navbar === */
.public-navbar { background: #fff; border-bottom: 3px solid var(--primary-color); }
.public-navbar .navbar-brand { color: var(--primary-dark) !important; font-weight: 700; font-size: 1.2rem; }
.public-navbar .navbar-brand i { color: var(--primary-hover); }
.public-navbar .nav-link { font-size: 0.9rem; padding: 0.5rem 0.75rem !important; min-height: 44px; display: flex; align-items: center; color: var(--text-primary); }
.public-navbar .nav-link:hover { color: var(--primary-dark); }
.public-navbar .btn-register { background: var(--primary-hover); color: #fff; border: none; }
.public-navbar .btn-register:hover { background: var(--primary-dark); color: #fff; }
.public-navbar .btn-login { border-color: var(--primary-hover); color: var(--primary-dark); }
.public-navbar .btn-login:hover { background: var(--primary-hover); color: #fff; }

/* === Hero === */
.hero-section {
    position: relative;
    color: #fff;
    padding: 5rem 1rem;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

    /* background image layer */
    .hero-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.1)), url('/Content/images/rice-field.jpg') center/cover no-repeat;
        opacity: 0.85;
        filter: blur(3px);
        transform: scale(1.2);
    }

/* Fade-out ด้านล่าง */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--bg-light));
    pointer-events: none;
}
.hero-section .container { position: relative; z-index: 1; }
.hero-section h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; }
.hero-section p { font-size: 1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 1.5rem; }
.hero-section .btn { min-height: 44px; min-width: 44px; font-size: 1rem; }

/* === Section === */
.public-section { padding: 3rem 0; }
.public-section h1, .public-section h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; text-align: center; color: var(--text-primary); }
.section-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* === Cards === */
.public-card {
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.public-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.08); }
.public-card .card-body { padding: 1.5rem; }
.public-card .card-title { font-weight: 600; font-size: 1.1rem; }

/* === Steps (How It Works) === */
.step-card { text-align: center; padding: 2rem 1rem; }
.step-icon { font-size: 2.5rem; color: var(--primary-dark); margin-bottom: 1rem; }
.step-number { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-hover); color: #fff; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.75rem; }

/* === Reviews === */
.review-card { border-left: 4px solid var(--primary-hover); }
.review-card .review-photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.review-card .review-text { font-style: italic; color: var(--text-secondary); }

/* === News === */
.news-card img { border-radius: 8px 8px 0 0; height: 180px; object-fit: cover; width: 100%; }

/* === Highlight Section === */
.highlight-section { background: var(--primary-light); }

/* === Footer === */
.public-footer { background: #3a2e1a; color: #d4c5a9; }
.public-footer h5, .public-footer h6 { color: var(--primary-color); }
.public-footer a { color: #d4c5a9; }
.public-footer a:hover { color: var(--primary-color); text-decoration: none; }
.public-footer hr { border-color: rgba(244, 215, 147, 0.2); }
.public-footer .text-muted { color: #a89878 !important; }

/* === Buttons (theme) === */
.btn-primary-theme { background: var(--primary-hover); color: #fff; border: none; }
.btn-primary-theme:hover { background: var(--primary-dark); color: #fff; }
.btn-outline-theme { border-color: var(--primary-hover); color: var(--primary-dark); }
.btn-outline-theme:hover { background: var(--primary-hover); color: #fff; }

/* === Form === */
.public-form .form-control, .public-form .form-select {
    min-height: 44px;
    border-radius: 8px;
}
.public-form .form-control:focus, .public-form .form-select:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 0.2rem rgba(240, 160, 75, 0.25);
}
.public-form .btn { min-height: 44px; min-width: 44px; border-radius: 8px; }

/* === Empty State === */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-secondary); }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; color: var(--primary-hover); }

/* === Responsive: Tablet === */
@media (min-width: 768px) {
    .hero-section { padding: 6rem 2rem; min-height: 500px; }
    .hero-section h1 { font-size: 2.5rem; }
    .hero-section p { font-size: 1.1rem; }
    .public-section h1, .public-section h2 { font-size: 1.8rem; }
}

/* === Responsive: Desktop === */
@media (min-width: 1024px) {
    .hero-section { padding: 7rem 2rem; min-height: 550px; }
    .hero-section h1 { font-size: 3rem; }
}
