/* Classic SIMS Saibal Info Management System theme */

:root {
  --classic-cream: #f3e6c8;
  --classic-page: #f7efd8;
  --classic-green: #1f6b2e;
  --classic-green-dark: #145222;
  --classic-text: #6b2e14;
  --classic-gold-1: #c9a04a;
  --classic-gold-2: #8a6a2e;
  --classic-gold-3: #e8d39a;
  --classic-btn: #e6d3a0;
  --classic-btn-edge: #a8863d;
  --classic-nav-h: 52px;
}

body.classic-theme {
  background: var(--classic-page);
  font-family: Georgia, "Times New Roman", Times, serif;
  color: var(--classic-text);
  padding-top: 0;
}

body.classic-theme p {
  color: var(--classic-text);
}

/* —— Banner / header —— */
.classic-top {
  background: var(--classic-cream);
  border-bottom: 1px solid rgba(120, 90, 30, 0.25);
}

.classic-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) auto;
  align-items: center;
  min-height: 240px;
  overflow: visible;
  background:
    linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.96) 22%, rgba(243, 230, 200, 0) 38%),
    url("/images/header-building.jpg") right center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.classic-brand {
  position: relative;
  z-index: 3;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #fff 60%, rgba(255, 255, 255, 0.9) 82%, rgba(255, 255, 255, 0));
  overflow: visible;
}

.classic-banner-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem 0.35rem;
  min-width: 0;
}

.classic-company {
  text-align: center;
  max-width: 100%;
  padding: 0.35rem 0.75rem 0.45rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 252, 245, 0.72));
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.classic-company-name {
  margin: 0;
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.8vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: #1f6b2e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.classic-company-rule {
  position: relative;
  height: 14px;
  margin: 0.35rem auto 0.3rem;
  max-width: 420px;
  width: min(90%, 420px);
  background: linear-gradient(90deg, transparent, #c9a227 12%, #c9a227 88%, transparent);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: center;
}

.classic-company-diamond {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, #e8c96a, #c9a227 50%, #8a7018);
  border: 1px solid #8a7018;
  box-shadow: 0 0 0 3px rgba(255, 252, 245, 0.9);
}

.classic-company-tag {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: clamp(0.78rem, 1.3vw, 0.98rem);
  font-weight: 600;
  color: #1e3a8a;
  letter-spacing: 0.03em;
}

/* Official SIMS seal photo — globe revolves in center only */
.sims-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 210px;
  text-align: center;
  line-height: 1.15;
  overflow: visible;
}

.sims-logo-seal {
  position: relative;
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1 / 1;
  line-height: 0;
}

.sims-logo-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

/* Covers the printed globe on the seal; spins in place */
.sims-logo-globe-hole {
  position: absolute;
  left: 50%;
  top: 33%;
  width: 30%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  background: #cfd8e6;
  box-shadow: inset 0 0 0 1px rgba(90, 110, 130, 0.35);
}

.sims-logo-globe {
  width: 100%;
  height: 100%;
  animation: sims-globe-spin 12s linear infinite;
  will-change: transform;
  transform-origin: center center;
}

.sims-logo-globe svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes sims-globe-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sims-logo-globe {
    animation: none;
  }
}

.classic-flags {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.55rem, 1.8vw, 1.35rem);
  padding: 0.85rem 1rem 0;
  align-self: center;
}

.classic-flag {
  position: relative;
  width: clamp(34px, 4.2vw, 48px);
  height: clamp(72px, 9vw, 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.classic-flag .pole {
  width: 3px;
  height: 100%;
  background: linear-gradient(90deg, #c0c0c0, #eee, #8a8a8a);
  border-radius: 2px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

.classic-flag .cloth {
  position: absolute;
  left: 3px;
  top: 4px;
  width: calc(100% - 2px);
  height: 42%;
  transform-origin: left center;
  animation: flag-fly 1.6s ease-in-out infinite;
  border: 1px solid rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.classic-flag .cloth img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.classic-flag:nth-child(1) .cloth { animation-duration: 1.45s; animation-delay: 0s; }
.classic-flag:nth-child(2) .cloth { animation-duration: 1.7s; animation-delay: 0.15s; }
.classic-flag:nth-child(3) .cloth { animation-duration: 1.55s; animation-delay: 0.28s; }
.classic-flag:nth-child(4) .cloth { animation-duration: 1.8s; animation-delay: 0.08s; }
.classic-flag:nth-child(5) .cloth { animation-duration: 1.5s; animation-delay: 0.22s; }
.classic-flag:nth-child(6) .cloth { animation-duration: 1.65s; animation-delay: 0.35s; }
.classic-flag:nth-child(7) .cloth { animation-duration: 1.75s; animation-delay: 0.12s; }

@keyframes flag-fly {
  0%, 100% {
    transform: perspective(120px) rotateY(0deg) skewY(0deg) scaleX(1);
  }
  25% {
    transform: perspective(120px) rotateY(-12deg) skewY(3deg) scaleX(0.94);
  }
  50% {
    transform: perspective(120px) rotateY(8deg) skewY(-2deg) scaleX(1.02);
  }
  75% {
    transform: perspective(120px) rotateY(-8deg) skewY(2deg) scaleX(0.96);
  }
}

.classic-page-title {
  position: relative;
  z-index: 2;
  align-self: center;
  margin: 0 1.25rem 0 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
}

/* —— Gold navigation —— */
.classic-nav {
  background: linear-gradient(180deg, #d8b86a 0%, #a67c2e 45%, #7a5820 100%);
  border-top: 1px solid #f0dca0;
  border-bottom: 2px solid #5a4014;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  padding: 0.45rem 0.75rem;
}

.classic-nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.classic-nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 1.1rem 0.35rem 0.7rem;
  min-width: 6.5rem;
  justify-content: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #4a2a10 !important;
  text-decoration: none !important;
  background: linear-gradient(180deg, #f3e4bc 0%, #e0c788 50%, #c9a85a 100%);
  border: 1px solid #8a6a2e;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 3px rgba(100, 70, 20, 0.25),
    0 2px 3px rgba(0, 0, 0, 0.25);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.classic-nav-btn::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #d8c090 55%, #8a7040);
  border: 1px solid #7a6028;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.classic-nav-btn:hover,
.classic-nav-btn.active {
  filter: brightness(1.06);
  color: #2a1508 !important;
  transform: translateY(-1px);
}

.classic-nav-toggle {
  display: none;
  margin-left: auto;
  background: linear-gradient(180deg, #f3e4bc, #c9a85a);
  border: 1px solid #8a6a2e;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.classic-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #4a2a10;
  margin: 4px 0;
}

/* —— Homepage content —— */
.classic-home {
  padding: 1.75rem clamp(1rem, 3vw, 2.5rem) 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
}

.classic-home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 2.75rem;
  align-items: start;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: clamp(0.98rem, 1.15vw, 1.12rem);
  line-height: 1.7;
  color: var(--classic-text);
  text-align: justify;
}

.classic-home-grid > div {
  min-width: 0;
}

.classic-home-grid p {
  margin: 0 0 1.1rem;
  color: var(--classic-text);
}

.classic-home-grid p:last-child {
  margin-bottom: 0;
}

/* —— About / Company page (match classic SIMS layout) —— */
.classic-about {
  background: #fff;
  max-width: 980px;
}

.classic-about-title {
  margin: 0 0 1.25rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: #6b2e14;
  line-height: 1.2;
}

.classic-about-top {
  display: grid;
  grid-template-columns: minmax(210px, 260px) 1fr;
  gap: 1rem 1.35rem;
  align-items: stretch;
  margin-bottom: 1.15rem;
}

.classic-quote-wrap {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  min-height: 0;
}

.classic-quote-svg {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.classic-about-intro {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  line-height: 1.65;
  color: #6b2e14;
  text-align: justify;
}

.classic-about-intro > p {
  margin: 0 0 0.95rem;
  color: #6b2e14;
}

.classic-about-intro-highlight {
  background: #fff9d6;
  border-radius: 4px;
  padding: 0.75rem 0.85rem;
  margin: 0 !important;
  color: #6b2e14 !important;
}

.classic-about-body {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  line-height: 1.65;
  color: #6b2e14;
  text-align: justify;
  margin-bottom: 1.5rem;
}

.classic-about-body p {
  margin: 0 0 1rem;
  color: #6b2e14;
}

.classic-about-body p:last-child {
  margin-bottom: 0;
}

.classic-about-banner {
  margin-top: 0.5rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid #8B3A1A;
  border-radius: 12px;
  background: #f3f0ea;
  max-width: 94%;
  margin-inline: auto;
}

.classic-about-banner p {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #6b2e14;
  text-align: center;
}

@media (max-width: 800px) {
  .classic-about-top {
    grid-template-columns: 1fr;
  }

  .classic-quote-svg {
    margin-inline: auto;
  }

  .classic-about-banner {
    max-width: 100%;
  }
}

/* —— Contact_us (classic two-panel) —— */
.classic-contact {
  max-width: 980px;
}

.classic-contact-title {
  text-align: left;
  margin-bottom: 0.65rem;
}

.classic-contact-brandline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.55rem;
  margin: 0 0 1.15rem;
  padding: 0.55rem 0.75rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  font-weight: 600;
  color: #1e3a8a;
  border-top: 2px solid #c9a227;
  border-bottom: 2px solid #c9a227;
  background: linear-gradient(180deg, #fffef8, #f7f0e0);
}

.classic-contact-brandline .sep {
  color: #c9a227;
  font-weight: 700;
}

.classic-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

.classic-contact-panel {
  position: relative;
  min-height: 340px;
  border: 2px solid #c9a227;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.classic-contact-locations {
  background-image:
    linear-gradient(180deg, rgba(12, 22, 40, 0.25), rgba(12, 22, 40, 0.5)),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=900&q=80");
}

.classic-contact-emails {
  background-image:
    linear-gradient(180deg, rgba(20, 60, 80, 0.2), rgba(15, 45, 65, 0.42)),
    url("https://images.unsplash.com/photo-1556745753-b2904692e3fc?auto=format&fit=crop&w=900&q=80");
  background-color: #7eb8c9;
}

.classic-contact-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.35rem 1.1rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.32);
}

.classic-contact-overlay-soft {
  background: rgba(15, 45, 65, 0.38);
}

.classic-contact-list {
  list-style: none;
  margin: 0;
  padding: 0.85rem 1rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  line-height: 1.55;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
}

.classic-contact-list li {
  margin: 0.2rem 0;
}

.classic-contact-emails-heading {
  margin: 0 0 0.95rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.classic-contact-mail {
  display: block;
  margin: 0.4rem 0;
  padding: 0.45rem 0.85rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: #fff !important;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  word-break: break-word;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.classic-contact-mail:hover {
  text-decoration: underline;
  color: #ffe9a8 !important;
  background: rgba(0, 0, 0, 0.4);
}

@media (max-width: 800px) {
  .classic-contact-grid {
    grid-template-columns: 1fr;
  }

  .classic-contact-panel {
    min-height: 280px;
  }
}

/* —— Home gallery: one slide, full image, cross-device —— */
.home-gallery-slider {
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.25rem;
  background: #121820;
  border-bottom: 3px solid #c9a227;
  position: relative;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}

@supports (width: 100vw) {
  .home-gallery-slider {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

.home-gallery-viewport {
  overflow: hidden;
  width: 100%;
  background: #0d1218;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.home-gallery-track {
  position: relative;
  width: 100%;
}

.home-gallery-slide {
  margin: 0;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  transform: translate3d(6%, 0, 0);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1218;
}

.home-gallery-slide.is-active {
  position: relative;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
  z-index: 2;
}

.home-gallery-slide.is-exit {
  opacity: 0;
  transform: translate3d(-6%, 0, 0);
  z-index: 1;
}

.home-gallery-slide img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: min(82vh, 760px);
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

.home-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
  -webkit-appearance: none;
  appearance: none;
}

.home-gallery-nav:hover,
.home-gallery-nav:focus-visible {
  background: rgba(201, 162, 39, 0.9);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.home-gallery-prev { left: 0.5rem; }
.home-gallery-next { right: 0.5rem; }

.home-gallery-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem 0.75rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

.home-gallery-status {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

.home-gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  max-width: 100%;
}

.home-gallery-dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.home-gallery-dot.is-active,
.home-gallery-dot:hover,
.home-gallery-dot:focus-visible {
  background: #c9a227;
}

@media (max-width: 900px) {
  .home-gallery-slide img {
    max-height: min(68vh, 560px);
  }

  .home-gallery-nav {
    width: 40px;
    height: 40px;
    font-size: 1.55rem;
  }
}

@media (max-width: 600px) {
  .home-gallery-slide img {
    max-height: min(62vh, 420px);
  }

  .home-gallery-dot {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
  }

  .home-gallery-nav {
    background: rgba(0, 0, 0, 0.55);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-gallery-slide {
    transition: none;
  }
}

/* —— Classic footer tweak —— */
body.classic-theme .footer-sims {
  background: linear-gradient(180deg, #3d5c2e, #2a4020);
  color: #f5ecd4;
}

body.classic-theme .footer-sims h3,
body.classic-theme .footer-sims h4,
body.classic-theme .footer-sims p,
body.classic-theme .footer-sims a {
  color: #f5ecd4;
}

body.classic-theme .footer-sims a:hover {
  color: #ffe9a8;
}

body.classic-theme .whatsapp-fab,
body.classic-theme .back-to-top {
  display: none;
}

/* Hide old modern nav when classic header is present */
body.classic-theme .sims-nav {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .sims-logo-globe,
  .classic-flag .cloth {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .classic-banner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .classic-brand {
    background: #fff;
    align-items: center;
  }

  .sims-logo {
    width: min(180px, 100%);
  }

  .classic-banner-center {
    padding: 0.5rem 0.75rem 0.85rem;
  }

  .classic-company {
    width: 100%;
  }

  .classic-flags {
    justify-content: center;
    padding: 0.5rem 0.5rem 0;
    background: transparent;
  }

  .classic-page-title {
    position: absolute;
    right: 0.75rem;
    bottom: 0.5rem;
    margin: 0;
    font-size: 2rem;
  }

  .classic-home-grid {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

@media (max-width: 700px) {
  .classic-nav-toggle {
    display: inline-block;
  }

  .classic-nav-inner {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-top: 0.5rem;
  }

  .classic-nav-inner.open {
    display: flex;
  }

  .classic-nav-btn {
    width: 100%;
    justify-content: flex-start;
  }
}
