/* =====================================================
   Ridgetop Refuge — Site Styles
   Mountain aesthetic: dark greens, warm browns, cream
   ===================================================== */

:root {
    --green-primary: #2d5a3d;
    --green-dark: #1a3a27;
    --green-mid: #3d7a54;
    --brown-warm: #8b6914;
    --brown-light: #c4973e;
    --cream: #f5f0e8;
    --cream-dark: #e8dece;
    --off-white: #f9f6f0;
    --text-dark: #1c1c1c;
    --text-muted: #6b6355;
    --overlay-dark: rgba(0, 0, 0, 0.52);
    --overlay-gradient: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius: 6px;
    --shadow: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.18);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--off-white);
    line-height: 1.7;
    margin: 0;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.25;
}

a { color: var(--green-primary); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---- Header / Nav ---- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s ease;
}

.site-header.scrolled {
    background: var(--green-dark);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand.site-logo {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: 0.02em;
}

.logo-icon {
    color: var(--brown-light);
    margin-right: 0.3rem;
    font-size: 0.9em;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.4rem 0.8rem !important;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover { color: #fff !important; }

/* ---- Hero Section ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.03);
    transition: transform 8s ease;
}

.hero:hover .hero-bg { transform: scale(1.0); }

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-gradient);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 6rem 0 4rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 300;
    opacity: 0.92;
    text-shadow: 0 1px 10px rgba(0,0,0,0.4);
    margin-bottom: 2.5rem;
    max-width: 560px;
    line-height: 1.5;
}

.hero-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-hero-primary {
    background: var(--green-primary);
    color: #fff;
    border: 2px solid var(--green-primary);
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.25s;
    letter-spacing: 0.02em;
}

.btn-hero-primary:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.7);
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.25s;
    letter-spacing: 0.02em;
}

.btn-hero-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---- Section Styles ---- */
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--green-primary);
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--green-dark);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.65;
}

/* ---- Build Phase Cards ---- */
.section-phases {
    padding: 5rem 0;
    background: var(--cream);
}

.phase-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff;
    transition: transform 0.25s, box-shadow 0.25s;
    height: 100%;
}

.phase-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.phase-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.phase-card-img-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 3rem;
}

.phase-card-body {
    padding: 1.5rem;
}

.phase-tag {
    display: inline-block;
    background: var(--green-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.phase-status {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
}

.phase-status.complete { background: #d4edda; color: #155724; }
.phase-status.in-progress { background: #fff3cd; color: #856404; }
.phase-status.upcoming { background: #e2e3e5; color: #383d41; }

.phase-card-title { font-family: var(--font-serif); font-size: 1.25rem; margin-bottom: 0.5rem; }

/* ---- Blog Cards ---- */
.section-blog {
    padding: 5rem 0;
    background: var(--off-white);
}

.blog-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff;
    height: 100%;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-card-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--brown-warm) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 2.5rem;
}

.blog-card-body {
    padding: 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-category {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brown-warm);
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
    color: var(--green-dark);
    line-height: 1.35;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 1rem;
}

.blog-card-date {
    font-size: 0.8rem;
    color: #aaa;
}

/* ---- By the Numbers ---- */
.section-numbers {
    padding: 5rem 0;
    background: var(--green-dark);
    color: #fff;
}

.number-stat {
    text-align: center;
    padding: 1.5rem;
}

.number-value {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--brown-light);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.number-label {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
}

.budget-bar-wrap {
    background: rgba(255,255,255,0.15);
    border-radius: 50px;
    height: 12px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.budget-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--brown-warm), var(--brown-light));
    border-radius: 50px;
    transition: width 1s ease;
}

/* ---- Full-width Photo Section ---- */
.section-photo-quote {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.section-photo-quote .bg-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.section-photo-quote .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.48);
}

.pull-quote {
    position: relative;
    z-index: 2;
    color: #fff;
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-style: italic;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 2px 15px rgba(0,0,0,0.5);
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* pull-quote decorative marks removed — quote text is plain attribution */

/* ---- Rental Teaser ---- */
.section-rental {
    padding: 5rem 0;
    background: var(--cream);
}

.rental-teaser {
    background: var(--green-dark);
    color: #fff;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.rental-teaser h2 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.rental-teaser p { opacity: 0.85; }

.rental-form .form-control {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: var(--border-radius);
}

.rental-form .form-control::placeholder { color: rgba(255,255,255,0.5); }
.rental-form .form-control:focus {
    background: rgba(255,255,255,0.18);
    border-color: var(--brown-light);
    box-shadow: 0 0 0 3px rgba(196,151,62,0.2);
    color: #fff;
}

.rental-form .form-label { color: rgba(255,255,255,0.8); font-size: 0.85rem; }

/* ---- Gallery ---- */
.gallery-filter-bar {
    background: #fff;
    border-bottom: 1px solid #e8e3da;
    padding: 1rem 0;
    position: sticky;
    top: 72px;
    z-index: 100;
}

.filter-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0.2rem;
    color: var(--text-muted);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--green-primary);
    border-color: var(--green-primary);
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--green-dark);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-caption {
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* ---- Lightbox ---- */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 4px; }

.lightbox-close {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    text-align: center;
    max-width: 600px;
    padding: 0 1rem;
}

/* ---- Timeline ---- */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 3px;
    background: var(--green-primary);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 3rem 2.5rem;
}

.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; text-align: left; }

.timeline-dot {
    position: absolute;
    width: 18px; height: 18px;
    background: var(--green-primary);
    border: 3px solid var(--off-white);
    border-radius: 50%;
    top: 1.2rem;
}

.timeline-item.left .timeline-dot { right: -9px; }
.timeline-item.right .timeline-dot { left: -9px; }

.timeline-dot.complete { background: var(--brown-warm); }

.timeline-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.timeline-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--green-dark);
    margin-bottom: 0.4rem;
}

.timeline-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

@media (max-width: 768px) {
    .timeline::before { left: 24px; }
    .timeline-item { width: 100%; left: 0 !important; text-align: left !important; padding-left: 60px; padding-right: 1rem; }
    .timeline-item .timeline-dot { left: 15px !important; right: auto !important; }
}

/* ---- Blog ---- */
.blog-hero {
    background: var(--green-dark);
    color: #fff;
    padding: 8rem 0 4rem;
}

.blog-post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #2c2c2c;
}

.blog-post-content h2, .blog-post-content h3 { font-family: var(--font-serif); color: var(--green-dark); margin-top: 2rem; }
.blog-post-content p { margin-bottom: 1.25rem; }
.blog-post-content img { border-radius: 8px; margin: 1.5rem 0; box-shadow: var(--shadow); }
.blog-post-content blockquote {
    border-left: 4px solid var(--green-primary);
    margin: 1.5rem 0;
    padding: 0.75rem 1.5rem;
    background: var(--cream);
    font-style: italic;
    color: var(--text-muted);
    border-radius: 0 6px 6px 0;
}

/* ---- Guest Book / Reviews ---- */
.review-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.star-rating { color: #f4b942; font-size: 1.1rem; }
.star-empty { color: #ddd; }

.review-guest { font-weight: 600; color: var(--green-dark); }
.review-date { font-size: 0.8rem; color: var(--text-muted); }
.review-text { margin-top: 0.75rem; font-size: 0.95rem; line-height: 1.65; }

/* ---- Admin Panel ---- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--green-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 500;
}

.admin-logo {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-family: var(--font-serif);
    font-size: 1.1rem;
}

.admin-logo a { color: #fff; font-weight: 600; }

.admin-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex: 1;
}

.admin-nav li { margin: 0; }

.admin-nav-link {
    display: block;
    padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.75) !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(255,255,255,0.08);
    color: #fff !important;
    border-left-color: var(--brown-light);
    text-decoration: none;
}

.admin-logout {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-logout a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.admin-logout a:hover { color: #fff; }

.admin-content {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f4f4f4;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-topbar-site { font-weight: 600; color: var(--green-dark); }

.admin-body { padding: 2rem 1.5rem; }

.admin-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.admin-stat {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

.admin-stat-value {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--green-primary);
    font-weight: 700;
    line-height: 1;
}

.admin-stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.4rem; }

/* ---- Auth Page ---- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green-dark) 0%, #0f2518 100%);
    padding: 2rem 1rem;
}

.auth-container {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-header h1 { font-size: 1.5rem; color: var(--green-dark); margin: 1rem 0 0.25rem; }
.auth-header p { color: var(--text-muted); font-size: 0.9rem; }
.auth-logo { color: var(--green-dark) !important; font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; display: inline-flex; align-items: center; gap: 0.4rem; }

/* ---- Footer ---- */
.site-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.75);
    padding: 4rem 0 2rem;
    margin-top: 0;
}

.footer-brand {
    font-family: var(--font-serif);
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.footer-tagline { font-size: 0.9rem; opacity: 0.7; line-height: 1.6; }

.site-footer h6 { color: rgba(255,255,255,0.9); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1rem; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.65); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: #fff; text-decoration: none; }

.footer-divider { border-color: rgba(255,255,255,0.1); margin: 2rem 0 1rem; }
.footer-copy { color: rgba(255,255,255,0.4); font-size: 0.8rem; margin: 0; }
.footer-location { opacity: 0.5; }

/* ---- Utilities ---- */
.btn-primary {
    background: var(--green-primary);
    border-color: var(--green-primary);
}
.btn-primary:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.text-green { color: var(--green-primary) !important; }
.text-brown { color: var(--brown-warm) !important; }
.bg-cream { background: var(--cream) !important; }
.bg-dark-green { background: var(--green-dark) !important; }

.page-header {
    background: var(--green-dark);
    color: #fff;
    padding: 8rem 0 4rem;
}

.page-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #fff;
    margin-bottom: 0.5rem;
}

.page-header p { opacity: 0.8; font-size: 1.05rem; max-width: 600px; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .site-header { background: var(--green-dark); }
    .admin-sidebar { position: relative; width: 100%; min-height: auto; }
    .admin-content { margin-left: 0; }
    .admin-wrapper { flex-direction: column; }
}

@media (max-width: 576px) {
    .hero-cta-group { flex-direction: column; }
    .btn-hero-primary, .btn-hero-outline { width: 100%; text-align: center; }
    .rental-teaser { padding: 2rem 1.5rem; }
}
