/* Whispering Oaks Project Portal - Custom Styles */

:root {
  --brown: #3D2B1F;
  --tan: #C4A265;
  --white: #FFFFFF;
  --light-gray: #F5F3EF;
  --gold: #B8860B;
  --blue: #3498db;
  --orange: #f39c12;
  --red: #e74c3c;
  --purple: #9b59b6;
  --green: #27ae60;
}

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

body {
  font-family: 'Open Sans', sans-serif;
  color: #333;
  background: var(--light-gray);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--brown);
}

/* Navigation */
.nav {
  background: var(--brown);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--tan);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--brown);
  font-family: 'Montserrat', sans-serif;
}

.nav-brand-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
}

.nav-brand-sub {
  font-size: 0.65rem;
  opacity: 0.7;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--brown);
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; font-size: 1rem; }
}

/* Hero */
.hero {
  width: 100%;
  background: linear-gradient(135deg, var(--brown) 0%, #5a4030 50%, var(--brown) 100%);
  color: var(--white);
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 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='%23C4A265' fill-opacity='0.05'%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");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.hero-tagline {
  color: var(--tan);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--brown);
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

/* Section */
.section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Progress Bars */
.progress-bar-wrap {
  background: #e5e7eb;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, var(--tan), var(--gold));
}

.progress-bar-fill.green {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* Type Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-rr { background: #dbeafe; color: #1d4ed8; }
.badge-grind { background: #fef3c7; color: #b45309; }
.badge-driveway { background: #fee2e2; color: #dc2626; }
.badge-combo { background: #f3e8ff; color: #7c3aed; }
.badge-ramp { background: #dcfce7; color: #16a34a; }

.badge-not_started { background: #f1f5f9; color: #64748b; }
.badge-in_progress { background: #fefce8; color: #a16207; }
.badge-complete { background: #f0fdf4; color: #15803d; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Open Sans', sans-serif;
}

.btn-primary {
  background: var(--tan);
  color: var(--brown);
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--brown);
  border: 2px solid var(--tan);
}

.btn-outline:hover {
  background: var(--tan);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--brown);
}

.btn-white:hover {
  background: var(--light-gray);
}

/* Accordion */
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  transition: all 0.2s;
  margin-bottom: 0.25rem;
}

.accordion-header:hover {
  background: #faf9f7;
}

.accordion-header .arrow {
  transition: transform 0.3s;
  font-size: 0.8rem;
  color: #999;
}

.accordion-header.open .arrow {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 0.5rem 0;
}

.accordion-body.open {
  display: block;
}

/* Work Area Row */
.work-row {
  display: grid;
  grid-template-columns: 100px 1fr 120px 80px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.85rem;
}

.work-row:hover {
  background: #faf9f7;
}

.work-addr {
  font-weight: 700;
  color: var(--brown);
}

.work-sqft {
  text-align: right;
  font-size: 0.8rem;
  color: #64748b;
}

/* Footer */
.footer {
  width: 100%;
  background: var(--brown);
  color: rgba(255,255,255,0.7);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer h4 {
  color: var(--tan);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer p {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer a {
  color: var(--tan);
  text-decoration: none;
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.8rem;
}

/* Map */
#map {
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 500px;
  max-height: 900px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  #map {
    height: 450px;
    min-height: 350px;
  }
}

.map-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.map-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: var(--white);
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Photo Gallery */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.photo-card {
  border-radius: 12px;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #e5e7eb;
}

.photo-card-body {
  padding: 1rem;
}

.photo-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

/* Circular Progress */
.circular-progress {
  width: 180px;
  height: 180px;
  position: relative;
  margin: 0 auto;
}

.circular-progress svg {
  transform: rotate(-90deg);
}

.circular-progress .value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brown);
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--tan);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 0.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid var(--tan);
  transition: background 0.3s, border-color 0.3s;
}

.timeline-item.complete::before {
  background: var(--green);
  border-color: var(--green);
}

/* Admin Panel */
.admin-gate {
  max-width: 400px;
  margin: 4rem auto;
  text-align: center;
}

.admin-gate input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  margin: 1rem 0;
}

.admin-gate input:focus {
  outline: none;
  border-color: var(--tan);
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.admin-tab {
  padding: 0.75rem 1.25rem;
  border: none;
  background: none;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  font-size: 0.9rem;
}

.admin-tab.active {
  color: var(--brown);
  border-bottom-color: var(--tan);
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* Form Elements */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--brown);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'Open Sans', sans-serif;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--tan);
}

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

/* Status List in Admin */
.status-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  gap: 0.75rem;
}

.status-list-item:hover {
  background: #faf9f7;
}

.status-select {
  padding: 0.4rem 0.6rem;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 120px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-btn {
  padding: 0.4rem 0.85rem;
  border: 2px solid #e5e7eb;
  border-radius: 999px;
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--tan);
  background: var(--tan);
  color: var(--white);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
}

/* Proposals */
.proposal-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .proposal-card { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: 3rem 1.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  #map { height: 400px; }
  .work-row { grid-template-columns: 80px 1fr 80px; }
  .work-row > :nth-child(4) { display: none; }
  .photo-grid { grid-template-columns: 1fr; }
}

/* Contact Cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.85rem 1.25rem;
  background: var(--brown);
  color: var(--white);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Page Header */
.page-header {
  width: 100%;
  background: var(--brown);
  color: var(--white);
  padding: 2rem 1.5rem;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  font-size: 1.75rem;
}

.page-header p {
  color: var(--tan);
  margin-top: 0.25rem;
}

/* Quick Links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  text-decoration: none;
  color: var(--white);
  transition: all 0.2s;
  font-weight: 600;
  font-size: 0.9rem;
}

.quick-link:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.quick-link-icon {
  font-size: 1.5rem;
}

/* Proposal line items */
.line-item {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.line-item:last-child {
  border-bottom: none;
  font-weight: 700;
  color: var(--brown);
  padding-top: 0.75rem;
  border-top: 2px solid var(--tan);
}

/* Search/Filter input */
.search-input {
  width: 100%;
  max-width: 300px;
  padding: 0.5rem 0.85rem 0.5rem 2.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 999px;
  font-size: 0.85rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.65rem center;
  background-size: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--tan);
}
