/* Cedarsure Theme - Modern Emerald & Stone */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
  /* Colors from site */
  --bg: #fafaf9;          /* stone-50 */
  --card: #ffffff;        /* white */
  --primary: #064e3b;     /* emerald-900 */
  --accent: #fbbf24;      /* amber/gold */
  --text: #0f172a;        /* slate-900 */
  --muted: #475569;       /* slate-600 */
  --border: #e7e5e4;      /* stone-200 */
  
  /* Shared values */
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Typography */
h1, h2, h3, .brand {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
}

/* Updated Nav/Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: sticky;
  top: 12px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.brand {
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  font-style: italic; /* Matching Cedarsure style */
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--primary);
}

/* Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  shadow: var(--shadow);
}

/* Results Section (Dark Emerald Version) */
.results-card {
  background: #022c22; /* Darker emerald */
  color: white;
  border: none;
}

.results-card h2, .results-card h3 {
  color: white;
}

/* Metrics/KPIs */
.kpi {
  display: flex; align-items: baseline; gap: 12px;
}

.kpi .value {
  font-size: 32px;
  font-weight: 800;
  color: #064e3b;
}

.kpi .label {
  color: #064e3b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255,255,255,0.03);
  font-size: 13px;
}

/* Form Elements */
input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #d6d3d1;
  background: white;
  margin-top: 4px;
  font-size: 16px;
}

input:focus {
  outline: 2px solid var(--primary);
  border-color: transparent;
}

button {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  box-shadow: var(--shadow);
}

button:hover {
  background: #065f46;
  transform: translateY(-1px);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
}

th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* Accents */
.accent-text {
  color: var(--accent);
}

.footer {
  padding: 18px 0;
  background: #022c22;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  font-size: 12px;
}

/* Standard Link Styling */
a {
  color: #065f46; /* Emerald-800: slightly lighter than primary for readability */
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  border-bottom: 1px solid transparent; /* Prepare for a nice hover effect */
}

a:hover {
  color: #022c22; /* Emerald-950: darkens on hover */
  border-bottom: 1px solid #fbbf24; /* Adds a Gold underline on hover */
}

/* For links on dark backgrounds (like your footer or results card) */
.results-card a, .footer a {
  color: #fbbf24; /* Gold accent for dark backgrounds */
}

.results-card a:hover, .footer a:hover {
  color: #ffffff;
  border-bottom: 1px solid #ffffff;
}

.link-muted {
  color: #64748b; /* slate-500 */
  font-size: 0.875rem;
  font-style: italic;
}

.link-muted:hover {
  color: #064e3b; /* Snaps back to Emerald on hover */
}

hr {
  border: 0;
  height: 1px;
  background-color: #e7e5e4; /* stone-200: a soft, elegant grey */
  margin: 24px 0;
  opacity: 1; /* Ensures it isn't hidden by parent transparency */
}

/* Optional: A more decorative version for sections */
.hr-fancy {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, transparent, #d6d3d1, transparent);
  margin: 40px 0;
}

/* Header Container */
.cedar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem; /* 16px top/bottom, 48px sides */
  background-color: #ffffff;
  border-bottom: 1px solid #e7e5e4; /* stone-200 */
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Logo Section */
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.brand-group:hover {
  transform: scale(1.02);
}

.logo-circle {
  width: 36px;
  height: 36px;
  background-color: #065f46; /* emerald-800 */
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #064e3b; /* emerald-900 */
  letter-spacing: -0.025em;
}

/* Center Navigation */
.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #475569; /* slate-600 */
  text-decoration: none;
  font-style: italic;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #065f46;
}

/* Specific styling for the standout "Build Your Plan" link */
.nav-links a.cta-link {
  color: #059669; /* emerald-600 */
  font-style: normal; /* Removes italic to make it stand out */
  font-weight: 600;
}

/* The Main Button */
.btn-primary {
  background-color: #065f46;
  color: #ffffff !important;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background-color: #064e3b;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Responsive: Hide nav links on small screens */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
}

/* Home.php */
/* --- NEW PLANNER DASHBOARD STYLES --- */

.planner-dashboard {
    padding-top: 40px;
    padding-bottom: 80px;
}

.planner-hero {
    text-align: center;
    margin-bottom: 48px;
}

.planner-hero h1 {
    font-size: 3rem;
    margin-bottom: 8px;
}

.planner-hero h1 span {
    color: var(--accent);
    font-weight: 400;
}

.planner-hero p {
    color: var(--muted);
    font-size: 1.1rem;
}

/* Bento Grid System */
.planner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 20px;
}

/* Specific Card Logic to avoid clashing with your existing .card */
.p-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none !important; /* Override standard link style */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.p-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.p-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transition: transform 0.6s ease;
    filter: brightness(0.6);
}

.p-card:hover .p-card-bg {
    transform: scale(1.1);
    filter: brightness(0.8);
}

/* Dark overlay for text readability */
.p-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 44, 34, 0.95) 10%, transparent 100%);
    z-index: -1;
}

.p-card-content h3 {
    color: white !important;
    font-family: 'Inter', sans-serif; /* Clean font for cards */
    font-size: 1.4rem;
    margin: 0;
}

.p-card-content p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Card Modifiers */
.p-large { grid-column: span 2; grid-row: span 2; }
.p-wide { grid-column: span 2; }
.p-logout:hover { border-color: #ef4444; }

/* Responsive Grid */
@media (max-width: 1100px) {
    .planner-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
    .planner-grid { grid-template-columns: 1fr; grid-auto-rows: 180px; }
    .p-large, .p-wide { grid-column: span 1; grid-row: span 1; }
}


/* details */
.cedar-explainer {
  background: #fafaf9; /* stone */
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 18px 0;
  max-width: 820px;
}

.cedar-explainer summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Inter', sans-serif;
}

.cedar-explainer summary::-webkit-details-marker {
  display: none;
}

.cedar-explainer-title {
  font-weight: 600;
  color: #064e3b; /* emerald */
  font-size: 1rem;
}

.cedar-explainer-hint {
  font-size: 0.85rem;
  color: #6b7280;
}

.cedar-explainer-body {
  margin-top: 14px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1f2937;
}

.cedar-explainer-body h4 {
  margin: 12px 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.cedar-explainer-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,0,0,0.08);
  font-size: 0.9rem;
  color: #374151;
}
