/* ================== Reset & Base ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html, body {
  height: 100%;
  font-family: "Faruma","MV Boli",Arial,sans-serif;
  background: linear-gradient(165deg, #e8eef6 0%, #f4f7fb 45%, #fafbfc 100%);
  background-attachment: fixed;
  color: #1a2332;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html {
  overflow: hidden;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100%;
  scroll-behavior: smooth;
}

/* Hide scrollbars everywhere — mouse wheel / trackpad still scrolls */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

/* ================== Custom Fonts ================== */
@font-face {
  font-family: "EasaFalaGalan";
  src: url("downloads/fonts/EasaFalaGalan-Heading.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Faruma";
  src: url("downloads/fonts/Faruma.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Headings in EasaFalaGalan */
h1, h2, h3, h4, h5, h6 {
  font-family: "EasaFalaGalan","Faruma","MV Boli",Arial,sans-serif;
  font-weight: normal;
}

/* ================== Sidebar ================== */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 150px;
  height: 100vh;
  background: linear-gradient(180deg, #1a5fa0 0%, #165493 50%, #0e3c6a 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 12px;
  box-sizing: border-box;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: -4px 0 20px rgba(14, 60, 106, 0.15);
}

.sidebar .logo-area {
  width: 90px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.sidebar .logo-area a {
  display: block;
  line-height: 0;
}

.sidebar .logo-area a:hover,
.sidebar .logo-area a:active,
.sidebar .logo-area a:focus {
  opacity: 0.9;
  transform: none;
  outline: none;
}

.sidebar img {
  max-width: 90px;
  margin-bottom: 12px;
}

.sidebar .extra-image {
  width: 90px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.sidebar .extra-image img {
  max-width: 78px;
  width: auto;
  height: auto;
  opacity: 0.95;
  display: block;
  margin-bottom: 12px;
}

/* Vaahaka: cart pinned below — keep name spacing stable */
body.vaahaka-page .sidebar .extra-image img {
  margin-bottom: 0;
}

/* ================== Topbar ================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 150px;
  height: 60px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(22, 84, 147, 0.12);
  box-shadow: 0 2px 16px rgba(22, 84, 147, 0.06);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 900;
}

.menu-btn {
  display: none;
  margin-left: auto;
  background: #165493;
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.menu-btn:hover {
  background: #0e3c6a;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  text-decoration: none;
  font-size: 16px;
  color: #486581;
  padding: 7px 12px;
  border-radius: 8px;
  border-bottom: none;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.nav a:hover {
  color: #165493;
  background: rgba(22, 84, 147, 0.1);
}

.nav a.active,
.nav .active {
  color: #ffffff;
  background: linear-gradient(135deg, #165493 0%, #1e6aab 100%);
  box-shadow: 0 2px 10px rgba(22, 84, 147, 0.28);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1.3;
}

.nav a.active:hover,
.nav .active:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #1a5fa0 0%, #165493 100%);
}

/* ================== Main Content ================== */
.content {
  margin-top: 72px;
  margin-right: 150px;
  padding: 32px 48px 56px;
  max-width: calc(100% - 150px);
  min-height: calc(100vh - 72px);
  box-sizing: border-box;
}

.section {
  margin-bottom: 0;
  scroll-margin-top: 72px;
  width: 100%;
}

.content > .section:only-child {
  margin-bottom: 0;
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
}

/* Unified page headlines — all pages */
.content h2,
.page-headline {
  font-family: "EasaFalaGalan", "Faruma", "MV Boli", Arial, sans-serif;
  font-size: 52px;
  font-weight: normal;
  color: #165493;
  text-align: center;
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(22, 84, 147, 0.15);
  position: relative;
}

.content h2::after,
.page-headline::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: #165493;
  border-radius: 2px;
}

.section p,
.prose p {
  font-size: 19px;
  line-height: 2;
  color: #334155;
  max-width: 100%;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
  padding: 0 24px;
  box-sizing: border-box;
}

.section p + p {
  margin-top: 16px;
}

/* Home quick links */
.home-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  width: 100%;
  margin: 32px 0 0;
  padding: 0 24px;
  box-sizing: border-box;
}

.home-link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 16px 14px;
  background: linear-gradient(145deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid rgba(22, 84, 147, 0.12);
  border-radius: 12px;
  text-decoration: none;
  color: #165493;
  font-size: 17px;
  text-align: center;
  line-height: 1.5;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(22, 84, 147, 0.05);
}

.home-link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(22, 84, 147, 0.35);
  box-shadow: 0 8px 20px rgba(22, 84, 147, 0.12);
}

.services-container {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 16px 24px 0;
  flex-direction: row-reverse;
  box-sizing: border-box;
  flex: 1;
}

.services-images {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.services-images img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(22, 84, 147, 0.12);
  object-fit: cover;
  border: 1px solid rgba(22, 84, 147, 0.08);
}

.services-text {
  flex: 1;
  font-size: 20px;
  line-height: 1.8;
  color: #333;
  text-align: justify;
}
.services-text p { margin-bottom: 20px; }

@media (max-width: 900px) {
  .services-container { flex-direction: column; }
  .services-images { flex-direction: row; gap: 10px; }
  .services-images img { width: 50%; }
}

/* ================== Download Section ================== */
#download.section {
  text-align: center;
  padding: 0;
  margin-top: 0;
}

#download.section > p {
  margin: 0 auto 28px;
  text-align: center;
  max-width: 720px;
}

#download .download-sub {
  font-family: "EasaFalaGalan", "Faruma", "MV Boli", Arial, sans-serif;
  font-size: 28px;
  font-weight: normal;
  color: #165493;
  text-align: center;
  margin: 32px 0 18px;
  padding-top: 8px;
}

.download-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 40px;
  justify-items: center;
  padding: 0 24px 32px;
  border-bottom: 1px solid rgba(22, 84, 147, 0.1);
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.download-item {
  width: 100%;
  max-width: 220px;
  text-align: center;
  background: #fff;
  padding: 14px 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(22, 84, 147, 0.1);
  box-shadow: 0 3px 14px rgba(22, 84, 147, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.download-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(22, 84, 147, 0.14);
}

.download-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.download-item:hover img {
  transform: scale(1.02);
}

.download-btn {
  display: block;
  margin-top: 12px;
  width: 100%;
  padding: 12px 0;
  background: linear-gradient(135deg, #165493 0%, #1a5fa0 100%);
  color: #fff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: normal;
  font-family: "Faruma", "MV Boli", Arial, sans-serif;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
  background: linear-gradient(135deg, #0e3c6a 0%, #165493 100%);
  box-shadow: 0 4px 12px rgba(22, 84, 147, 0.25);
}

.download-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.download-item h3 {
  font-size: 36px;
  margin: 20px 0 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #165493;
}

.download-item p {
  font-size: 18px;
  color: #444;
  margin-bottom: 12px;
}

/* ================== Animations ================== */
.fade-in { opacity: 0; transform: translateY(30px); transition: all .7s ease; }
.fade-in.show { opacity: 1; transform: none; }
.slide-in-left { opacity: 0; transform: translateX(-60px); transition: all .7s ease; }
.slide-in-left.show { opacity: 1; transform: none; }
.slide-in-right { opacity: 0; transform: translateX(60px); transition: all .7s ease; }
.slide-in-right.show { opacity: 1; transform: none; }

/* ================== Footer ================== */
.site-footer {
  margin-right: 150px;
  padding: 24px 40px;
  text-align: center;
  font-size: 15px;
  color: #64748b;
  border-top: 1px solid rgba(22, 84, 147, 0.1);
  background: rgba(255, 255, 255, 0.6);
}

.site-footer a {
  color: #165493;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer {
  text-align: center;
  padding: 30px;
  font-size: 16px;
  color: #666;
  border-top: 1px solid #ddd;
}

/* ================== Responsive ================== */
@media (max-width: 1200px) {
  .download-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .download-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .topbar {
    right: 0;
    justify-content: flex-end;
    gap: 8px;
  }
  .menu-btn {
    display: block;
    margin-left: 0;
    order: 2;
  }
  .content {
    margin-right: 0;
    margin-left: 0;
    max-width: 100%;
    padding: 24px 16px 48px;
    min-height: calc(100vh - 72px);
  }
  .content > .section:only-child {
    min-height: calc(100vh - 140px);
  }
  .content h2,
  .page-headline { font-size: 36px; }
  .home-links { grid-template-columns: 1fr 1fr; gap: 10px; }
  .home-link-card { min-height: 64px; font-size: 15px; }
  .site-footer { margin-right: 0; padding: 20px 16px; }
  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid rgba(22, 84, 147, 0.1);
    box-shadow: 0 8px 24px rgba(22, 84, 147, 0.1);
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; text-align: center; }
}
