/* LTAWNT Website - Base Styles */
/* Theme variables are defined in design1/theme.css or design2/theme.css */

:root {
  --max-width: 1200px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

html.font-size-smallest {
  font-size: 12px;
}

html.font-size-small {
  font-size: 14px;
}

html.font-size-large {
  font-size: 18px;
}

html.font-size-largest {
  font-size: 20px;
}

html.letter-spacing-wide body,
html.letter-spacing-wide body * {
  letter-spacing: 0.12em;
}

html.letter-spacing-wide body {
  word-spacing: 0.16em;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

html.layout-wide .container {
  max-width: 95%;
}

.top-stripe {
  height: 4px;
  background: var(--color-primary);
  width: 100%;
}

.top-bar {
  background: var(--top-bar-bg, #1a1a1a);
  color: white;
  padding: var(--spacing-xs) 0;
  font-size: 0.9rem;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.top-bar-left {
  display: flex;
  align-items: center;
}

.social-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s, transform 0.2s;
}

.social-link:hover {
  color: white;
  transform: translateY(-1px);
}

.social-link i,
.social-link .fa {
  font-size: 1.125rem;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-left: auto;
}

.top-bar-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.top-bar-search-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.15);
}

.top-bar-search-btn.active {
  color: white;
  background: rgba(255, 255, 255, 0.2);
}

.top-bar-search-btn i,
.top-bar-search-btn .fa {
  font-size: 1.125rem;
}

.top-bar-dropdowns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-bar-dropdown-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.top-bar-select {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  cursor: pointer;
}

.top-bar-select:hover,
.top-bar-select:focus {
  background: rgba(255, 255, 255, 0.25);
  outline: none;
}

.top-bar-select option {
  background: var(--nav-dropdown-bg, #333);
  color: white;
}

.go-to-top i,
.go-to-top .fa {
  font-size: 1.25rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.lang-btn:hover {
  color: white;
}

.lang-btn.active {
  color: white;
  text-decoration: underline;
}

.lang-sep {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
}

.font-size-toggle {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.font-size-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.font-size-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.15);
}

.font-size-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.font-size-reset {
  font-size: 0.85rem;
}

.letter-spacing-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.letter-spacing-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.15);
}

.letter-spacing-btn[aria-pressed="true"] {
  color: white;
  background: rgba(255, 255, 255, 0.25);
}

.layout-wide-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  font-size: 1rem;
  line-height: 1;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.layout-wide-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.15);
}

.layout-wide-btn[aria-pressed="true"] {
  color: white;
  background: rgba(255, 255, 255, 0.25);
}

.site-header {
  background: var(--header-bg);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
  border-bottom: var(--header-border-width) solid var(--header-border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
  gap: var(--spacing-md);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo-placeholder {
  width: 48px;
  height: 48px;
  background: var(--logo-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.7rem;
  overflow: hidden;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.site-title a {
  color: white;
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: none;
  opacity: 0.9;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--spacing-sm);
}

.main-nav a {
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  display: block;
  font-weight: 500;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.main-nav a.active {
  background: rgba(255, 255, 255, 0.2);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  display: block;
  font-weight: 500;
  cursor: pointer;
}

.nav-dropdown:hover .nav-dropdown-trigger {
  background: rgba(255, 255, 255, 0.15);
}

.nav-dropdown-trigger.active {
  background: rgba(255, 255, 255, 0.2);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--nav-dropdown-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 0;
  margin-top: var(--spacing-xs);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu li {
  margin: 0;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.4rem var(--spacing-md);
  border-radius: 0;
  line-height: 1.2;
}

.nav-dropdown-menu li + li {
  margin-top: -0.8rem;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.hero {
  background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 var(--spacing-sm);
  font-weight: 600;
}

.hero p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.95;
}

.org-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.org-banner-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.org-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.org-banner-overlay .container {
  text-align: center;
}

.org-banner-jata {
  display: block;
  margin: 0 auto var(--spacing-md);
  max-height: 80px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.org-banner-overlay h1 {
  color: white;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  margin: 0 0 var(--spacing-sm);
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.org-banner-overlay p {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

.announcement-strip {
  background: #fff8e6;
  color: #856404;
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: center;
  border-bottom: 1px solid #ffeeba;
}

.announcement-strip a {
  color: #856404;
  font-weight: 600;
}

.announcement-strip a:hover {
  text-decoration: underline;
}

.search-page-form {
  max-width: 560px;
  margin: 0 auto var(--spacing-xl);
}

.search-page-input-wrap {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.search-page-input {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
}

.search-page-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-page-btn {
  padding: 0.6rem 1.5rem;
}

.search-results-area {
  padding: var(--spacing-lg) 0;
}

.search-results-area .search-result-item {
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.search-results-area .search-result-item a {
  color: var(--color-primary);
  font-weight: 600;
}

.search-results-area .search-result-item a:hover {
  text-decoration: underline;
}

.search-results-area .search-result-item p {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.search-results-area .search-placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  font-size: 1.75rem;
  margin: 0 0 var(--spacing-lg);
  color: var(--color-primary);
  font-weight: 600;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.service-card {
  background: white;
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s, transform 0.2s;
}

.service-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.service-card .icon {
  width: 48px;
  height: 48px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary);
}

.service-card h3 {
  margin: 0 0 var(--spacing-xs);
  font-size: 1.1rem;
}

.service-card p {
  margin: 0 0 var(--spacing-sm);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.service-card .btn {
  font-size: 0.9rem;
  padding: var(--spacing-xs) var(--spacing-sm);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.news-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s;
}

.news-card:hover {
  box-shadow: var(--shadow-hover);
}

.news-card .news-image {
  height: 160px;
  background: repeating-linear-gradient(
    -45deg,
    var(--color-bg-alt),
    var(--color-bg-alt) 10px,
    rgba(0, 0, 0, 0.05) 10px,
    rgba(0, 0, 0, 0.05) 20px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px dashed var(--color-border);
}

.news-card .news-content {
  padding: var(--spacing-md);
}

.news-card .news-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xs);
}

.news-card h3 {
  margin: 0 0 var(--spacing-xs);
  font-size: 1rem;
}

.news-card h3 a {
  color: var(--color-text);
}

.news-card h3 a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.news-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.status-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.status-box {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  border-left: 4px solid var(--color-primary);
}

.status-box h4 {
  margin: 0 0 var(--spacing-xs);
  font-size: 1rem;
}

.status-box p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.site-footer {
  background: var(--footer-bg);
  color: #ccc;
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-xl);
  border-top: var(--footer-border-width) solid var(--footer-border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-grid h4 {
  color: white;
  font-size: 1rem;
  margin: 0 0 var(--spacing-sm);
}

.footer-grid p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

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

.footer-grid a {
  color: #aaa;
}

.footer-grid a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: var(--spacing-md);
  text-align: center;
  font-size: 0.9rem;
}

.page-content {
  min-height: 50vh;
}

.map-placeholder {
  height: 300px;
  background: repeating-linear-gradient(
    -45deg,
    var(--color-bg-alt),
    var(--color-bg-alt) 10px,
    rgba(0, 0, 0, 0.05) 10px,
    rgba(0, 0, 0, 0.05) 20px
  );
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  border: 2px dashed var(--color-border);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .service-card:hover,
  .news-card:hover,
  .btn:hover {
    transform: none;
  }
}

@media (max-width: 768px) {
  .top-bar-inner {
    flex-wrap: wrap;
  }

  .top-bar-right {
    flex-wrap: wrap;
    margin-left: 0;
  }

  .top-bar-dropdowns {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .top-bar-dropdown-label {
    display: none;
  }

  .top-bar-select {
    font-size: 0.8rem;
    padding: 0.2rem 0.35rem;
  }

  .social-link i,
  .social-link .fa {
    font-size: 1rem;
  }

  .lang-btn {
    padding: 0.2rem 0.35rem;
    font-size: 0.85rem;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-dropdown-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.is-open {
    max-height: 400px;
  }

  .main-nav ul {
    flex-direction: column;
    padding: var(--spacing-sm);
  }

  .main-nav a {
    padding: var(--spacing-sm);
  }

  .org-banner-img {
    height: 200px;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    margin-top: 0;
    padding-left: var(--spacing-md);
    padding-top: var(--spacing-xs);
  }

  .nav-dropdown-trigger {
    padding: var(--spacing-sm);
  }

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

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

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

  .status-boxes {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.go-to-top {
  position: fixed;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 999;
}

.go-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.go-to-top:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.go-to-top:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  z-index: 1001;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}
