/* Base semantics & Variables */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-primary: #0f766e; /* Teal 700 - WCAG AAA */
  --color-primary-dark: #115e59; /* Teal 800 - WCAG AAA */
  --color-secondary: #0f172a; /* Slate 900 */
  --color-secondary-light: #1e293b; /* Slate 800 */
  --color-bg-body: #f4f4f4;
  --color-bg-white: #ffffff;
  --color-text-main: #333333;
  --color-text-muted: #666666;
  --color-border: #e5e7eb;

  --container-width: 1200px;
  --container-padding: 1rem;
}

html, body {
  margin: 0;
  padding: 0;
}

.app-container {
  min-height: 100vh;
  background-color: var(--color-bg-body);
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: var(--color-text-main);
  line-height: 1.6;
}

.content-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Page Loader */
.page-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5rem 0;
}
.loader-spinner {
  animation: spin 1s linear infinite;
  border: 2px solid transparent;
  border-bottom-color: var(--color-primary);
  border-radius: 50%;
  height: 3rem;
  width: 3rem;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Helper Utilities (Replaced with semantic variations later) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* Header */
.site-header {
  background-color: var(--color-bg-white);
  border-bottom: 4px solid var(--color-secondary);
  padding: 1rem 0;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) {
  .site-header { padding: 1.5rem 0; }
}

.header-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .header-inner { flex-direction: row; }
}

.header-brand-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  text-align: center;
}
@media (min-width: 768px) {
  .header-brand-link { flex-direction: row; text-align: left; }
}

.header-brand-icon {
  color: var(--color-secondary);
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .header-brand-icon { width: 2.5rem; height: 2.5rem; }
}

.header-brand-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-secondary);
  letter-spacing: -0.025em;
}
@media (min-width: 768px) {
  .header-brand-title { font-size: 1.875rem; }
}

.header-brand-slogan {
  font-size: 0.625rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}
@media (min-width: 768px) {
  .header-brand-slogan { font-size: 0.875rem; }
}

.header-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .header-contact { align-items: flex-end; text-align: right; }
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 1.125rem;
}
@media (min-width: 768px) {
  .header-phone { font-size: 1.25rem; }
}
.header-phone-icon {
  width: 18px; height: 18px;
}
.header-consult-text {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
  margin: 0;
}

/* Nav */
.site-nav {
  background-color: var(--color-secondary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}
@media (min-width: 768px) {
  .nav-mobile-header { display: none; }
}
.nav-mobile-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-toggle-btn {
  background: none;
  border: none;
  color: white;
  padding: 0.25rem;
  cursor: pointer;
  transition: color 0.3s;
}
.nav-toggle-btn:hover {
  color: var(--color-primary);
}
.nav-toggle-btn:focus-visible,
.nav-link:focus-visible,
.nav-dropdown-toggle:focus-visible,
.nav-dropdown-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.nav-menu {
  display: none;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.875rem;
  list-style: none;
  margin: 0;
  transition: all 0.3s ease-in-out;
}
.nav-menu.nav-menu-open {
  display: flex;
}
@media (min-width: 768px) {
  .nav-menu {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    padding: 0.75rem 0;
    align-items: center;
  }
}

.nav-item {
  width: 100%;
  position: relative;
}
@media (min-width: 768px) {
  .nav-item { width: auto; }
}

.nav-link {
  display: block;
  padding: 0.5rem 0;
  color: white;
  text-decoration: none;
  transition: color 0.3s, border-color 0.3s;
  border-bottom: 2px solid transparent;
}
@media (min-width: 768px) {
  .nav-link { padding: 0; }
}
.nav-link:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: white;
  font: inherit;
  cursor: pointer;
  padding: 0.5rem 0;
  text-transform: inherit;
  transition: color 0.3s;
}
@media (min-width: 768px) {
  .nav-dropdown-toggle {
    justify-content: flex-start;
    width: auto;
    padding: 0 0 0.25rem 0;
    gap: 0.25rem;
  }
}
.nav-dropdown-toggle:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.nav-dropdown-toggle[aria-expanded="true"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.nav-dropdown-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background-color: var(--color-secondary-light);
  border-left: 4px solid var(--color-primary);
}
.nav-item.dropdown:hover .nav-dropdown-menu,
.nav-item.dropdown:focus-within .nav-dropdown-menu,
.nav-item.dropdown.dropdown-open .nav-dropdown-menu {
  display: block;
}
@media (min-width: 768px) {
  .nav-dropdown-menu {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0;
    width: 16rem;
    background-color: var(--color-secondary);
    border-left: none;
    border: 1px solid #374151;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    z-index: 50;
  }
}

.nav-dropdown-link {
  display: block;
  padding: 0.5rem 1.5rem;
  color: white;
  text-decoration: none;
  font-size: 0.75rem;
  transition: all 0.3s;
  text-transform: none;
}
@media (min-width: 768px) {
  .nav-dropdown-link { padding: 0.5rem 1rem; }
}
.nav-dropdown-link:hover {
  background-color: var(--color-primary);
  color: white;
}

/* Main Layout */
.site-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 0;
}
@media (min-width: 1024px) {
  .site-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
    padding: 3rem 0;
  }
}

.main-content {
  width: 100%;
}
@media (min-width: 1024px) {
  .main-content {
    width: auto;
    grid-column: span 3 / span 3;
  }
}

.main-sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
  border-top: 2px solid var(--color-border);
  padding-top: 2rem;
}
@media (min-width: 1024px) {
  .main-sidebar {
    width: auto;
    grid-column: span 1 / span 1;
    margin-top: 0;
    border-top: none;
    padding-top: 0;
  }
}

/* Sidebar Widgets */
.sidebar-widget {
  background-color: var(--color-bg-white);
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  border: 1px solid var(--color-border);
}
.sidebar-widget-dark {
  background-color: var(--color-secondary);
  color: white;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.sidebar-widget-title {
  font-size: 1.125rem;
  font-weight: 600;
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 0.5rem;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
}
.sidebar-widget-dark .sidebar-widget-title {
  border-bottom-color: white;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.sidebar-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-main);
  transition: color 0.3s;
}
.sidebar-list-item:hover { color: var(--color-primary); cursor: pointer; }
.sidebar-list-icon { transition: transform 0.3s; width: 14px; height: 14px; }
.sidebar-list-item:hover .sidebar-list-icon { transform: translateX(0.25rem); }

.sidebar-list-link {
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.sidebar-contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.875rem;
}
.sidebar-contact-item {
  display: flex;
  gap: 0.75rem;
}
.sidebar-contact-icon { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-contact-btn {
  width: 100%;
  margin-top: 1.5rem;
  background-color: var(--color-bg-white);
  color: var(--color-secondary);
  border: none;
  padding: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s;
}
.sidebar-contact-btn:hover { background-color: #f3f4f6; }

.sidebar-article-item { cursor: pointer; }
.sidebar-article-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  transition: color 0.3s;
  color: var(--color-text-main);
}
.sidebar-article-item:hover .sidebar-article-title { color: var(--color-primary); }
.sidebar-article-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0.25rem 0 0 0;
}

/* Footer */
.site-footer {
  background-color: var(--color-secondary);
  color: white;
  padding-top: 3rem;
  padding-bottom: 3rem;
  margin-top: 3rem;
  border-top: 8px solid var(--color-primary);
}

.footer-grid {
  display: grid;
  gap: 3rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.footer-col-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 0;
}
.footer-text {
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0;
}
.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #9ca3af;
}
.footer-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s;
}
.footer-link:hover { color: white; }

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af; /* gray-400 for better dark bg contrast */
}
.footer-copyright { margin: 0; }

/* Inline Pages Generic (Will be refactored, just minimal required to not break completely until they are edited) */
.page-hero {
  background: linear-gradient(to right, var(--color-secondary), var(--color-secondary-light));
  color: white;
  padding: 3rem 0;
  border-bottom: 8px solid var(--color-primary);
  text-align: center;
}
@media (min-width: 768px) {
  .page-hero { padding: 4rem 0; }
}
.page-hero-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .page-hero-title { font-size: 3rem; }
}
.page-hero-title-highlight { color: var(--color-primary); }
.page-hero-subtitle {
  font-size: 1.125rem;
  margin: 0 auto 2rem auto;
  max-width: 42rem;
  opacity: 0.9;
}
@media (min-width: 768px) {
  .page-hero-subtitle { font-size: 1.25rem; }
}
.page-hero-btn {
  background-color: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 2px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
@media (min-width: 768px) {
  .page-hero-btn { padding: 1rem 2rem; font-size: 1.125rem; }
}
.page-hero-btn:hover { background-color: var(--color-primary-dark); }

.page-breadcrumb-banner {
  background-color: var(--color-secondary);
  color: white;
  padding: 1.5rem 0;
  border-bottom: 4px solid var(--color-primary);
}
.page-breadcrumb-text {
  font-size: 0.875rem;
  opacity: 0.7;
  margin: 0;
}
