/* =====================================================
   Botanica Condominium — WordPress Theme CSS
   Fonts: Cormorant Garamond + Source Sans 3
   ===================================================== */
:root {
  --green:  #2d5a27;
  --green2: #4a7c3f;
  --gold:   #b8860b;
  --gold2:  #d4a017;
  --cream:  #faf8f2;
  --white:  #ffffff;
  --dark:   #1a1a1a;
  --mid:    #555555;
  --light:  #e8e4d9;
  --border: #d5d0c4;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --nav-h:  70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--wp--preset--font-family--body, 'Source Sans 3', 'Segoe UI', sans-serif);
  background: var(--cream);
  color: var(--dark);
  line-height: 1.65;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--wp--preset--font-family--heading, 'Cormorant Garamond', Georgia, serif);
  line-height: 1.25;
  color: var(--green);
}
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.25rem; }
p  { margin-bottom: .85rem; }
a  { color: var(--green2); }
a:hover { text-decoration: underline; }

/* ── Skip link ────────────────────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: static; width: auto; height: auto;
  background: var(--gold); color: white; padding: .5rem 1rem;
}

/* ── Layout ───────────────────────────────────────── */
.container        { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.container.narrow { max-width: 560px;  margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Site Header ──────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--green);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.site-header__inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: .75rem; color: white; text-decoration: none; }
.site-logo:hover { text-decoration: none; }
.logo-leaf { font-size: 1.8rem; }
.logo-name { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 700; color: white; letter-spacing: .03em; }
.logo-tag  { display: block; font-size: .72rem; color: #b8ddb4; letter-spacing: .05em; }
.site-logo .custom-logo { max-height: 50px; width: auto; }

/* Nav */
.site-nav { display: flex; align-items: center; gap: 1rem; }
.nav-list, .site-nav ul { display: flex; list-style: none; gap: .25rem; align-items: center; margin: 0; padding: 0; }
.nav-list a, .site-nav ul a {
  color: #d4f0d0; font-size: .9rem; padding: .4rem .7rem; border-radius: 4px;
  transition: background .2s, color .2s; text-decoration: none;
}
.nav-list a:hover,
.nav-list .current-menu-item > a,
.nav-list li.current-menu-item > a { background: rgba(255,255,255,.12); color: white; }

.nav-user-area { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }
.nav-resident-name { color: #b8ddb4; font-size: .85rem; padding: .4rem .6rem; }
.nav-link-logout   { color: #b8ddb4; font-size: .85rem; padding: .4rem .6rem; border-radius: 4px; text-decoration: none; }
.nav-link-logout:hover { background: rgba(255,255,255,.12); color: white; }

.btn-login {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  color: white !important; padding: .4rem .8rem; border-radius: 4px;
  font-size: .88rem; text-decoration: none; transition: background .2s;
}
.btn-login:hover { background: rgba(255,255,255,.25); text-decoration: none; }

.btn-admin {
  background: var(--gold); color: var(--dark) !important; font-weight: 600;
  padding: .4rem .8rem; border-radius: 4px; font-size: .85rem; text-decoration: none;
}
.btn-admin:hover { background: var(--gold2); text-decoration: none; }

/* Mobile toggle */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: .5rem;
}
.nav-toggle__bar { display: block; width: 24px; height: 2px; background: white; transition: transform .3s; }

/* ── Hero ─────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green2) 60%, #4a8a3f 100%);
  padding: 3.5rem 1.5rem; text-align: center;
}
.hero-inner { max-width: 700px; margin: 0 auto; }
.hero-inner h1 { color: white; font-size: clamp(2rem, 5vw, 3rem); }
.hero-sub { color: #c8e6c2; font-size: 1.1rem; margin-top: .5rem; font-style: italic; }

/* ── Page title ───────────────────────────────────── */
.page-title {
  margin-bottom: 1.25rem; padding-bottom: .5rem;
  border-bottom: 2px solid var(--gold); color: var(--green);
}

/* ── Notice cards ─────────────────────────────────── */
.notice-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1rem; box-shadow: var(--shadow);
  border-left: 4px solid var(--border); transition: border-color .2s;
}
.notice-card:hover { border-left-color: var(--green); }
.notice-card.pinned { border-left-color: var(--gold); background: #fffdf4; }
.notice-card h2, .notice-card h3 { margin-bottom: .3rem; font-size: 1.15rem; }
.notice-card h2 a, .notice-card h3 a { color: var(--green); }
.notice-date, .meta { font-size: .85rem; color: var(--mid); margin-bottom: .5rem; }

.pin-badge {
  display: inline-block; font-size: .75rem; background: var(--gold); color: white;
  padding: .1em .6em; border-radius: 3px; margin-bottom: .4rem; font-weight: 600;
}

.notice-full { background: white; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.read-more, .btn-more { font-size: .9rem; color: var(--green2); font-weight: 600; }

.content-body { line-height: 1.75; }
.content-body h2, .content-body h3 { margin: 1.5rem 0 .5rem; }
.content-body ul, .content-body ol { padding-left: 1.5rem; margin-bottom: .85rem; }
.content-body p { margin-bottom: .85rem; }

/* ── File lists (Forms / Documents) ──────────────── */
.doc-category { margin-bottom: 2.5rem; }
.doc-category h2 {
  color: var(--green); font-size: 1.3rem; border-bottom: 1px solid var(--border);
  padding-bottom: .4rem; margin-bottom: 1rem;
}
.file-list { display: flex; flex-direction: column; gap: .6rem; }
.file-row {
  display: flex; align-items: center; gap: 1rem; background: white;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem 1.1rem; box-shadow: var(--shadow);
}
.file-icon { font-size: 1.6rem; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-info strong { display: block; color: var(--dark); }
.file-info p { margin: .2rem 0 0; font-size: .88rem; color: var(--mid); }
.file-meta {
  font-size: .78rem; color: var(--mid); display: inline-block; margin-top: .2rem;
  background: var(--light); padding: .1em .5em; border-radius: 3px;
}
.file-actions { display: flex; gap: .5rem; flex-shrink: 0; }

.btn-download, .btn-view {
  padding: .4rem .9rem; border-radius: 4px; font-size: .85rem;
  font-weight: 600; white-space: nowrap; text-decoration: none;
}
.btn-download { background: var(--green); color: white; }
.btn-download:hover { background: var(--green2); text-decoration: none; color: white; }
.btn-view { background: var(--light); color: var(--dark); border: 1px solid var(--border); }
.btn-view:hover { background: var(--border); text-decoration: none; }

/* ── Maintenance articles ─────────────────────────── */
.article-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem;
}
.article-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; box-shadow: var(--shadow);
}
.article-card h3 { font-size: 1.05rem; margin: .5rem 0 .4rem; }
.article-card h3 a { color: var(--green); }

.type-badge {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: .15em .6em; border-radius: 3px;
}
.type-tip         { background: #e8f5e9; color: #2d5a27; }
.type-update      { background: #e3f2fd; color: #1565c0; }
.type-instruction { background: #fce4ec; color: #880e4f; }
.type-seasonal    { background: #e8eaf6; color: #3949ab; }

/* ── Calendar ─────────────────────────────────────── */
.calendar-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; }

.cal-nav {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem;
}
.cal-nav a {
  color: var(--green); font-weight: 600; padding: .4rem .8rem;
  background: white; border: 1px solid var(--border); border-radius: 4px; text-decoration: none;
}
.cal-nav a:hover { background: var(--light); text-decoration: none; }
.cal-nav h2 { color: var(--green); font-size: 1.4rem; }

.cal-table {
  width: 100%; border-collapse: collapse; background: white;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.cal-table th {
  background: var(--green); color: white; padding: .6rem;
  font-weight: 600; font-size: .85rem; text-align: center;
}
.cal-table td {
  vertical-align: top; padding: .4rem .5rem;
  border: 1px solid var(--light); height: 80px; width: 14.28%;
}
.cal-table td.cal-empty  { background: #f9f7f2; }
.cal-table td.cal-today  { background: #f0faf0; }
.cal-daynum {
  font-size: .8rem; color: var(--mid); display: block; text-align: right; margin-bottom: .2rem;
}
.cal-today .cal-daynum { font-weight: 700; color: var(--green); }
.cal-event {
  font-size: .72rem; color: white; padding: .15em .4em; border-radius: 3px;
  margin-bottom: .15rem; line-height: 1.3; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

.calendar-sidebar {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; box-shadow: var(--shadow); align-self: start;
}
.calendar-sidebar h3 {
  color: var(--green); margin-bottom: 1rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-event {
  display: flex; gap: .75rem; align-items: flex-start;
  margin-bottom: .9rem; padding-bottom: .9rem; border-bottom: 1px solid var(--light);
}
.sidebar-event:last-child { border-bottom: none; margin-bottom: 0; }

.event-date-badge {
  background: var(--green); color: white; border-radius: 6px;
  width: 44px; height: 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.edb-month { font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; }
.edb-day   { font-size: 1.2rem; font-weight: 700; line-height: 1; }

.event-row        { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .75rem; }
.event-info       { display: flex; flex-direction: column; font-size: .9rem; }
.event-info span  { color: var(--mid); font-size: .82rem; }

/* ── Homepage ─────────────────────────────────────── */
.home-welcome {
  background: white; border-radius: var(--radius); padding: 1.5rem 2rem;
  margin-bottom: 2rem; border-left: 4px solid var(--gold); box-shadow: var(--shadow);
}
.home-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.home-notices h2, .home-events h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.home-notices h2 a, .home-events h2 a { color: var(--green); text-decoration: none; }

.quick-links {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem;
}
.quick-links a {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; text-align: center; font-size: 1rem; color: var(--dark);
  font-weight: 600; box-shadow: var(--shadow); text-decoration: none;
  transition: transform .15s, box-shadow .15s; display: block;
}
.quick-links a:hover {
  transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.12);
  text-decoration: none;
}
.quick-links a span { display: block; font-size: 1.8rem; margin-bottom: .4rem; }

/* ── Contact ──────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.contact-form label { display: block; font-weight: 600; margin: .8rem 0 .2rem; }
.contact-form input,
.contact-form textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 4px;
  padding: .6rem .8rem; font-size: 1rem; font-family: inherit; background: white;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--green); border-color: var(--green); }
.contact-info {
  background: white; border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); align-self: start;
}
.contact-info h2 { margin-bottom: 1rem; }
.contact-info dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.contact-info dt { font-weight: 700; color: var(--green); }
.btn-map {
  display: inline-block; margin-top: 1.2rem; background: var(--green); color: white;
  padding: .6rem 1.2rem; border-radius: 4px; font-weight: 600; text-decoration: none;
}
.btn-map:hover { background: var(--green2); text-decoration: none; color: white; }

/* ── Auth forms ───────────────────────────────────── */
.auth-form {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow);
}
.auth-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.auth-form input {
  width: 100%; border: 1px solid var(--border); border-radius: 4px;
  padding: .7rem .9rem; font-size: 1rem; margin-bottom: 1rem; font-family: inherit;
}
.auth-form input:focus { outline: 2px solid var(--green); }

/* ── Alerts ───────────────────────────────────────── */
.alert {
  padding: .85rem 1.2rem; border-radius: var(--radius);
  margin-bottom: 1.2rem; font-weight: 500;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.empty { color: var(--mid); font-style: italic; padding: 1rem 0; }

/* ── Buttons ──────────────────────────────────────── */
.btn-primary {
  display: inline-block; background: var(--green); color: white; font-weight: 600;
  padding: .6rem 1.4rem; border-radius: 4px; border: none; cursor: pointer;
  font-size: 1rem; font-family: inherit; text-decoration: none; transition: background .2s;
}
.btn-primary:hover { background: var(--green2); text-decoration: none; color: white; }

.btn-secondary {
  display: inline-block; background: white; color: var(--dark); font-weight: 600;
  padding: .6rem 1.4rem; border-radius: 4px; border: 1px solid var(--border);
  cursor: pointer; font-size: 1rem; font-family: inherit; text-decoration: none;
}
.btn-secondary:hover { background: var(--light); text-decoration: none; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Breadcrumb ───────────────────────────────────── */
.breadcrumb { font-size: .9rem; margin-bottom: 1.25rem; color: var(--mid); }
.breadcrumb a { color: var(--green2); }

/* ── Footer ───────────────────────────────────────── */
.site-footer { background: var(--green); color: #b8ddb4; margin-top: 4rem; }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem;
}
.footer-col h4    { color: white; font-size: 1rem; margin-bottom: .75rem; }
.footer-col p,
.footer-col li    { font-size: .88rem; margin-bottom: .3rem; }
.footer-col a     { color: #c8e6c2; }
.footer-col a:hover { color: white; }
.footer-col address { font-style: normal; }
.footer-nav-list  { list-style: none; padding: 0; margin: 0; }
.footer-copy {
  text-align: center; padding: 1rem; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .82rem; color: rgba(255,255,255,.5);
}

/* ── WP Pagination ────────────────────────────────── */
.nav-links { display: flex; gap: .5rem; margin-top: 2rem; flex-wrap: wrap; }
.nav-links a,
.nav-links span {
  padding: .4rem .8rem; background: white; border: 1px solid var(--border);
  border-radius: 4px; color: var(--dark); text-decoration: none;
}
.nav-links .current { background: var(--green); color: white; border-color: var(--green); }
.nav-links a:hover { background: var(--light); text-decoration: none; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .home-grid        { grid-template-columns: 1fr; }
  .calendar-layout  { grid-template-columns: 1fr; }
  .contact-layout   { grid-template-columns: 1fr; }
  .quick-links      { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--green); padding: 1rem;
    flex-direction: column; align-items: flex-start;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
  }
  .site-header.nav-open .site-nav { display: flex; }

  .nav-list, .site-nav ul { flex-direction: column; width: 100%; gap: 0; }
  .nav-list li, .site-nav ul li { width: 100%; }
  .nav-list a, .site-nav ul a { display: block; padding: .65rem 1rem; }

  .nav-user-area {
    flex-direction: column; align-items: flex-start;
    width: 100%; margin: .5rem 0 0; padding-top: .5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    gap: .4rem;
  }

  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .form-row    { grid-template-columns: 1fr; }

  .file-row    { flex-wrap: wrap; }
  .file-actions { width: 100%; justify-content: flex-end; margin-top: .5rem; }

  .cal-table td { height: 55px; }
  .cal-event    { font-size: .65rem; }

  .article-grid { grid-template-columns: 1fr; }
}

/* ── Event Detail Modal ──────────────────────────── */
.bc-event-trigger {
  cursor: pointer;
}
.bc-event-trigger:focus {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.bc-modal {
  margin: auto;
  border: none;
  border-radius: 8px;
  padding: 0;
  max-width: 480px;
  width: calc(100% - 2rem);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.bc-modal::backdrop {
  background: rgba(0,0,0,.55);
}
.bc-modal-inner {
  padding: 1.75rem 1.75rem 1.5rem;
  position: relative;
}
.bc-modal-close {
  position: absolute;
  top: .75rem;
  right: .9rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
  padding: 0 .25rem;
}
.bc-modal-close:hover { color: #000; }
.bc-modal-event-title {
  margin: 0 2rem .75rem 0;
  font-size: 1.25rem;
  color: #2d5a27;
}
.bc-modal-details {
  margin: 0 0 .75rem;
  display: grid;
  row-gap: .35rem;
}
.bc-modal-row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: .25rem;
}
.bc-modal-row dt {
  font-weight: 600;
  color: #555;
  font-size: .875rem;
}
.bc-modal-row dd {
  margin: 0;
  font-size: .9rem;
}
.bc-modal-desc {
  margin: .75rem 0 0;
  font-size: .9rem;
  color: #333;
  border-top: 1px solid #eee;
  padding-top: .75rem;
  white-space: pre-wrap;
}
