@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

/* Premium Theme Variables for The Newcomers Group */
:root {
  --font-title: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  
  --pico-font-family-sans-serif: var(--font-body);
  
  /* CA Blue Color Scheme */
  --pico-primary: #0284c7; /* Sky Blue 600 */
  --pico-primary-hover: #0369a1; /* Sky Blue 700 */
  --pico-primary-focus: rgba(2, 132, 199, 0.25);
  
  /* Theme-specific Overrides */
  --pico-background-color: #0b0f19; /* Obsidian Blue */
  --pico-color: #f1f5f9; /* Slate 100 */
  --pico-card-background-color: #151b2c; /* Slate Blue 800 */
  --pico-border-color: rgba(2, 132, 199, 0.15);
}

/* Let's configure light/dark mode properties */
@media (prefers-color-scheme: light) {
  :root {
    --pico-background-color: #f8fafc; /* Slate 50 */
    --pico-color: #0f172a; /* Slate 900 */
    --pico-card-background-color: #ffffff;
    --pico-border-color: rgba(2, 132, 199, 0.1);
  }
}

body {
  background-color: var(--pico-background-color);
  color: var(--pico-color);
  font-family: var(--font-body);
  line-height: 1.7;
}

/* Links styling with premium underline effect */
a {
  color: var(--pico-primary);
  text-decoration: underline;
  text-decoration-color: rgba(2, 132, 199, 0.3);
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--pico-primary-hover);
  text-decoration-color: var(--pico-primary-hover);
}

/* Header & Navigation */
header.container {
  padding: 1rem 0;
  border-bottom: 1px solid var(--pico-border-color);
  margin-bottom: 2rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  height: 50px;
  width: auto;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.nav-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0;
  color: var(--pico-color);
  line-height: 1.2;
}

.nav-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--pico-primary);
}

.cta-button {
  background-color: var(--pico-primary);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
  transition: all 0.2s ease;
}

.cta-button:hover {
  background-color: var(--pico-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  text-decoration: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--pico-color);
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  line-height: 1.15;
}

h2 {
  font-size: 2.25rem;
  border-bottom: 2px solid var(--pico-border-color);
  padding-bottom: 0.5rem;
  margin-top: 3rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  color: #64748b;
  font-weight: 500;
}

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
}

.hero-text h1 {
  margin-bottom: 1rem;
}

.hero-text p.subtitle {
  font-size: 1.2rem;
  color: #94a3b8;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-image img {
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  max-width: 100%;
  border: 1px solid rgba(2, 132, 199, 0.1);
}

/* Custom Grids */
.grid-2, .grid-3 {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Premium Card Design */
article.card {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-border-color);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

article.card:hover {
  transform: translateY(-4px);
  border-color: var(--pico-primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), 0 0 15px rgba(2, 132, 199, 0.2);
}

article.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

article.card p {
  font-size: 0.95rem;
  color: #94a3b8;
  flex-grow: 1;
}

/* Reading container for pages & articles */
.reading-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.reading-container p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--pico-color);
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.reading-container ul, .reading-container ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.reading-container li {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--pico-color);
}

.reading-container strong {
  color: #ffffff;
}
@media (prefers-color-scheme: light) {
  .reading-container strong {
    color: #0f172a;
  }
}

/* Sidebar Layout */
.sidebar-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.sidebar-widget {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Map Iframe wrapper */
.map-container {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--pico-border-color);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  margin: 1.5rem 0;
}

.map-container iframe {
  display: block;
  border: none;
}

/* Blog Styles */
.blog-post-card {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--pico-border-color);
  padding-bottom: 2rem;
}

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

.blog-meta {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.blog-meta span {
  margin-right: 1rem;
}

.post-featured-image {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--pico-border-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
  max-height: 400px;
  width: 100%;
  object-fit: cover;
}

/* Footer Section */
footer {
  margin-top: 5rem;
  padding: 3rem 0 2rem 0;
  border-top: 1px solid var(--pico-border-color);
  font-size: 0.9rem;
  color: #64748b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-grid h5 {
  font-family: var(--font-title);
  color: var(--pico-color);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid ul li {
  margin-bottom: 0.5rem;
}

.footer-grid ul li a {
  color: #64748b;
  text-decoration: none;
}

.footer-grid ul li a:hover {
  color: var(--pico-primary);
}

/* Mobile Menu Layout */
.mobile-hamburger-wrapper {
  display: none;
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 25, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: light) {
  .mobile-menu-drawer {
    background: rgba(248, 250, 252, 0.98);
  }
}

.mobile-menu-drawer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu-content {
  width: 100%;
  text-align: center;
  padding: 2rem;
}

.mobile-menu-links {
  list-style: none !important;
  padding: 2rem 1.5rem !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center !important;
  gap: 1.5rem !important;
}

.mobile-menu-links a {
  font-family: var(--font-title);
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-decoration: none !important;
  transition: all 0.2s ease-in-out;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  color: var(--pico-primary) !important;
}

body.menu-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
}

/* Responsiveness adjustments */
@media (max-width: 992px) {
  .desktop-menu {
    display: none !important;
  }

  .mobile-hamburger-wrapper {
    display: flex !important;
    align-items: center;
  }

  .hamburger-btn {
    display: block !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1000;
    padding: 0;
    box-shadow: none !important;
    outline: none !important;
  }

  .hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--pico-primary);
    position: absolute;
    left: 11px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .hamburger-line:nth-child(1) { top: 16px; }
  .hamburger-line:nth-child(2) { top: 22px; }
  .hamburger-line:nth-child(3) { top: 28px; }

  .hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
    background-color: var(--pico-primary);
  }

  .hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    background-color: var(--pico-primary);
  }
}

@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-image {
    order: -1;
  }

  h1 {
    font-size: 2.2rem;
  }

  .sidebar-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
