/* =========================================================
   CRNetworkingSolutions main-site portal theme
   Matches the FOSSBilling client portal visual language.
   The existing main-site sidebar is intentionally untouched.
   This file must load after style.css and responsive.css.
   ========================================================= */

:root {
  --crns-orange: #ff651c;
  --crns-orange-hover: #ff8a52;
  --crns-page: #0b0c0e;
  --crns-panel-top: #202326;
  --crns-panel-bottom: #16181a;
  --crns-panel-flat: #191b1d;
  --crns-border: #34383b;
  --crns-border-soft: #2f3235;
  --crns-heading: #ffffff;
  --crns-text: #d9dde1;
  --crns-muted: #aeb3b8;
}

html {
  background: var(--crns-page);
}

body {
  color: var(--crns-text);
  background:
    radial-gradient(circle at 88% 5%, rgba(255, 101, 28, 0.07), transparent 27%),
    var(--crns-page);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(17, 19, 21, 0.52), rgba(9, 10, 12, 0.2));
}

/* Disable the legacy animated cursor follower and use the system cursor. */
html,
body,
body * {
  cursor: auto !important;
}

a,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
select,
label[for],
[role="button"] {
  cursor: pointer !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea {
  cursor: text !important;
}

.mouse-cursor,
.cursor-outer,
.cursor-inner {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Match the client portal's larger, borderless sidebar logo treatment. */
#header .profile img {
  display: block;
  width: 260px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 22px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Keep the established sidebar width, position, colors, and navigation intact. */
#main {
  min-height: 100vh;
  background: transparent;
}

#main a:not(.btn-buy):not(.hero-btn) {
  color: var(--crns-orange);
}

#main a:not(.btn-buy):not(.hero-btn):hover,
#main a:not(.btn-buy):not(.hero-btn):focus {
  color: var(--crns-orange-hover);
}

#main section {
  height: auto;
  min-height: 0;
  padding: clamp(54px, 7vw, 82px) 0;
  background: transparent;
}

#main section > .container {
  position: relative;
  padding: clamp(22px, 3vw, 38px);
  color: var(--crns-text);
  background:
    radial-gradient(circle at 96% 0%, rgba(255, 101, 28, 0.065), transparent 30%),
    linear-gradient(180deg, #111315 0%, #0b0c0e 100%);
  border: 1px solid var(--crns-border-soft);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

#main section > .container::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(22px, 3vw, 38px);
  width: 82px;
  height: 3px;
  background: var(--crns-orange);
  border-radius: 0 0 5px 5px;
}

/* Hero */
#hero {
  display: flex;
  align-items: center;
  min-height: 100vh !important;
  padding-top: clamp(30px, 5vw, 64px) !important;
  background: transparent !important;
}

#hero > .container {
  padding: clamp(34px, 6vw, 74px);
  background:
    radial-gradient(circle at 94% 8%, rgba(255, 101, 28, 0.10), transparent 32%),
    linear-gradient(145deg, #1d2022, #111315);
  border-color: var(--crns-border);
}

#hero > .container::before {
  left: clamp(34px, 6vw, 74px);
  width: 110px;
}

#hero .background {
  display: none;
}

#hero .hero-box {
  width: min(100%, 940px);
  margin: 0 auto;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#hero .hero-box h1 {
  margin-bottom: 24px;
  color: var(--crns-heading);
  font-size: clamp(2.35rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

#hero .hero-box h2 {
  max-width: 820px;
  margin: 0 auto;
  color: var(--crns-text);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 400;
  line-height: 1.75;
}

#hero .hero-box .typed {
  color: var(--crns-orange);
  font-weight: 750;
}

#hero .btn-scroll {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: 28px;
  color: #fff !important;
  background: var(--crns-orange);
  border: 1px solid var(--crns-orange);
  border-radius: 12px;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

#hero .btn-scroll:hover,
#hero .btn-scroll:focus {
  color: #fff !important;
  background: #e75410;
  transform: translateY(2px);
}

/* Shared section headings */
.section-title {
  margin: 0 auto clamp(28px, 4vw, 44px);
  padding: 0 0 22px;
  text-align: left;
  border-bottom: 1px solid #282b2e;
}

.section-title > span {
  display: none;
}

.section-title h2 {
  position: relative;
  margin: 0 0 14px;
  padding-left: 14px;
  color: var(--crns-heading);
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 750;
  line-height: 1.25;
  border-left: 4px solid var(--crns-orange);
}

.section-title h2::after {
  display: none;
}

.section-title p {
  max-width: 980px;
  margin: 0;
  color: var(--crns-text);
  font-size: clamp(1rem, 1.55vw, 1.08rem);
  line-height: 1.78;
}

/* Portal-style surface cards */
.services .icon-box,
.pricing .box,
.trust-feature,
.trust-detail-card,
.contact .info-box,
.contact .portal-box,
.portfolio-details .portfolio-info,
.about-img,
.hero-img {
  color: var(--crns-text);
  background: linear-gradient(145deg, var(--crns-panel-top), var(--crns-panel-bottom));
  border: 1px solid var(--crns-border);
  border-radius: 13px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 8px 20px rgba(0, 0, 0, 0.20);
}

.services .icon-box,
.trust-detail-card,
.pricing .box {
  height: 100%;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.services .icon-box:hover,
.trust-detail-card:hover,
.pricing .box:hover,
.trust-feature:hover {
  background: linear-gradient(145deg, #25282b, #1b1d1f);
  border-color: var(--crns-orange);
  transform: translateY(-3px);
}

.services .icon {
  color: var(--crns-orange);
  background: #24272a;
  border: 1px solid #3b3f43;
  border-radius: 12px;
}

.services .icon i,
.services .title a,
.trust-feature-content h3,
.trust-detail-card h3,
.pricing h3,
.contact .info-box h3 {
  color: var(--crns-heading);
}

.services .description,
.trust-feature-content p,
.trust-detail-card p,
.pricing ul,
.contact .info-box p {
  color: var(--crns-text);
}

/* Pricing */
.pricing .row {
  row-gap: 24px;
}

.pricing .box {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.pricing .box.featured {
  border-color: var(--crns-orange);
  box-shadow: 0 0 0 1px rgba(255, 101, 28, 0.24), 0 12px 30px rgba(0, 0, 0, 0.25);
}

.pricing h3 {
  margin: 0;
  padding: 20px 18px;
  background: rgba(8, 9, 10, 0.26);
  border-bottom: 1px solid #35393c;
}

.pricing h4 {
  color: var(--crns-orange);
}

.pricing h4 span {
  color: var(--crns-muted);
}

.pricing ul {
  flex: 1;
}

.pricing .btn-wrap {
  background: rgba(8, 9, 10, 0.26);
  border-top: 1px solid #35393c;
}

.pricing .btn-buy,
.hero-btn-primary,
.contact button[type="submit"] {
  color: #fff !important;
  background: var(--crns-orange);
  border: 1px solid var(--crns-orange);
  border-radius: 9px;
  font-weight: 700;
}

.pricing .btn-buy:hover,
.pricing .btn-buy:focus,
.hero-btn-primary:hover,
.hero-btn-primary:focus,
.contact button[type="submit"]:hover,
.contact button[type="submit"]:focus {
  color: #fff !important;
  background: #e75410;
  border-color: #e75410;
}

.pricing .advanced {
  background: var(--crns-orange);
}

/* Trust section */
.trust-feature {
  background: linear-gradient(145deg, var(--crns-panel-top), var(--crns-panel-bottom));
  border-radius: 13px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 8px 20px rgba(0, 0, 0, 0.20);
}

.trust-detail-icon {
  color: var(--crns-orange);
  background: #24272a;
  border-color: var(--crns-orange);
}

.trust-closing {
  color: var(--crns-orange);
}

/* Contact and embedded portal form */
.contact iframe {
  display: block;
  width: 100%;
  min-height: 520px;
  background: linear-gradient(145deg, var(--crns-panel-top), var(--crns-panel-bottom));
  border: 1px solid var(--crns-border) !important;
  border-radius: 13px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 8px 20px rgba(0, 0, 0, 0.20);
}

.contact input,
.contact select,
.contact textarea,
.form-control,
.form-select {
  color: #f2f3f4;
  background: #111315;
  border: 1px solid #3b3f43;
  border-radius: 9px;
}

.contact input:focus,
.contact select:focus,
.contact textarea:focus,
.form-control:focus,
.form-select:focus {
  color: #fff;
  background: #151719;
  border-color: var(--crns-orange);
  box-shadow: 0 0 0 3px rgba(255, 101, 28, 0.18);
  outline: 0;
}

/* Footer */
#footer {
  width: 100%;
  margin: 0;
  padding: clamp(54px, 7vw, 82px) 12px 28px;
  color: var(--crns-text);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#footer .container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 52px) 20px;
  color: inherit;
  background:
    radial-gradient(circle at 94% 8%, rgba(255, 101, 28, 0.10), transparent 32%),
    linear-gradient(145deg, #1d2022, #111315);
  border: 1px solid var(--crns-border);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

#footer h3 {
  margin: 0 0 12px;
  color: var(--crns-heading);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.2;
}

#footer p {
  margin: 0 0 18px;
  color: var(--crns-muted);
}

#footer .social-links a {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: #1d2022;
  border: 1px solid #3b3f43;
  border-radius: 10px;
}

#footer .social-links a:hover,
#footer .social-links a:focus {
  color: #fff;
  background: var(--crns-orange);
  border-color: var(--crns-orange);
}

#footer .copyright {
  margin-top: 18px;
  padding: 0;
  color: var(--crns-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#footer .copyright a {
  color: var(--crns-orange);
}

#footer .copyright a:hover,
#footer .copyright a:focus {
  color: var(--crns-orange-hover);
}

/* Shared interaction and accessibility treatment */
#main a:focus-visible,
#main button:focus-visible,
#main input:focus-visible,
#main select:focus-visible,
#main textarea:focus-visible,
#footer a:focus-visible {
  outline: 2px solid var(--crns-orange);
  outline-offset: 3px;
}

.back-to-top,
.crns-main-install {
  border: 1px solid var(--crns-orange) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34) !important;
}

@media (max-width: 991.98px) {
  #main section {
    padding: 28px 12px;
  }

  #hero {
    min-height: 100svh !important;
    padding-top: 18px !important;
  }

  #main section > .container,
  #hero > .container {
    padding: 24px 18px;
    border-radius: 14px;
  }

  #main section > .container::before,
  #hero > .container::before {
    left: 18px;
  }

  #hero .hero-box h1 {
    overflow-wrap: anywhere;
  }

  .section-title {
    padding-bottom: 18px;
  }

  .trust-feature,
  .trust-feature-reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 22px 18px;
  }

  .trust-feature-reverse .trust-feature-badge,
  .trust-feature-reverse .trust-feature-content {
    grid-column: 1;
    grid-row: auto;
  }

  .trust-details {
    grid-template-columns: 1fr;
  }

  #footer {
    padding: 28px 12px 20px;
  }

  #footer .container {
    padding: 30px 18px;
    border-radius: 14px;
  }
}

@media (max-width: 575.98px) {
  #main section {
    padding-right: 8px;
    padding-left: 8px;
  }

  #main section > .container,
  #hero > .container {
    padding: 22px 14px;
  }

  #main section > .container::before,
  #hero > .container::before {
    left: 14px;
    width: 64px;
  }

  #hero .hero-box h2 {
    line-height: 1.58;
  }

  .services .icon-box,
  .pricing .box,
  .trust-detail-card {
    border-radius: 11px;
  }

  .contact iframe {
    min-height: 620px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main *,
  #footer * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
