/* =========================================
   SMA AR-RIDWAN - PREMIUM MODERN DESIGN
   ========================================= */

:root {
    --ar-green: #123c35;
    --ar-green2: #1e5549;
    --ar-gold: #d6b56d;
    --ar-cream: #f5f1e7;
    --ar-paper: #fffdf8;
    --ar-text: #29352f;
    --ar-muted: #78827b;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--ar-text);
    background: var(--ar-paper);
}

section { scroll-margin-top: 95px; }

/* NAVBAR */
.navbar.fixed-top {
    background: rgba(255,253,248,.97) !important;
    padding: 13px 0;
    box-shadow: 0 5px 25px rgba(18,60,53,.09) !important;
    backdrop-filter: blur(14px);
}

.navbar .navbar-brand {
    color: var(--ar-green) !important;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.navbar .navbar-brand img {
    object-fit: contain;
    border-radius: 50%;
}

.navbar .nav-link {
    color: var(--ar-green) !important;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 13px !important;
    transition: .25s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #a47c35 !important;
}

.navbar .nav-link.active {
    border-bottom: 2px solid var(--ar-gold);
}

.navbar .btn {
    border-radius: 30px;
    padding: 9px 22px !important;
    font-weight: 600;
}

/* HERO */
#hero {
    overflow: hidden;
    background: var(--ar-green);
}

#hero .hero-slide {
    min-height: 690px;
    height: 88vh;
    max-height: 850px;
    background-position: center;
    background-size: cover;
}

#hero .hero-overlay {
    min-height: inherit;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 100px 10%;
    background:
        linear-gradient(90deg,
        rgba(8,35,30,.92) 0%,
        rgba(8,35,30,.72) 48%,
        rgba(8,35,30,.12) 100%);
}

#hero .hero-text {
    max-width: 850px;
    color: #fffdf8;
    font-size: clamp(38px,5.5vw,72px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -2px;
}

#hero .hero-subtitle {
    max-width: 620px;
    color: #f1eadb;
    font-size: 17px;
    line-height: 1.9;
}

/* SECTION HEADINGS */
.program-section,
#berita,
#join,
#foto,
#fasilitas {
    position: relative;
}

.program-section {
    padding: 100px 0;
    background: var(--ar-cream);
}

.program-section h2,
#berita h2,
#foto h2,
#fasilitas h3 {
    color: var(--ar-green);
    font-weight: 800;
    letter-spacing: -.8px;
}

/* PROGRAM CARDS */
.program-section .card {
    height: 100%;
    padding: 28px 22px;
    border: 1px solid rgba(18,60,53,.08) !important;
    border-radius: 22px !important;
    background: var(--ar-paper);
    box-shadow: 0 8px 25px rgba(18,60,53,.05) !important;
    transition: .35s ease;
}

.program-section .card:hover {
    transform: translateY(-10px);
    border-color: var(--ar-gold) !important;
    box-shadow: 0 20px 40px rgba(18,60,53,.13) !important;
}

/* NEWS */
#berita {
    padding: 100px 0;
    background: var(--ar-paper);
}

#berita .header-berita {
    margin-bottom: 40px;
}

#berita .card {
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(18,60,53,.08) !important;
    border-radius: 22px !important;
    background: white;
    box-shadow: 0 8px 28px rgba(18,60,53,.06) !important;
    transition: .35s ease;
}

#berita .card:hover {
    transform: translateY(-9px);
    box-shadow: 0 20px 40px rgba(18,60,53,.14) !important;
}

#berita .card img {
    width: 100%;
    height: 235px;
    object-fit: cover;
    transition: transform .5s ease;
}

#berita .card:hover img {
    transform: scale(1.045);
}

#berita .card-body { padding: 23px !important; }

#berita .card-title {
    color: var(--ar-green);
    font-weight: 700;
    line-height: 1.5;
}

/* HEADMASTER */
#join {
    padding: 100px 0;
    background: var(--ar-cream);
}

#join img {
    border-radius: 24px;
    box-shadow: 18px 18px 0 var(--ar-gold);
}

/* GALLERY */
#foto {
    padding: 100px 0;
}

#foto .foto-card {
    overflow: hidden;
    position: relative;
    height: 100%;
    border-radius: 20px;
    background: white;
    box-shadow: 0 10px 30px rgba(18,60,53,.09);
    transition: .3s ease;
}

#foto .foto-card:hover {
    transform: translateY(-7px);
}

#foto .foto-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform .5s ease;
}

#foto .foto-card:hover .foto-img {
    transform: scale(1.06);
}

#foto .foto-title {
    padding: 15px;
    margin: 0;
    color: var(--ar-green);
    font-weight: 700;
}

/* EXTRACURRICULAR */
#fasilitas {
    padding: 100px 0 !important;
    background: var(--ar-cream);
}

#fasilitas .container {
    padding-top: 15px !important;
}

#fasilitas h3 {
    font-size: clamp(28px,3vw,38px);
    margin-bottom: 40px;
}

#fasilitas .card {
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(18,60,53,.07) !important;
    border-radius: 22px !important;
    background: white;
    box-shadow: 0 8px 25px rgba(18,60,53,.07) !important;
    transition: .35s ease;
}

#fasilitas .card:hover {
    transform: translateY(-9px);
    box-shadow: 0 20px 40px rgba(18,60,53,.15) !important;
}

#fasilitas .card-img-top {
    height: 205px !important;
    width: 100%;
    object-fit: cover;
    border-radius: 0 !important;
    transition: transform .5s ease;
}

#fasilitas .card:hover .card-img-top {
    transform: scale(1.045);
}

#fasilitas .card-body {
    padding: 20px 12px !important;
}

#fasilitas .card-body p {
    color: var(--ar-green);
    font-size: 15px;
    font-weight: 700;
}

/* BUTTONS */
.btn-primary,
.btn-danger {
    color: white !important;
    background: var(--ar-green) !important;
    border: 1px solid var(--ar-green) !important;
    border-radius: 30px !important;
    padding: 12px 27px !important;
    font-weight: 600;
    transition: .3s ease;
}

.btn-primary:hover,
.btn-danger:hover {
    color: var(--ar-green) !important;
    background: var(--ar-gold) !important;
    border-color: var(--ar-gold) !important;
}

#fasilitas .btn {
    border: 1px solid var(--ar-gold) !important;
    color: var(--ar-green) !important;
    background: transparent !important;
}

#fasilitas .btn:hover {
    background: var(--ar-gold) !important;
}

/* FOOTER */
#footer {
    padding: 45px 0;
    background: var(--ar-green) !important;
}

#footer footer {
    background: transparent !important;
}

#footer h5 {
    color: white !important;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 22px;
}

#footer p,
#footer li,
#footer a,
#footer .text-muted {
    color: #e4e9df !important;
}

#footer a {
    text-decoration: none;
    transition: .25s ease;
}

#footer a:hover { color: var(--ar-gold) !important; }

#footer .nav-link {
    font-size: 14px;
    line-height: 1.9;
}

#footer + section {
    background: #0b2c27 !important;
    color: #e4e9df;
}

#footer + section p,
#footer + section a {
    color: #e4e9df !important;
}

/* RESPONSIVE */
@media(max-width: 991px) {
    .navbar .navbar-collapse {
        padding: 15px 0;
        background: var(--ar-paper);
    }

    .navbar .nav-link.active {
        border-bottom: 0;
    }

    #hero .hero-slide {
        min-height: 580px;
    }
}

@media(max-width: 768px) {
    #hero .hero-slide {
        min-height: 500px;
        height: 75vh;
    }

    #hero .hero-overlay {
        padding: 75px 7%;
        background: rgba(8,35,30,.68);
    }

    #hero .hero-text {
        font-size: 38px;
        letter-spacing: -1px;
    }

    #hero .hero-subtitle { font-size: 15px; }

    .program-section,
    #berita,
    #join,
    #foto,
    #fasilitas {
        padding: 65px 0 !important;
    }

    #fasilitas .card-img-top { height: 155px !important; }

    #foto .foto-img { height: 190px; }

    #footer .d-flex {
        flex-wrap: wrap;
        gap: 14px;
    }
}

@media(max-width: 480px) {
    #hero .hero-text { font-size: 31px; }
    #fasilitas .card-img-top { height: 130px !important; }
    #fasilitas .card-body p { font-size: 13px; }
}

/* ===== HEADMASTER SECTION - EDITORIAL PREMIUM ===== */

.headmaster-section {
    position: relative;
    overflow: hidden;
    padding: 110px 0 !important;
    background:
        radial-gradient(circle at 5% 15%, rgba(214,181,109,.15), transparent 28%),
        linear-gradient(135deg, #f8f5ec 0%, #fffdf8 60%, #edf3ed 100%);
}

.headmaster-layout {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 75px;
}

.headmaster-photo {
    position: relative;
    max-width: 460px;
    margin: auto;
    padding: 0 0 45px 25px;
}

.headmaster-photo-frame {
    position: relative;
    padding: 12px;
    background: white;
    border: 1px solid rgba(214,181,109,.7);
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(18,60,53,.15);
}

.headmaster-photo-frame::before {
    content: "";
    position: absolute;
    inset: -10px 18px 18px -10px;
    border: 2px solid var(--ar-gold);
    border-radius: 28px;
    z-index: 0;
}

.headmaster-photo-frame img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 510px;
    object-fit: cover;
    object-position: center top;
    border-radius: 19px;
    border: 0 !important;
    box-shadow: none !important;
}

.headmaster-photo-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 17px 23px;
    max-width: 290px;
    color: white;
    background: var(--ar-green);
    border-left: 4px solid var(--ar-gold);
    border-radius: 8px 0 8px 8px;
    box-shadow: 0 12px 25px rgba(18,60,53,.18);
}

.headmaster-photo-caption span {
    color: var(--ar-gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.headmaster-photo-caption strong {
    font-size: 13px;
    font-weight: 600;
}

.headmaster-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    color: #99763c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.headmaster-eyebrow span {
    display: inline-block;
    width: 38px;
    height: 2px;
    background: var(--ar-gold);
}

.headmaster-content h2 {
    margin-bottom: 28px;
    color: var(--ar-green);
    font-family: Georgia, serif;
    font-size: clamp(29px, 3vw, 43px);
    font-weight: 700;
    line-height: 1.25;
}

.headmaster-name {
    padding-left: 18px;
    margin-bottom: 25px;
    border-left: 3px solid var(--ar-gold);
}

.headmaster-name h3 {
    margin: 0 0 5px;
    color: var(--ar-green);
    font-size: 21px;
    font-weight: 800;
}

.headmaster-name p {
    margin: 0;
    color: var(--ar-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.headmaster-message p {
    margin-bottom: 17px;
    color: #59645d;
    font-size: 14px;
    line-height: 1.95;
    text-align: justify;
}

.headmaster-closing {
    margin-top: 24px;
    color: var(--ar-green);
    font-size: 14px;
    font-weight: 700;
}

@media(max-width: 991px) {
    .headmaster-layout {
        grid-template-columns: 1fr;
        gap: 55px;
    }

    .headmaster-photo {
        width: 100%;
        max-width: 430px;
    }

    .headmaster-photo-frame img {
        height: 460px;
    }

    .headmaster-content {
        max-width: 750px;
        margin: auto;
    }
}

@media(max-width: 576px) {
    .headmaster-section {
        padding: 65px 0 !important;
    }

    .headmaster-photo {
        max-width: 330px;
        padding-left: 12px;
    }

    .headmaster-photo-frame img {
        height: 370px;
    }

    .headmaster-content h2 {
        font-size: 29px;
    }

    .headmaster-message p {
        font-size: 13px;
        text-align: left;
    }
}

/* ===== FINAL FIX: HEADMASTER TWO-COLUMN LAYOUT ===== */

#join.headmaster-section {
    padding: 90px 0 !important;
}

#join .headmaster-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 65px !important;
    width: 100% !important;
}

#join .headmaster-photo {
    flex: 0 0 40% !important;
    width: 40% !important;
    max-width: 420px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 0 35px 20px !important;
    box-sizing: border-box !important;
}

#join .headmaster-photo-frame {
    width: 100% !important;
    box-sizing: border-box !important;
}

#join .headmaster-photo-frame img {
    display: block !important;
    width: 100% !important;
    height: 490px !important;
    object-fit: cover !important;
    object-position: center 20% !important;
}

#join .headmaster-photo-caption {
    right: -10px !important;
    bottom: 0 !important;
}

#join .headmaster-content {
    flex: 1 1 60% !important;
    width: 60% !important;
    min-width: 0 !important;
    max-width: none !important;
}

#join .headmaster-content h2 {
    font-size: clamp(28px, 2.5vw, 40px) !important;
}

#join .headmaster-message p {
    font-size: 14px !important;
    line-height: 1.85 !important;
    text-align: left !important;
}

@media (max-width: 991px) {
    #join .headmaster-layout {
        flex-direction: column !important;
        gap: 45px !important;
    }

    #join .headmaster-photo {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 420px !important;
    }

    #join .headmaster-content {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 750px !important;
    }
}

@media (max-width: 576px) {
    #join.headmaster-section {
        padding: 60px 0 !important;
    }

    #join .headmaster-photo-frame img {
        height: 370px !important;
    }

    #join .headmaster-content h2 {
        font-size: 27px !important;
    }
}

/* =====================================
   HALAMAN DAFTAR BERITA SMA AR-RIDWAN
===================================== */

.news-page {
    padding: 150px 0 90px;
    min-height: 70vh;
    background: var(--ar-paper, #f8f7f2);
}

.news-heading {
    max-width: 760px;
    margin: 0 auto 55px;
}

.news-eyebrow {
    display: inline-block;
    color: #b18a3b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 14px;
}

.news-heading h1 {
    color: #17483e;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    margin-bottom: 16px;
}

.news-heading p {
    color: #69766f;
    font-size: 16px;
    line-height: 1.8;
}

.news-heading-line {
    width: 65px;
    height: 4px;
    border-radius: 10px;
    background: #c5a45c;
    margin: 25px auto 0;
}

.news-card {
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(23,72,62,.09);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(23,72,62,.06);
    transition: transform .3s ease, box-shadow .3s ease;
}

.news-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 38px rgba(23,72,62,.13);
}

.news-image-link {
    display: block;
    position: relative;
    overflow: hidden;
    height: 235px;
    background: #e9eee9;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-image-label {
    position: absolute;
    left: 16px;
    bottom: 15px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(23,72,62,.9);
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.news-image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #17483e;
    font-weight: 800;
    letter-spacing: 3px;
}

.news-card-body {
    padding: 23px;
}

.news-date {
    color: #9a865c;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 13px;
}

.news-date-icon {
    color: #b18a3b;
    margin-right: 7px;
}

.news-title {
    font-size: 19px;
    line-height: 1.5;
    font-weight: 750;
    margin-bottom: 12px;
}

.news-title a {
    color: #17483e;
    text-decoration: none;
}

.news-title a:hover {
    color: #b18a3b;
}

.news-excerpt {
    color: #69766f;
    font-size: 14px;
    line-height: 1.8;
    min-height: 75px;
    margin-bottom: 18px;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #17483e;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.news-read-more:hover {
    color: #b18a3b;
}

.news-pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.news-pagination nav {
    display: flex;
    justify-content: center;
}

.news-empty {
    padding: 65px 20px;
    background: #fff;
    border-radius: 20px;
}

.news-empty h3 {
    color: #17483e;
    font-weight: 800;
}

.news-empty p {
    color: #69766f;
}

@media (max-width: 767px) {
    .news-page {
        padding: 115px 0 60px;
    }

    .news-heading {
        margin-bottom: 35px;
    }

    .news-image-link {
        height: 220px;
    }

    .news-card-body {
        padding: 19px;
    }

    .news-title {
        font-size: 17px;
    }

    .news-excerpt {
        min-height: auto;
    }
}



/* ===== GALERI FOTO SMA AR-RIDWAN ===== */
.gallery-page {
    position: relative;
    margin-top: 85px;
    padding: 75px 0 100px;
    background: #fbfaf6 !important;
    background-image: none !important;
    color: #183d35;
}

.gallery-heading {
    max-width: 720px;
    margin: 0 auto 48px;
}

.gallery-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: #a47b35;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
}

.gallery-heading h1 {
    margin-bottom: 14px;
    color: #173e35;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: -1.2px;
}

.gallery-heading p {
    margin: 0;
    color: #69766f;
    font-size: 16px;
    line-height: 1.8;
}

.gallery-heading-line {
    width: 58px;
    height: 4px;
    margin: 24px auto 0;
    border-radius: 10px;
    background: #b89552;
}

.gallery-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(23, 62, 53, .08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(23, 62, 53, .07);
    transition: transform .3s ease, box-shadow .3s ease;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(23, 62, 53, .13);
}

.gallery-image-wrap {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #eeeae1;
}

.gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.gallery-card:hover .gallery-image {
    transform: scale(1.045);
}

.gallery-caption {
    padding: 20px 21px 22px;
}

.gallery-caption-label {
    color: #a47b35;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.gallery-caption h3 {
    margin: 8px 0 0;
    color: #173e35;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .gallery-page {
        margin-top: 65px;
        padding: 55px 0 70px;
    }

    .gallery-heading {
        margin-bottom: 32px;
    }

    .gallery-caption {
        padding: 15px;
    }

    .gallery-caption h3 {
        font-size: 14px;
    }
}
