/*
Theme Name:  VitroREIT Child Theme
Template:    twentytwentyone
Version:     1.0.0
Description: WordPress child theme for VitroREIT — VITRO Inc. investor relations portal.
Author:      VITRO Inc.
Text Domain: vitrodc-reit
*/

/* --- Brand Color Tokens ------------------------------------ */
:root {
  --color-brand-blue: #04275d;
  --color-brand-gold: #d4af37;
  --color-bg-white: #ffffff;
  --color-bg-footer: #111827;
}

/* --- Tailwind arbitrary-value helpers ---------------------- */
@layer utilities {
  .text-brand-blue {
    color: var(--color-brand-blue);
  }
  .text-brand-gold {
    color: var(--color-brand-gold);
  }
  .bg-brand-blue {
    background-color: var(--color-brand-blue);
  }
  .bg-brand-gold {
    background-color: var(--color-brand-gold);
  }
  .border-brand-blue {
    border-color: var(--color-brand-blue);
  }
  .ring-brand-blue {
    --tw-ring-color: var(--color-brand-blue);
  }
  .focus\:ring-brand-blue:focus {
    --tw-ring-color: var(--color-brand-blue);
  }
}

/* --- Base Typography --------------------------------------- */
/* Override TT1's --global--font-size--base CSS custom property so any
   var() references in the parent theme resolve to our intended value. */
:root {
  --global--font-size--base: 1rem;
  --wp--preset--font-size--normal: 1rem;
}

html {
  font-family:
    'Montserrat',
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px !important;
  line-height: 1.75;
  color: #111827;
}

body {
  margin: 0;
  font-family: inherit;
  font-size: 1rem !important;
  line-height: inherit;
  color: inherit;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: inherit;
  color: #04275d;
  line-height: 1.15;
  margin-top: 0;
}

.font-montserrat {
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
}

/* --- List reset ----------------------------------------- */
/* Only reset lists in footer, sidebar, and navbar—keep prose lists styled.
   [role="navigation"] only matches elements with an *explicit* role attr;
   <nav> elements use the implicit role, so we must target the nav tag. */
footer ul,
footer ol,
nav ul,
nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

li {
  display: block;
}

/* --- Smooth scroll ----------------------------------------- */

/* --- WordPress button reset (nav) --------------------------
   Neutralises Twenty Twenty-One / block-editor defaults that
   add backgrounds, outlines, and box-shadows to <button>.      */

/* Kill browser/WP appearance and padding */
#site-header button,
#site-header button:hover,
#site-header button:active,
#site-header button:focus,
#site-header button:focus-visible {
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0;
  cursor: pointer;
  /* color intentionally omitted — natural inheritance passes text-gray-700
     from the parent <ul> and lets Tailwind color classes take effect */
}

/* Force dark text and correct size on desktop nav parent items — overrides TT1 theme rules */
#site-header #primary-menu button,
#site-header #primary-menu > li > a {
  color: #1f2937 !important; /* gray-800 */
  font-size: 14px !important;
}

/* Active parent: primary blue when the current page sits under that menu item.
   Higher specificity than the gray rule above, so !important wins here too. */
#site-header #primary-menu .current-menu-item > button,
#site-header #primary-menu .current-menu-parent > button,
#site-header #primary-menu .current-menu-ancestor > button,
#site-header #primary-menu .current-menu-item > a,
#site-header #primary-menu .current-menu-parent > a,
#site-header #primary-menu .current-menu-ancestor > a {
  color: #04275d !important;
}

/* Mobile nav parent buttons — restore 10px padding zeroed by button reset above */
#mobile-menu-list > li > button,
#mobile-menu-list > li > a {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  color: #1f2937 !important;
}

/* Primary blue on all nav menu item hovers */
#primary-menu button:hover,
#primary-menu a:hover,
#mobile-menu-list button:hover,
#mobile-menu-list a:hover {
  color: #04275d !important;
}

/* Kill WP focus rings on all nav interactive elements */
#site-header a:focus,
#site-header a:focus-visible,
#site-header button:focus,
#site-header button:focus-visible,
#site-header [role="menuitem"]:focus,
#site-header [role="menuitem"]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Prevent Twenty Twenty-One from re-colouring nav links on :focus */
#site-header a:focus,
#site-header a:focus-visible {
  text-decoration: none;
}

/* --- Page content typography ------------------------------- */
.prose {
  color: #111827 !important;
}

.prose p,
.prose ul,
.prose ol,
.prose table {
  margin-top: 0 !important;
  margin-bottom: 1.25rem !important;
}

.prose p,
.prose li,
.prose td {
  font-size: 1rem !important;
  line-height: 1.75 !important;
  color: inherit !important;
}

.prose ul,
.prose ol {
  padding-left: 1.75rem !important;
  margin-top: 0 !important;
  margin-bottom: 1.25rem !important;
  list-style-position: outside !important;
  font-size: 1rem !important;
  line-height: 1.75 !important;
  color: inherit !important;
}

.prose ul {
  list-style-type: disc !important;
}

.prose ol {
  list-style-type: decimal !important;
}

.prose ul li,
.prose ol li {
  display: list-item !important;
  font-size: 1rem !important;
  line-height: 1.75 !important;
  color: inherit !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0 !important;
}

.prose ul li::marker,
.prose ol li::marker {
  color: inherit !important;
  font-size: 1rem !important;
}

.prose ul li::marker,
.prose ol li::marker {
  color: #111827 !important;
  font-size: 1rem !important;
}

/* --- Page content heading color & spacing (admin controls size via editor) --- */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: #04275d !important;
}

.prose h1 {
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
}

.prose h2 {
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
}

.prose h3 {
  margin-top: 2rem !important;
  margin-bottom: 0.75rem !important;
}

.prose h4 {
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* --- Hero carousel animation ------------------------------- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-anim {
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Disclosures Accordion ──────────────────────────────────── */
.disclosures-accordion {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.disclosures-accordion__group + .disclosures-accordion__group {
  border-top: 2px solid #e0e0e0;
}

.disclosures-accordion__year-toggle {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: #808080;
  color: #ffffff;
  border: none;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: background 0.15s;
}

.disclosures-accordion__year-toggle:hover {
  background: #6b6b6b;
}

.disclosures-accordion__year-label {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.disclosures-accordion__year-icon {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
}

.disclosures-accordion__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  gap: 16px;
}

.disclosures-accordion__row:nth-child(odd) {
  background: #ffffff;
}

.disclosures-accordion__row:nth-child(even) {
  background: #f0f0f0;
}

.disclosures-accordion__row-info {
  flex: 1;
  min-width: 0;
}

.disclosures-accordion__title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  color: #333333;
  line-height: 1.4;
}

.disclosures-accordion__date {
  font-size: 13px;
  color: #888888;
  margin-top: 4px;
}

.disclosures-accordion__row-action {
  flex-shrink: 0;
}

.disclosures-accordion__btn {
  display: inline-block;
  background: linear-gradient(to bottom, #f7071e, #af0520);
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: box-shadow 0.15s, opacity 0.15s;
}

.disclosures-accordion__btn:hover {
  box-shadow: 0 10px 15px -3px rgba(220,38,38,0.5), 0 4px 6px -4px rgba(220,38,38,0.5);
  color: #ffffff !important;
}

/* Mobile: stack action button below title */
@media (max-width: 640px) {
  .disclosures-accordion__row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Cookie / Privacy Banner ────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: #04275d;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner--visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cookie-banner__badge {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
}

.cookie-banner__badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cookie-banner__content {
  flex: 1;
  min-width: 0;
}

.cookie-banner__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.cookie-banner__text {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0;
}

.cookie-banner__text a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__text a:hover {
  color: #d4af37;
}

.cookie-banner__action {
  flex-shrink: 0;
}

/* Matches navbar CTA button style */
.cookie-banner__btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: #ffffff;
  background: linear-gradient(to bottom, #f7071e, #af0520);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: box-shadow 0.2s;
}

.cookie-banner__btn:hover {
  box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.5), 0 4px 6px -4px rgba(220, 38, 38, 0.5);
}

.cookie-banner__btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Mobile: stack vertically */
@media (max-width: 640px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1rem;
  }

  .cookie-banner__badge {
    width: 48px;
    height: 48px;
  }

  .cookie-banner__action {
    width: 100%;
  }

  .cookie-banner__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── WordPress Block Editor Button Override ─────────────────── */
/* Targets buttons inserted via the block editor (Button block).
   !important is required because WordPress injects inline styles
   on .wp-element-button that would otherwise win the cascade.    */
.wp-block-button__link,
.wp-element-button {
  background: linear-gradient(to bottom, #f7071e, #af0520) !important;
  background-color: transparent !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 10px 28px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.025em !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: box-shadow 0.2s !important;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  background: linear-gradient(to bottom, #f7071e, #af0520) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.5), 0 4px 6px -4px rgba(220, 38, 38, 0.5) !important;
  text-decoration: none !important;
}

.wp-block-button__link:focus-visible,
.wp-element-button:focus-visible {
  outline: 2px solid #04275d !important;
  outline-offset: 2px !important;
}

#about-reit {
  background-color: #f5f5f5;
}
