/*
 * Theme redesign for Sekolahku CMS - safe visual layer only.
 * Logic PHP, endpoint, form names, and JS hooks remain in the original files.
 * Visual direction is inspired by the provided Sky Light reference: clean, bright,
 * blue-cyan gradient, rounded cards, soft shadows, and responsive spacing.
 */

:root {
   --theme-primary: #2f92c1;
   --theme-primary-dark: #2179a1;
   --theme-accent: #06beb6;
   --theme-accent-soft: #dff8f7;
   --theme-ink: #27364a;
   --theme-muted: #6b7b8e;
   --theme-line: #e3edf5;
   --theme-card: rgba(255, 255, 255, 0.94);
   --theme-card-solid: #ffffff;
   --theme-footer: #1f5c8d;
   --theme-shadow: 0 .55rem 1.75rem rgba(38, 77, 118, .13);
   --theme-shadow-hover: 0 .75rem 2.35rem rgba(38, 77, 118, .22);
   --theme-radius: 16px;
   --theme-radius-sm: 10px;
   --theme-gradient: linear-gradient(132deg, #06beb6 0%, #2fbac1 45%, #3a96c1 100%);
   --theme-gradient-alt: linear-gradient(135deg, #3a96c1 0%, #6f86d6 100%);
}

* {
   box-sizing: border-box;
}

html {
   scroll-behavior: smooth;
}

body {
   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
   color: var(--theme-ink);
   background-color: #f8f9fc;
   background-image: url("assets/bg.svg");
   background-attachment: fixed;
   background-size: cover;
   background-repeat: no-repeat;
   background-position: center top;
   line-height: 1.6;
}

::-webkit-scrollbar {
   width: 10px;
}

::-webkit-scrollbar-track {
   background: #d9edf4;
}

::-webkit-scrollbar-thumb {
   background: var(--theme-gradient);
   border-radius: 999px;
}

body a {
   color: var(--theme-primary);
   transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

body a:hover,
body a:focus {
   color: var(--theme-accent);
   text-decoration: none;
}

img {
   max-width: 100%;
}

/* Header */
header {
   padding-top: 12px;
}

.top-bar,
.menu-bar {
   max-width: 1140px;
   margin-left: auto;
   margin-right: auto;
}

.top-bar {
   color: #ffffff;
   font-size: 14px;
   padding: 20px 0 12px;
   background: var(--theme-gradient);
   border-radius: var(--theme-radius) var(--theme-radius) 0 0;
   box-shadow: var(--theme-shadow);
   overflow: hidden;
}

.top-bar a,
.top-bar a:hover,
.top-bar a:focus {
   color: #ffffff;
}

.top-bar i {
   margin-right: 6px;
}

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

.top-header img {
   width: 74px;
   height: 74px;
   object-fit: contain;
   padding: 7px;
   background: rgba(255, 255, 255, .92);
   border: 1px solid rgba(255, 255, 255, .45);
   border-radius: 18px;
   box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .12);
}

.top-left {
   margin-bottom: 0;
}

.brand {
   margin-bottom: 2px;
   color: #ffffff;
   font-family: Arial, sans-serif, "Helvetica Neue", Helvetica;
   font-size: 1.15rem;
   font-weight: 800;
   letter-spacing: .3px;
   line-height: 1.25;
   text-transform: uppercase;
}

.top-left small {
   color: rgba(255, 255, 255, .86);
}

.top-right {
   margin-bottom: 0;
   padding-top: 14px;
}

.top-right .list-inline-item {
   margin-bottom: 6px;
   padding: 7px 10px !important;
   color: rgba(255, 255, 255, .95);
   background: rgba(255, 255, 255, .16);
   border: 1px solid rgba(255, 255, 255, .16);
   border-radius: 999px;
   backdrop-filter: blur(4px);
}

/* Navigation */
.menu-bar {
   margin-bottom: 1.25rem !important;
   background: var(--theme-gradient-alt);
   border-bottom: 0;
   border-radius: 0 0 var(--theme-radius) var(--theme-radius);
   box-shadow: var(--theme-shadow);
   text-transform: uppercase;
   font-weight: 700;
   overflow: visible;
}

.sticky.is-sticky {
   position: fixed;
   left: 0;
   right: 0;
   top: 0;
   z-index: 1000;
   width: 100%;
   max-width: 100%;
   border-radius: 0;
   box-shadow: 0 .5rem 1.5rem rgba(14, 65, 95, .2);
}

.navbar-toggler {
   border: 1px solid rgba(255, 255, 255, .4);
   border-radius: 10px;
   margin: 8px 10px 8px auto;
   padding: .45rem .65rem;
}

.sm-clean {
   width: 100%;
   background: transparent;
}

.sm-clean a,
.sm-clean a:hover,
.sm-clean a:focus,
.sm-clean a:active,
.sm-clean a.highlighted {
   color: #ffffff !important;
   border-radius: 10px;
}

.sm-clean > li > a {
   padding: 15px 14px;
   letter-spacing: .2px;
}

.sm-clean > li:hover > a,
.sm-clean > li > a:hover,
.sm-clean > li > a:focus,
.sm-clean > li > a.highlighted {
   background: rgba(255, 255, 255, .16) !important;
}

.sm-clean ul {
   min-width: 230px;
   padding: 8px;
   background: rgba(47, 146, 193, .97);
   border: 0;
   border-radius: 0 0 14px 14px;
   box-shadow: var(--theme-shadow-hover);
}

.sm-clean ul a {
   padding: 10px 12px !important;
   color: #ffffff !important;
}

.sm-clean ul a:hover,
.sm-clean ul a:focus,
.sm-clean ul a:active,
.sm-clean ul a.highlighted {
   background: rgba(255, 255, 255, .18) !important;
   color: #ffffff !important;
}

.sm-clean a .sub-arrow {
   background: rgba(255, 255, 255, .18);
   color: #ffffff;
   border-radius: 6px;
}

/* Carousel and quotes */
.carousel {
   background: transparent;
}

.carousel-inner {
   border-radius: var(--theme-radius);
   box-shadow: var(--theme-shadow);
   overflow: hidden;
}

.carousel-item {
   background-color: #071a2b;
}

.carousel-item img {
   width: 100%;
   max-height: 480px;
   object-fit: cover;
}

.carousel-caption {
   right: 0;
   left: 0;
   bottom: 0;
   padding: 22px 28px;
   color: #ffffff;
   text-align: left;
   background: linear-gradient(180deg, rgba(7, 26, 43, 0), rgba(7, 26, 43, .88));
   border-top: 1px solid rgba(255, 255, 255, .18);
   opacity: 1;
}

.carousel-caption h2,
.carousel-caption p {
   color: #ffffff;
}

.carousel-indicators {
   bottom: 8px;
}

.carousel-indicators li {
   width: 11px;
   height: 11px;
   border-radius: 50%;
   background-color: rgba(255, 255, 255, .78);
}

.carousel-indicators .active {
   background-color: var(--theme-accent);
}

.quote {
   overflow: hidden;
   background: transparent;
   border-radius: var(--theme-radius-sm);
   box-shadow: var(--theme-shadow);
}

.quote-title {
   display: inline-block;
   float: left;
   left: 0;
   top: 0;
   height: 50px;
   padding: 15px 16px;
   color: #ffffff;
   background: var(--theme-accent);
   font-size: 14px;
   font-weight: 800;
   text-transform: uppercase;
}

ul.quote {
   display: block;
   position: relative;
   height: 50px;
   margin: 0;
   padding: 0;
   overflow: hidden;
   list-style: none;
   line-height: 1;
   background: var(--theme-gradient-alt);
}

ul.quote li {
   display: block;
   position: absolute;
   top: -950em;
   left: 0;
   padding: 17px 15px 15px;
   color: #ffffff;
   white-space: nowrap;
   font: 14px Helvetica, Arial, sans-serif;
}

ul.quote li span {
   color: #fff7ad;
   font-weight: 800;
}

/* Content */
.content {
   padding: 4px 0 28px;
}

.page-title {
   position: relative;
   margin-top: 0;
   margin-bottom: 15px;
   padding: 12px 16px 12px 18px;
   color: var(--theme-primary);
   background: var(--theme-card);
   border: 1px solid var(--theme-line);
   border-left: 5px solid var(--theme-primary);
   border-radius: var(--theme-radius-sm);
   box-shadow: 0 .2rem 1rem rgba(38, 77, 118, .09);
   font-weight: 800;
   letter-spacing: .2px;
}

.page-title:after {
   display: none;
}

h6.page-title {
   font-size: .95rem;
}

.card {
   color: var(--theme-ink);
   background: var(--theme-card);
   border-color: var(--theme-line) !important;
   border-radius: var(--theme-radius) !important;
   box-shadow: var(--theme-shadow);
   overflow: hidden;
   transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

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

.card.rounded-0,
.card.rounded,
.card.rounded-lg,
.card.rounded-sm {
   border-radius: var(--theme-radius) !important;
}

.border-secondary {
   border-color: var(--theme-line) !important;
}

.card-body {
   color: var(--theme-ink);
}

.card-title {
   color: var(--theme-primary);
}

h5.card-title {
   font-size: 16px;
   font-weight: 800;
   line-height: 1.4;
}

h5.card-title a {
   color: var(--theme-ink);
}

h5.card-title a:hover {
   color: var(--theme-primary);
}

.card-text {
   color: var(--theme-muted);
}

.text-muted {
   color: #718096 !important;
}

.card-footer {
   background: rgba(240, 248, 252, .72);
   border-top: 1px solid var(--theme-line);
}

/* Post, album, video cards */
.posts,
.content .col-lg-8 > .card,
.content .col-lg-12 > .card,
.content .row .col-md-6 > .card,
.content .row .col-md-4 > .card {
   backdrop-filter: blur(4px);
}

.posts .row.no-gutters,
.content .col-lg-8 > .card .row.no-gutters {
   min-height: 210px;
}

.posts .card-img,
.content .col-lg-8 > .card .row.no-gutters .card-img {
   width: 100%;
   height: 100%;
   min-height: 210px;
   object-fit: cover;
   border-radius: 0 !important;
   transform: scale(1.01);
   transition: transform .35s ease;
}

.posts:hover .card-img,
.content .col-lg-8 > .card:hover .row.no-gutters .card-img {
   transform: scale(1.06);
}

.card-img-top {
   width: 100%;
   min-height: 180px;
   max-height: 260px;
   object-fit: cover;
   border-radius: 0 !important;
}

.embed-responsive {
   border-radius: var(--theme-radius);
   box-shadow: var(--theme-shadow);
   overflow: hidden;
   background: #061927;
}

/* Sidebar */
.sidebar .card {
   margin-bottom: 1rem;
}

.sidebar .card-img-top {
   min-height: 230px;
   max-height: 320px;
}

.sidebar .card-title.text-center {
   color: var(--theme-primary);
   font-size: 1.05rem;
}

.sidebar .list-group {
   margin-bottom: 1rem;
}

.sidebar .list-group-item,
.list-group-item {
   color: var(--theme-ink);
   background: rgba(255, 255, 255, .88);
   border-color: var(--theme-line) !important;
   border-radius: 12px !important;
   margin-bottom: 8px;
   box-shadow: 0 .2rem .85rem rgba(38, 77, 118, .08);
   transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.sidebar .list-group-item:hover,
.list-group-item:hover,
.list-group-item:focus {
   color: var(--theme-primary);
   background: #ffffff;
   transform: translateX(3px);
   box-shadow: 0 .35rem 1rem rgba(38, 77, 118, .14);
}

.sidebar .list-group-item small.border {
   background: var(--theme-accent-soft);
   color: var(--theme-primary-dark);
   border-color: transparent !important;
   border-radius: 999px;
   font-weight: 700;
}

.sidebar form.card {
   padding: .85rem !important;
}

.sidebar a img.img-fluid.w-100 {
   border-radius: var(--theme-radius);
   box-shadow: var(--theme-shadow);
   transition: transform .2s ease, box-shadow .2s ease;
}

.sidebar a img.img-fluid.w-100:hover {
   transform: translateY(-2px);
   box-shadow: var(--theme-shadow-hover);
}

/* Forms */
.form-control,
.custom-select,
textarea.form-control {
   color: var(--theme-ink);
   background-color: #ffffff;
   border-color: var(--theme-line) !important;
   border-radius: 12px !important;
   box-shadow: none;
   transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.form-control:focus,
.custom-select:focus,
textarea.form-control:focus {
   border-color: rgba(47, 146, 193, .55) !important;
   box-shadow: 0 0 0 .2rem rgba(47, 146, 193, .13);
}

.form-group:hover {
   background-color: rgba(6, 190, 182, .06);
   border-radius: 12px;
}

label.control-label,
.form-check-label {
   color: var(--theme-ink);
}

.input-group .form-control {
   border-top-right-radius: 0 !important;
   border-bottom-right-radius: 0 !important;
}

.input-group-append .btn {
   border-top-left-radius: 0 !important;
   border-bottom-left-radius: 0 !important;
}

/* Buttons */
.btn {
   border-radius: 11px !important;
   font-weight: 700;
   transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.btn:hover,
.btn:focus {
   transform: translateY(-1px);
   box-shadow: 0 .35rem 1rem rgba(38, 77, 118, .16);
}

.btn-success,
.action-button {
   color: #ffffff !important;
   background: var(--theme-gradient) !important;
   border-color: transparent !important;
}

.btn-success:hover,
.btn-success:focus,
.action-button:hover,
.action-button:focus {
   color: #ffffff !important;
   background: linear-gradient(132deg, #079e99 0%, #2f92c1 100%) !important;
   border-color: transparent !important;
}

.btn-outline-dark {
   color: var(--theme-primary) !important;
   background: #ffffff;
   border-color: rgba(47, 146, 193, .25) !important;
}

.btn-outline-dark:hover,
.btn-outline-dark:focus {
   color: #ffffff !important;
   background: var(--theme-primary) !important;
   border-color: var(--theme-primary) !important;
}

.btn-warning {
   color: #1f2a37 !important;
   background: #fff3b0 !important;
   border-color: #ffe36f !important;
}

.btn-warning:hover,
.btn-warning:focus {
   background: #ffe36f !important;
}

/* Tables and definition lists */
dl.row dt {
   color: var(--theme-ink);
}

dl.row dd {
   color: var(--theme-muted);
}

.table,
.table td,
.table th {
   border-color: var(--theme-line) !important;
}

/* Maps */
.gmap_canvas,
.gmap_canvas iframe {
   width: 100% !important;
   border-radius: var(--theme-radius);
   overflow: hidden;
}

.gmap_canvas {
   box-shadow: var(--theme-shadow);
   margin-bottom: 1rem;
}

/* Footer */
footer {
   color: #ffffff;
   font-size: 14px;
   padding-bottom: 14px;
}

footer a {
   color: #ffffff;
}

footer a:hover,
footer a:focus {
   color: #fff7ad;
}

footer .widget-box {
   padding: 8px 0 0;
   background: transparent;
}

footer .widget-box .container {
   overflow: hidden;
   border-radius: var(--theme-radius) var(--theme-radius) 0 0;
   box-shadow: var(--theme-shadow);
}

footer .widget-box .row {
   background: var(--theme-gradient);
}

footer .widget-box-1,
footer .widget-box-2,
footer .widget-box-3,
footer .widget-box-4 {
   background: rgba(255, 255, 255, .08);
   border-right: 1px solid rgba(255, 255, 255, .16);
}

footer .widget-box i {
   color: rgba(255, 255, 255, .9);
   filter: drop-shadow(0 .25rem .45rem rgba(0, 0, 0, .12));
}

footer .widget-box h4 {
   color: #ffffff;
}

footer .primary-footer {
   padding: 26px 0;
   background: linear-gradient(135deg, #1f5c8d 0%, #2f92c1 52%, #06beb6 100%);
}

footer .secondary-footer {
   padding: 11px 0;
   background: #174d77;
   border-top: 1px solid rgba(255, 255, 255, .18);
   border-radius: 0 0 var(--theme-radius) var(--theme-radius);
}

footer .copyright {
   color: rgba(255, 255, 255, .88);
   font-size: 10px;
   letter-spacing: 1px;
}

footer .page-title {
   color: #ffffff;
   background: rgba(255, 255, 255, .12);
   border-color: rgba(255, 255, 255, .18);
   border-left-color: #fff7ad;
   box-shadow: none;
}

.social-icon {
   width: 42px;
   height: 42px;
   margin-right: 10px;
   padding-top: 13px;
   color: #ffffff;
   background-color: rgba(255, 255, 255, .18);
   border-radius: 50%;
   font-size: 15px;
   text-align: center;
   box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .12);
}

.linked-in { background-color: #007bb6; }
.facebook { background-color: #3b5998; }
.twitter { background-color: #1da1f2; }
.instagram { background-color: #fbbc05; }
.youtube { background-color: #ef4e17; }

.primary-footer nav ol.breadcrumb {
   background-color: transparent;
}

.tag-content-block {
   display: block;
}

.tag a {
   display: inline-block;
   margin-right: 4px;
   margin-bottom: 6px;
   padding: 9px 10px 8px;
   color: #ffffff;
   background: rgba(255, 255, 255, .18);
   border: 1px solid rgba(255, 255, 255, .12);
   border-radius: 999px;
   font-size: 12px;
   line-height: 11px;
   text-transform: uppercase;
   text-decoration: none;
}

.tag a:hover,
.tag a:focus {
   color: #ffffff;
   background: rgba(255, 255, 255, .3);
   border-color: rgba(255, 255, 255, .45);
}

/* Fullscreen search */
#search_form {
   z-index: 999999;
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(7, 26, 43, .94);
   backdrop-filter: blur(4px);
   transition: all .5s ease-in-out;
   transform: translate(0, -100%) scale(0, 0);
   opacity: 0;
}

#search_form.open {
   transform: translate(0, 0) scale(1, 1);
   opacity: 1;
}

#search_form input[type="search_form"] {
   position: absolute;
   top: 50%;
   width: 100%;
   margin: -58px auto 0;
   padding: 0 30px;
   color: #ffffff;
   background: transparent;
   border: 0;
   outline: none;
   font-size: clamp(28px, 6vw, 60px);
   font-weight: 300;
   text-align: center;
}

#search_form .btn {
   position: absolute;
   top: 50%;
   left: 50%;
   margin-top: 60px;
   margin-left: -52px;
   color: #ffffff !important;
   border-color: rgba(255, 255, 255, .55) !important;
}

#return-to-top {
   z-index: 10000;
   position: fixed;
   right: 16px;
   bottom: 16px;
   display: none;
   width: 38px;
   height: 38px;
   background: var(--theme-gradient);
   border-radius: 50% !important;
   box-shadow: var(--theme-shadow);
   opacity: .82;
   text-decoration: none;
   transition: all .3s ease;
}

#return-to-top i {
   position: relative;
   left: 12px;
   top: 7px;
   margin: 0;
   color: #ffffff;
   font-size: 22px;
   transition: all .3s ease;
}

#return-to-top:hover {
   opacity: 1;
   transform: translateY(-2px);
}

/* Toast colors */
.toast { background-color: #030303; }
.toast-success { background-color: #00b894; }
.toast-error { background-color: #ef5137; }
.toast-info { background-color: #3a96c1; }
.toast-warning { background-color: #ffb848; }
.toast-title,
.toast-message { text-align: left; }

/* Small visual utility classes used by similar themes */
.ani-popup,
.ani-popup-round,
.ani-popdown,
.ani-popdown-logo {
   transition: .25s ease;
}

.ani-popup:hover,
.ani-popup-round:hover {
   transform: scale(1.03);
}

.ani-popdown:hover,
.ani-popdown-logo:hover {
   transform: scale(.98);
}

.btn-tautan,
.btn-sambutan-kepsek {
   color: var(--theme-primary) !important;
   background: #ffffff !important;
   border-radius: 12px !important;
}

.btn-tautan:hover,
.btn-sambutan-kepsek:hover {
   color: #ffffff !important;
   background: var(--theme-primary) !important;
}

.img-ads,
.frame-videos {
   border-radius: var(--theme-radius) !important;
}

/* Responsive */
@media (max-width: 1199.98px) {
   .top-bar,
   .menu-bar {
      max-width: calc(100% - 24px);
   }
}

@media (max-width: 991.98px) {
   .top-left {
      text-align: center !important;
   }

   .top-right {
      display: none;
   }

   .navbar-collapse {
      padding: 0 10px 12px;
   }

   .sm-clean > li > a {
      padding: 11px 12px;
   }

   .sm-clean ul {
      background: rgba(255, 255, 255, .12);
      box-shadow: none;
      border-radius: 10px;
   }

   footer .widget-box .row {
      display: block;
   }

   footer .widget-box-1,
   footer .widget-box-2,
   footer .widget-box-3,
   footer .widget-box-4 {
      width: 100%;
      max-width: 100%;
      border-right: 0;
      border-bottom: 1px solid rgba(255, 255, 255, .16);
   }
}

@media (max-width: 767.98px) {
   body {
      background-attachment: scroll;
   }

   header {
      padding-top: 8px;
   }

   .top-bar,
   .menu-bar {
      max-width: calc(100% - 16px);
   }

   .top-bar {
      padding-top: 16px;
   }

   .top-header {
      justify-content: center;
      flex-direction: column;
      text-align: center;
   }

   .top-header img {
      margin: 0 0 10px !important;
   }

   .brand {
      font-size: 1rem;
   }

   .carousel-indicators {
      display: none;
   }

   .carousel-item img {
      max-height: 300px;
   }

   .carousel-caption {
      padding: 14px 18px;
   }

   .quote-title {
      display: block;
      float: none;
      width: 100%;
      height: auto;
      padding: 11px 14px;
      text-align: center;
   }

   ul.quote {
      height: 48px;
   }

   .posts .row.no-gutters,
   .content .col-lg-8 > .card .row.no-gutters {
      min-height: auto;
   }

   .posts .card-img,
   .content .col-lg-8 > .card .row.no-gutters .card-img {
      height: 220px;
      min-height: 220px;
   }

   .card-img-top {
      max-height: 300px;
   }

   .content {
      padding-bottom: 20px;
   }

   footer .primary-footer,
   footer .secondary-footer {
      max-width: calc(100% - 16px);
      margin-left: auto;
      margin-right: auto;
   }
}

@media (max-width: 575.98px) {
   .container {
      padding-left: 12px;
      padding-right: 12px;
   }

   .page-title {
      padding: 11px 13px;
      font-size: .98rem;
   }

   .card-body {
      padding: 1rem;
   }

   .btn-group {
      display: flex;
      width: 100%;
   }

   .btn-group .btn {
      flex: 1 1 auto;
   }

   #search_form input[type="search_form"] {
      padding: 0 16px;
      font-size: 28px;
   }
}
