/* =========================
   SMA NEGERI 1 BINJAI
   CSS ringkas dan responsif
   ========================= */
:root {
    --navy: #101f43;
    --navy-light: #1d3768;
    --red: #d62839;
    --red-dark: #b91f2d;
    --white: #fff;
    --light: #f1f4f9;
    --text: #293449;
    --muted: #6b7280;
    --border: #e5e9f1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 85px; }
body {
    margin: 0;
    color: var(--text);
    background: var(--white);
    font-family: "Plus Jakarta Sans", sans-serif;
    line-height: 1.7;
}
a { text-decoration: none; }
img { max-width: 100%; }
section { scroll-margin-top: 76px; }

/* NAVBAR */
.navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1030;
    width: 100%;
    padding: 13px 0;
    background: var(--navy);
    box-shadow: 0 4px 18px #0002;
}
.navbar-brand {
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .3px;
}
.navbar-brand img { width: 43px; height: 43px; object-fit: contain; }
.navbar-nav { gap: 5px; }
.navbar .nav-link {
    padding: 10px 12px !important;
    color: #fffd;
    font-size: 13px;
    font-weight: 600;
    transition: color .3s;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active { color: #ff5967; }

.page-content { min-height: 60vh; padding-top: 69px; }

/* HERO / CAROUSEL */
.hero-carousel { overflow: hidden; background: var(--navy); }
.hero-carousel .carousel-item {
    position: relative;
    height: 620px;
    background: var(--navy);
}
.hero-carousel .carousel-item > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}
.hero-carousel .carousel-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #101f43f0 0%, #101f43c2 48%, #101f4340 100%);
}
.hero-carousel .carousel-caption {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: auto;
    bottom: auto;
    left: 12%;
    width: 72%;
    max-width: 760px;
    padding: 0;
    text-align: left;
    transform: translateY(-50%);
}
.hero-label {
    display: inline-block;
    margin-bottom: 20px;
    padding: 7px 14px;
    border-left: 4px solid var(--red);
    background: #ffffff1f;
    color: var(--white);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}
.hero-carousel .carousel-caption h1 {
    margin-bottom: 20px;
    color: var(--white);
    font-size: clamp(32px, 4.5vw, 58px);
    font-weight: 800;
    line-height: 1.2;
}
.hero-carousel .carousel-caption h1 span { color: #ff5967; }
.hero-carousel .carousel-caption p {
    max-width: 620px;
    margin-bottom: 28px;
    color: #edf1f8;
    font-size: 15px;
    line-height: 1.9;
}
.btn-red {
    display: inline-block;
    padding: 12px 23px;
    border: 1px solid var(--red);
    border-radius: 6px;
    background: var(--red);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    transition: .3s;
}
.btn-red:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
    color: var(--white);
    transform: translateY(-2px);
}
.hero-carousel .btn-outline-light {
    padding: 12px 23px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}
.hero-carousel .carousel-indicators { z-index: 3; margin-bottom: 25px; }
.hero-carousel .carousel-indicators button {
    width: 30px;
    height: 5px;
    margin: 0 5px;
    border: 0;
    border-radius: 5px;
}
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next { z-index: 3; width: 8%; }
.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon { width: 35px; height: 35px; }

/* SECTION DAN JUDUL */
.section-padding { padding: 80px 0; }
.section-heading { max-width: 700px; margin: 0 auto 42px; }
.section-label {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--red);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}
.section-heading h2 {
    margin-bottom: 13px;
    color: var(--navy);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.3;
}
.section-heading h2 span { color: var(--red); }
.section-heading p { margin: 0; color: #626d80; font-size: 14px; line-height: 1.8; }

/* KARTU BERANDA */
.info-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 24px;
    overflow: hidden;
    border: 2px solid #cbd5e5;
    border-radius: 14px;
    background: #f7f9fd;
    box-shadow: 0 5px 16px #101f4317;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}
.info-card:hover {
    border-color: var(--red);
    box-shadow: 0 10px 25px #101f4326;
    transform: translateY(-4px);
}
.home-card-img {
    display: block;
    width: calc(100% + 48px);
    max-width: none;
    height: 220px;
    flex-shrink: 0;
    margin: -24px -24px 20px;
    border-bottom: 1px solid var(--border);
    object-fit: cover;
}
.info-card .card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin: 0 0 16px;
    border-radius: 10px;
    background: var(--red);
    color: var(--white);
    font-size: 23px;
}
.info-card h4 {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.4;
}
.info-card p {
    flex-grow: 1;
    margin: 0 0 20px;
    color: #475569;
    font-size: 14px;
    line-height: 1.8;
}
.info-card a {
    align-self: flex-start;
    margin-top: auto;
    color: var(--red-dark);
    font-size: 14px;
    font-weight: 800;
}
.info-card a:hover { color: #851522; text-decoration: underline; }

/* AKADEMIK */
.section-dark { background: var(--navy); }
.section-dark .section-heading h2 { color: var(--white); }
.section-dark .section-heading p { color: #c7d0e0; }
.section-dark .info-card {
    min-height: 280px;
    height: auto;
    padding: 24px;
    border: 1px solid #cbd5e5;
    background: var(--light);
    box-shadow: 0 4px 12px #00000014;
}
.section-dark .info-card .card-icon { margin-bottom: 16px; }
.section-dark .info-card h4 { font-size: 19px; }
.section-dark .info-card p { flex-grow: 0; margin-bottom: 0; color: #475569; }
.section-dark .info-card a { margin-top: 18px; }

/* PROFIL */
.about-img {
    width: 100%;
    height: 430px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 15px 40px #101f431f;
}
.content-title { margin-bottom: 18px; color: var(--navy); font-size: 27px; font-weight: 800; }
.text-muted { color: var(--muted) !important; }
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 25px 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--light);
}
.info-box > i { color: var(--red); font-size: 24px; }
.info-box h6 { margin-bottom: 5px; color: var(--navy); font-weight: 800; }
.info-box p { margin: 0; color: var(--muted); font-size: 13px; }
.vision-box { margin-top: 18px; padding-left: 16px; border-left: 3px solid var(--red); }
.vision-box h5 { color: var(--navy); font-size: 16px; font-weight: 800; }
.vision-box h5 i { color: var(--red); }
.vision-box p, .vision-box li { color: var(--muted); font-size: 13px; }
.vision-box ul { margin-bottom: 0; padding-left: 18px; }
.vision-box li { margin-bottom: 5px; }

/* BERITA */
.news-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 5px 22px #101f430d;
    transition: .3s;
}
.news-card:hover { box-shadow: 0 15px 35px #101f431f; transform: translateY(-6px); }
.news-card > img { display: block; width: 100%; height: 220px; object-fit: cover; }
.news-body { padding: 24px; }
.news-tag {
    display: inline-block;
    margin-bottom: 13px;
    padding: 5px 10px;
    border-radius: 4px;
    background: #fdecef;
    color: var(--red);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.news-body h5 { margin-bottom: 12px; color: var(--navy); font-size: 17px; font-weight: 800; line-height: 1.5; }
.news-body p { margin-bottom: 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.news-body a { color: var(--red); font-size: 12px; font-weight: 800; }

/* GALERI */
.gallery-section { background: var(--light); }
.gallery-item {
    position: relative;
    display: block;
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--navy);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, #101f43e6);
    opacity: .9;
    transition: .3s;
}
.gallery-item span {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 18px;
    left: 18px;
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
}
.gallery-item span i { margin-right: 7px; color: #ff5967; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover::after { background: linear-gradient(transparent 20%, #101f43f2); }

/* KONTAK */
.contact-card {
    height: 100%;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 7px 28px #101f430d;
}
.contact-card h4 { margin-bottom: 18px; color: var(--navy); font-size: 21px; font-weight: 800; }
.contact-card > p { font-size: 13px; }
.contact-line { display: flex; align-items: flex-start; gap: 15px; margin-top: 25px; }
.contact-line > i {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 43px;
    height: 43px;
    border-radius: 9px;
    background: #fdecef;
    color: var(--red);
    font-size: 20px;
}
.contact-line h6 { margin-bottom: 5px; color: var(--navy); font-size: 13px; font-weight: 800; }
.contact-line p { margin: 0; color: var(--muted); font-size: 12px; }
.social-links { display: flex; gap: 10px; margin: 28px 0 15px; }
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    border-radius: 8px;
    background: var(--navy);
    color: var(--white);
    transition: .3s;
}
.social-links a:hover { background: var(--red); transform: translateY(-3px); }
.contact-card small { font-size: 10px; }
.form-label { color: var(--navy); font-size: 12px; font-weight: 700; }
.form-control {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-family: inherit;
    font-size: 12px;
}
.form-control:focus { border-color: var(--navy-light); box-shadow: 0 0 0 3px #1d37681a; }
textarea.form-control { resize: vertical; }
.form-message { margin: 15px 0 0; color: var(--navy-light); font-size: 12px; }


/* FOOTER */
.footer {
  padding: 45px 0 0;
  background: #0a1632;
  color: #c7d0e0;
}

.footer .row {
  padding-bottom: 30px;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 15px;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.footer p {
  max-width: 380px;
  color: #aeb9cc;
  font-size: 12px;
  line-height: 1.9;
}

.footer h6 {
  margin-bottom: 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.footer .col-md-3 a {
  display: block;
  margin-bottom: 10px;
  color: #aeb9cc;
  font-size: 12px;
  text-decoration: none;
  transition: color .3s;
}

.footer .col-md-3 a:hover {
  color: #ff5967;
}

.footer-bottom {
  margin-top: 0;
  padding: 20px 0;
  border-top: 1px solid #ffffff1a;
  text-align: center;
}

.footer-bottom p {
  max-width: none;
  margin: 0;
  font-size: 11px;
}

@media (max-width: 767px) {
  .footer {
    padding-top: 35px;
  }

  .footer .row {
    padding-bottom: 20px;
  }
}


/* TABLET */
@media (max-width: 991px) {
    .navbar-nav { align-items: flex-start !important; padding-top: 12px; }
    .navbar .nav-link { padding: 9px 0 !important; }
    .hero-carousel .carousel-item { height: 560px; }
    .hero-carousel .carousel-caption { left: 10%; width: 78%; }
    .about-img { height: 360px; }
}

/* SMARTPHONE */
@media (max-width: 767px) {
    .section-padding { padding: 55px 0; }
    .section-heading { margin-bottom: 30px; }
    .hero-carousel .carousel-item { height: 500px; }
    .hero-carousel .carousel-item::after { background: #101f43c7; }
    .hero-carousel .carousel-caption { left: 9%; width: 82%; }
    .hero-carousel .carousel-caption h1 { font-size: clamp(29px, 7vw, 40px); }
    .hero-carousel .carousel-caption p { font-size: 12px; line-height: 1.8; }
    .hero-carousel .carousel-caption .btn { margin: 4px 4px 4px 0 !important; padding: 10px 13px; font-size: 11px; }
    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next { width: 7%; }
    .about-img { height: 280px; }
    .content-title { font-size: 23px; }
    .home-card-img { height: 190px; }
    .info-card { padding: 23px; }
    .info-card h4 { font-size: 18px; }
    .section-dark .info-card { min-height: 0; padding: 22px; }
    .news-card > img { height: 210px; }
    .gallery-item { height: 190px; }
    .contact-card { padding: 22px; }
}

/* SMARTPHONE KECIL: sekitar 375px */
@media (max-width: 420px) {
    .navbar-brand { font-size: 11px; }
    .navbar-brand img { width: 36px; height: 36px; }
    .hero-carousel .carousel-item { height: 460px; }
    .hero-carousel .carousel-caption h1 { font-size: 28px; }
    .hero-carousel .carousel-caption p { font-size: 11px; }
    .home-card-img { height: 165px; }
    .gallery-item { height: 155px; }
}
.home-gallery {
  padding-top: 45px;
  padding-bottom: 65px;
  background: #fff;
}

.home-gallery .section-heading {
  margin-bottom: 28px;
}

.home-gallery-item {
  display: block;
  position: relative;
  height: 190px;
  overflow: hidden;
  border-radius: 12px;
  text-decoration: none;
  background: #101f43;
}

.home-gallery-item::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(16, 31, 67, 0.85));
}

.home-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.home-gallery-item:hover img {
  transform: scale(1.05);
}

.home-gallery-item span {
  position: absolute;
  z-index: 1;
  bottom: 12px;
  left: 12px;
  right: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.home-gallery-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 25px;
  padding: 10px 22px;
}

@media (max-width: 767px) {
  .home-gallery-item {
    height: 210px;
  }

  .home-gallery .section-heading {
    margin-bottom: 22px;
  }
}

@media (max-width: 375px) {
  .home-gallery-item {
    height: 180px;
  }
}

/* PERBAIKAN FOOTER INDEX */
body {
  overflow-x: hidden;
}

main.page-content {
  padding-bottom: 0;
}

.home-gallery {
  padding-bottom: 35px;
  margin-bottom: 0;
}

.home-gallery .container {
  width: 100%;
  max-width: 1320px;
}

.footer {
  width: 100%;
  margin: 0;
  padding: 45px 0 0;
  background: #0a1632;
  border-radius: 0;
}

.footer > .container {
  width: 100%;
  max-width: 1320px;
  padding-right: 12px;
  padding-left: 12px;
}

.footer .row {
  padding-bottom: 30px;
}

.footer-bottom {
  margin-top: 0;
  padding: 20px 0;
}

@media (max-width: 767px) {
  .home-gallery {
    padding-bottom: 30px;
  }

  .footer {
    padding-top: 35px;
  }
}
