/* ==========================================================================
   GLOBAL & BASE STYLES
========================================================================== */

:root {
  --primary-teal: #003333;   /* Deep Brand - Headings, Footer */
  --secondary-teal: #006666; /* Action Teal - Links, Nav Hover */
  --accent-red: #993300;     /* Primary CTA - Buttons */
  --dark-red: #660000;       /* Deep Accent - Hover states, Taglines */
  --light-bg: rgba(248, 249, 250, 0.85); /* Updated to 0.85 opacity */
  --trust-bg: rgba(253, 242, 242, 0.85); /* Updated to 0.85 opacity */
  --transition: all 0.3s ease;
}


html {
  scrollbar-gutter: stable;
  scroll-padding-top: 80px; /* Prevents content from hiding behind sticky nav */
  height: 100%;
  margin: 0;
}

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

body {
  font-family: 'Gill Sans', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #ffffff;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex-grow: 1;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, li {
  list-style-type: none;
}

/* ==========================================================================
   NAVIGATION & HEADER
========================================================================== */

#navbar-placeholder {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff; /* Prevents content from showing through during scroll */
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.logo-container {
  display: flex;
  align-items: center;
  position: relative;
}

.logo-img {
  height: 50px;
  width: auto;
}

.nav-links .nav-link {
  margin-left: 2rem;
  font-weight: 500;
  color: #333;
  transition: color 0.3s ease;
  display: inline-block;
  cursor: pointer;
}

.nav-links .nav-link:hover,
.nav-links .nav-link.active {
  color: var(--secondary-teal);
  border-bottom: 2px solid var(--secondary-teal);
}

.menu-toggle {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--primary-teal);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1100;
}


/* ==========================================================================
   LAYOUT & CONTAINERS
========================================================================== */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.small-container {
  max-width: 600px;
}

.full-width {
  width: 100%;
}

/* ==========================================================================
   HEADINGS & TEXT
========================================================================== */

h1, h2, h3 {
  font-family: 'Barlow', sans-serif;
  color: var(--primary-teal);
}

p {
  margin-bottom: 1.2rem;
}

.lead-text {
  font-size: 1.25rem;
  color: var(--primary-teal);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.about-text {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

/* ==========================================================================
   HERO SECTIONS
========================================================================== */

.hero,
.mini-hero {
  padding: 2rem 2rem;
  text-align: center;
}

.hero {
  background: linear-gradient(135deg, rgba(238, 246, 247, 0.9) 0%, rgba(212, 237, 238, 0.9) 100%); /* Transparent gradient */
  line-height: 2.9rem;
}

.hero-content {
  padding-left: 10%;
  padding-right: 10%;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.hero-content .tagline {
  font-style: italic;
  color: var(--dark-red);
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   BUTTONS
========================================================================== */

.btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--accent-red);
  color: white;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--dark-red);
  box-shadow: 0 4px 15px rgba(99, 28, 30, 0.3);
  transform: translateY(-2px);
}

/* ==========================================================================
   VALUE PROPS & SERVICES GRIDS
========================================================================== */

.value-propositions,
.what-we-do,
.why-katlan,
.cta-section {
  padding: 4rem 2rem;
}

.prop-item,
.service-item {
  padding: 2rem;
  background-color: var(--light-bg);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.prop-item:hover,
.service-item:hover {
  background-color: #ffffff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-5px);
}

.proposition-grid,
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* ==========================================================================
   FOOTER
========================================================================== */

.footer {
  text-align: center;
  padding: 1.0rem;
  background-color: var(--primary-teal);
  color: white;
  margin-top: auto;
}

/* ==========================================================================
   FORMS & INPUTS
========================================================================== */

.contact-card {
  background: #ffffff;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-top: -2rem;
  position: relative;
  z-index: 10;
}

.styled-form .form-group {
  margin-bottom: 1.5rem;
}

.styled-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-teal);
}

.styled-form input,
.styled-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.styled-form input:focus,
.styled-form textarea:focus {
  outline: none;
  border-color: var(--secondary-teal);
}

/* ==========================================================================
   CHECKLIST & TRUST ELEMENTS
========================================================================== */

.checklist-section {
  background: var(--primary-teal);
  color: white;
  padding: 3rem;
  border-radius: 12px;
  margin-top: 3rem;
}

.checklist-section h2 {
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.checklist-section .katlan-values li {
  color: #eee;
}

.trust-statement {
  background: var(--trust-bg);
  border-left: 4px solid var(--accent-red);
  padding: 1.5rem;
  margin: 2rem 0;
  font-weight: 600;
  color: var(--dark-red);
}

.custom-check-list li {
  margin-bottom: 1rem !important;
}

/* ==========================================================================
   EMPTY STATE (BLOG)
========================================================================== */

.empty-state {
  text-align: center;
  padding: 5rem 0;
  color: #aaa;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   BLOG LAYOUT
========================================================================== */

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2rem;
}

.blog-card {
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
  transition: transform 0.2s ease;
}

.blog-card:last-child {
  border-bottom: none;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--secondary-teal);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

.blog-date {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   ARTICLES & MARKDOWN STYLING
========================================================================== */

.full-article-view {
  max-width: 800px;
  margin: 0 auto;
  margin-bottom: 150px;
  line-height: 1.7;
  color: #333;
  animation: fadeIn 2.4s ease-out forwards;
}

/* Headings in article */
.full-article-view h1,
.full-article-view h2,
.full-article-view h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-teal);
}

/* Paragraphs in article */
.full-article-view p {
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
}

/* Images in article */
.full-article-view img {
  display: block;
  break-inside: avoid;
  max-width: 100%;
  height: auto;
  margin: 2.5rem auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Blockquotes in article */
.full-article-view blockquote {
  border-left: 4px solid var(--secondary-teal);
  background: rgba(241, 247, 247, 0.7) !important;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  border-radius: 0 8px 8px 0;
  
  /* Prevent page splitting */
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Links in article */
.full-article-view a {
  color: var(--secondary-teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.full-article-view a:hover {
  color: var(--accent-red);
  text-decoration-thickness: 2px;
}

/* Code blocks */
pre[class*="language-"] {
  margin: 2rem 0 !important;
  border-radius: 8px;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Tables in article */
.full-article-view table {
  width: 100%;
  border-collapse: collapse !important;
  margin: 1.3rem 0;
  font-size: 0.9rem;
}

.full-article-view th {
  background-color: rgba(0, 51, 51, 0.9) !important;
  color: #ffffff;
  text-align: left;
  padding: 4px 8px;
  font-weight: 600 !important;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.full-article-view td {
  padding: 4px 8px;
  border-bottom: 2px solid #919191;
  color: #444;
}

.full-article-view tr:nth-child(even) {
  background-color: rgba(222, 227, 227, 0.6) !important; /* More transparent gray */
}

.full-article-view tr:hover {
  background-color: #f1f7f7;
}

/* Back Button (Article Navigation) */
.btn-back {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  background-color: #f4f4f4;
  border-radius: 50px;
  border: 1px solid #ddd;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background-color: var(--secondary-teal);
  color: white !important;
  border-color: var(--secondary-teal);
}

.article-nav {
  margin-bottom: 2rem;
}

.article-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  text-align: center;
}

/* ==========================================================================
   LIST STYLING (FOR ARTICLES)
========================================================================== */

.full-article-view ul,
.full-article-view ol {
  list-style-position: outside !important;
  margin-left: 1rem !important;
  margin-bottom: 1rem;
}

.full-article-view li {
  display: list-item !important;
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

/* Unordered lists */
.full-article-view ul {
  list-style-type: disc;
}

/* Ordered lists */
.full-article-view ol {
  list-style-type: decimal;
  margin-left: 2.5rem; /* Extra space for numbers */
}

/* Nested unordered lists (second level) */
.full-article-view ul ul {
  list-style-type: circle;
  margin-top: 0.5rem;
}

/* Nested ordered lists (second level) */
.full-article-view ol ol,
.full-article-view ol ul {
  margin-left: 1.2rem !important;
}

/* List markers color */
.full-article-view li::marker {
  color: var(--secondary-teal);
  font-weight: bold;
}

/* Fix for lists inside info-boxes */
.info-box ul,
.info-box ol {
  list-style-position: outside !important;
  margin-left: 1.2rem !important;
  margin-top: 0.5rem;
  margin-bottom: 0; /* Keep tight in box */
}

.info-box li {
  display: list-item;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* ==========================================================================
   INFO BOXES
========================================================================== */

.info-box {
  position: relative;
  margin: 1.5rem 0;
  padding: 1.5rem 1.5rem 1.5rem 3.5rem;
  background-color: rgba(248, 249, 250, 0.8) !important; 
  border-left: 5px solid var(--secondary-teal);
  border-radius: 4px;
  color: #333 !important;

  /* Prevent page splitting */
  break-inside: avoid;
  page-break-inside: avoid;
}

.info-box::before {
  content: "i";
  position: absolute;
  left: 1rem;
  top: 1.25rem; 
  width: 20px;
  height: 20px;
  background-color: var(--secondary-teal);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Georgia", serif;
  font-weight: bold;
  font-style: italic;
  font-size: 1.2rem;
}

.info-box p:first-child {
  margin-top: 0;
}
.info-box p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   MODAL
========================================================================== */

.modal {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background-color: rgba(0, 51, 51, 0.95);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal.is-visible {
  display: flex !important;
}

.modal-content {
  background-color: #ffffff;
  padding: 3rem;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  margin: 0 !important; 
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: var(--primary-teal);
  cursor: pointer;
  line-height: 1;
  z-index: 2100;
}

.close-modal:hover {
  color: var(--accent-red);
  transform: scale(1.1);
}

.btn-text {
  background: none;
  border: none;
  color: var(--secondary-teal);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-top: 1rem;
}

.btn-text:hover {
  color: var(--accent-red);
}

/* Modal typography */
#modal-body h1, #modal-body h2 {
  font-family: 'Barlow', sans-serif;
  color: var(--primary-teal);
  margin-bottom: 1rem;
}

#modal-body p {
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.loading-text {
  text-align: center;
  color: var(--secondary-teal);
  font-style: italic;
}

/* ==========================================================================
   BIO SECTION
========================================================================== */

.team-section {
  margin-top: 3rem;
}

.bio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.bio-card {
  background-color: var(--light-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--secondary-teal);
}

.bio-header h3 {
  margin-bottom: 0.2rem;
}

.role {
  color: var(--accent-red);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bio-photo-placeholder {
  width: 80px;
  height: 80px;
  background-color: #ddd;
  border-radius: 50%;
  margin-bottom: 1rem;
}

/* ==========================================================================
   NEW YEAR'S THEME OVERRIDES
========================================================================== */

/* Theming logic triggered via .holiday-theme class on body */

.holiday-theme {
  --primary-teal: #001f3f;   /* Midnight Blue */
  --accent-red: #d4af37;     /* Metallic Gold */
  --dark-red: #996515;       /* Golden Brown */
}

/* New Year Icons */
.holiday-theme .logo-container::after {
  content: "🎉"; 
  position: absolute;
  top: -12px;
  left: -15px;
  font-size: 1.4rem;
  transform: rotate(-15deg);
}

/* Add confetti ball before first link */
.holiday-theme .nav-links .nav-link:first-child::before {
  content: "🎊 ";
  font-size: 1.2rem;
  vertical-align: middle;
  margin-right: 5px;
}

/* Firework Particle Style */
.firework-particle {
  position: fixed;
  width: 12px; 
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10002;
  mix-blend-mode: screen; /* This makes overlapping colors "brighten" like real light */
}

.holiday-theme .info-box {
  border-left: 5px solid #d4af37; /* Gold */
  background-color: #fffdf5;    /* Very light gold tint */
}

.holiday-theme .info-box::before {
  background-color: #d4af37;
  content: "🥂"; 
  font-family: sans-serif;
}

.holiday-theme .lightrope {
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  position: fixed; /* Sticky to top */
  z-index: 2000;
  width: 100%;
  pointer-events: none;
  top: 0;
}

/* Gold/Silver Streamer Lights */
.holiday-theme .lightrope li {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 20px;
  border-radius: 50%;
  margin: 0 10px;
  background: #d4af37; /* Gold */
  box-shadow: 0px 2px 10px #d4af37;
  animation: flash-1 2s infinite;
}

.holiday-theme .lightrope li:nth-child(even) {
  background: #C0C0C0; /* Silver */
  box-shadow: 0px 2px 10px #C0C0C0;
  animation-name: flash-2;
}

@keyframes flash-1 { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes flash-2 { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ==========================================================================
   NEW YEAR ANNOUNCEMENT BANNER
========================================================================== */
/* Banner Styling */
.ny-banner {
  display: none;
  background: linear-gradient(90deg, #001f3f 0%, #003366 50%, #001f3f 100%);
  color: #d4af37;
  text-align: center;
  padding: 12px 0;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  border-bottom: 2px solid #d4af37;
  position: relative;
}

.holiday-theme .ny-banner {
  display: block;
}

.ny-banner-text {
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* Shimmer Effect across the banner 
.ny-banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}
*/


/* ==========================================================================
   ANIMATIONS
========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-content {
  display: none;
  opacity: 0;
}

.tab-content.active {
  display: block;
  animation: fade-in 0.5s ease-out forwards;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   DYNAMIC CONTENT & LOADING
========================================================================== */

#blog-dynamic-container {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  transition: min-height 0.3s ease;
}

.is-loading {
  cursor: wait;
  opacity: 0.7;
}

/* ==========================================================================
   PRINT STYLES
========================================================================== */

@media print {
  .no-print, .article-nav, .footer {
    display: none !important;
  }
  
  body {
    background-color: #d0ffff !important;
    -webkit-print-color-adjust: exact;
  }

  thead {
    display: table-header-group;
  }

  tr {
    page-break-inside: avoid;
  }
  .full-article-view {
      padding-bottom: 0.5cm; /* Add space before footer */
      margin-bottom: 1.5cm;
  }
}

/* ==========================================================================
   WATERMARK (PDF)
========================================================================== */

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/watermark.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70%;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

#pdf-watermark {
  display: none;
}


/* ==========================================================================
   IMAGE DECORATIONS (WINTER THEME)
========================================================================== */

.full-article-view img {
  position: relative;
  border: 4px solid #fff; /* Polaroid frame */
}

.full-article-view .img-container {
  position: relative;
  display: inline-block;
}

.full-article-view .img-container::after {
  content: "✨";
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 1.5rem;
  opacity: 0.8;
}

/* Mobile Menu */
@media (max-width: 768px) {
  .navbar {
    position: relative;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.mobile-active {
    display: flex;
  }

  .btn-primary {
    padding: 0px 20px;
    border-radius: 4px;
  }


  .hero-content h1 {
    font-size: 1.8rem; /* Reduced from 3rem to be more readable on mobile */
    line-height: 1.0;
    margin-bottom: 1rem; /* Added spacing for better layout */
  }
  
  .hero-content .tagline {
    font-size: 1.4rem; /* Reduced from 2.4rem for better mobile readability */
    line-height: 1.1; /* Adjusted for better line spacing on small screens */
    margin-bottom: 0.8rem; /* Reduced spacing for better vertical rhythm */
  }
  
  /* Optional: Reduce padding for better vertical space */
  .hero-content {
    padding: 0;
  }
}

