*{
  box-sizing:border-box;
  font-family:Arial, Helvetica, sans-serif;
}

body{
  margin:0;
  background:#f2f4f7;
  color:#222;
}

/* ==================== HEADER ==================== */
header {
  background: #a40000;
  height: 15px;
  position: relative;
}

.header-logo-desa {
  position: absolute;
  top: 32px;
  left: 20px;
  z-index: 3;
  max-width: 32%;
}

.header-logo-desa img {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: contain;
}

.header-nav {
  position: absolute;
  top: 30px;
  right: 0;
  max-width: 32%;
}

.header-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #8b0000;
  color: #ffffff;
  text-decoration: none;
  padding: 14px 20px 14px 28px;
  border-radius: 40px 0 0 40px;
  font-weight: 700;
  line-height: 1.2;
}

.header-nav .nav-text {
  text-align: center;
  font-size: 14px;
}

.header-nav .nav-logo {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-nav .nav-logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.header-box {
  position: absolute;
  left: 50%;
  bottom: -95px;
  transform: translateX(-50%);
  background: #a40000;
  padding: 22px 40px;
  border-radius: 0 0 12px 12px;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 68%;
  box-sizing: border-box;
  z-index: 2;
}

.header-text h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

.header-text span {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  opacity: 0.9;
  line-height: 1.2;
}

/* ================= LAYOUT ================= */
.wrapper{
  max-width:1200px;
  margin:180px auto 40px;
}

.top-section{
  display:grid;
  grid-template-columns:2.4fr 1.2fr;
  gap:30px;
  padding:0 10px;
}

/* CARD KIRI */
.left-card{
  background:#ffffff;
  border-radius:15px;
  padding:24px;
  box-shadow:0 10px 28px rgba(0,0,0,.12);
  display:flex;
  flex-direction:column;
  height:100%;
}

.image-box{
  overflow:hidden;
  border-radius:10px;
}

.image-box img{
  width:100%;
  height:auto;
  object-fit:contain;
  border-radius:10px;
  transition:transform .4s ease, box-shadow .4s ease;
}

.image-box:hover img{
  transform:scale(1.08);
  box-shadow:0 20px 40px rgba(0,0,0,.25);
}

.left-desc{
  margin-top:18px;
  flex-grow:1;
}

.left-desc p{
  font-size:17px;
  line-height:1.9;
  text-align:justify;
}

/* ================= PANEL BERITA ================= */
.side-news-card{
  background:#7f1d1d;
  border-radius:12px;
  padding:26px;
  color:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,0.1);
  height: fit-content;  
}

.search-box{
  position:relative;
  margin-bottom:20px;
}

.search-box input{
  width:100%;
  padding:12px 40px 12px 16px;
  border:none;
  border-radius:8px;
  background:rgba(255,255,255,0.2);
  color:#fff;
  font-size:14px;
  outline:none;
}

.search-box input::placeholder{
  color:rgba(255,255,255,0.7);
}

.search-box span{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  font-size:16px;
  color:#fff;
  pointer-events:none;
}

/* ================= ITEM BERITA ================= */
.news-item{
  background:#991b1b;
  border-radius:8px;
  padding:15px;
  display:flex;
  gap:16px;
  cursor:pointer;
  transition:all .3s ease;
  transform:scale(1);
  box-shadow:0 2px 4px rgba(0,0,0,.2);
  margin-bottom:12px;
}

.news-item:hover{
  background:#dc2626;
  transform:scale(1.05);
  box-shadow:0 8px 16px rgba(0,0,0,.3);
  z-index:10;
}

.news-item img{
  width:110px;
  height:78px;
  border-radius:6px;
  object-fit:cover;
  flex-shrink:0;
  display:block;
  transition:transform .3s ease;
}

.news-item:hover img{
  transform:scale(1.1);
}

.news-item div{
  flex:1;
}

.news-item h4{
  margin:0 0 6px;
  color:#fff;
  font-size:14px;
  font-weight:600;
  line-height:1.4;
  transition:color .3s ease;
}

.news-item:hover h4{
  color:#fef2f2;
}

.news-item p{
  margin:0;
  color:rgba(255,255,255,.8);
  font-size:13px;
  line-height:1.4;
  transition:color .3s ease;
}

.news-item:hover p{
  color:rgba(255,255,255,.95);
}

/* ================= CONTENT ================= */
.title{
  margin:30px 10px 18px;
  font-size:27px;
  font-weight:700;
}

.content{
  max-width:760px;
  padding:0 10px;
}

.content p{
  font-size:18px;
  line-height:1.9;
  text-align:justify;
}

/* ================= FILE PDF ================= */
.files{
  margin:180px auto 40px;
  text-align:center;
}

.files h3{
  font-size:22px;
  font-weight:700;
}

.files .underline{
  width:80px;
  height:3px;
  background:#000;
  margin:8px auto 40px;
  border-radius:5px;
}

.file-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:30px;
  max-width:1000px;
  margin:0 auto;
}

.file-card{
  background:#ffffff;
  border-radius:10px;
  display:flex;
  align-items:center;
  text-decoration:none;
  color:#333;
  height:80px;
  box-shadow:0 6px 15px rgba(0,0,0,0.15);
  transition:0.3s ease;
  overflow:hidden;
}

.file-card:hover{
  transform:translateY(-4px);
}

.pdf-box{
  width:80px;
  height:100%;
  background:#ff0000;
  display:flex;
  align-items:center;
  justify-content:center;
}

.pdf-box span{
  color:#fff;
  font-weight:700;
  font-size:14px;
}

.file-text{
  padding-left:18px;
  font-size:15px;
  font-weight:600;
}

/* ================= FOOTER ================= */
.footer{
  background:#9b2f2f;
  color:#fff;
  margin-top:80px;
}

.footer-container{
  display:grid;
  grid-template-columns:1.3fr 1fr 1.3fr;
  gap:40px;
  padding:40px 60px;
}

.footer-left,
.footer-middle,
.footer-right{
  display:flex;
  flex-direction:column;
}

.footer h3{
  color:#ffcc00;
  font-size:18px;
  margin-bottom:10px;
}

.footer-left .logo{
  display:flex;
  gap:15px;
  align-items:center;
}

.footer-left img{
  width:72px;
}

.footer-left h2{
  margin:0;
}

.footer-left .desc{
  font-size:14px;
}

.footer ul{
  list-style:none;
  padding:0;
  margin:0;
}

.footer li{
  display:flex;
  gap:10px;
  font-size:14px;
  margin-bottom:10px;
}

.footer-bottom{
  background:#7a0c0c;
  text-align:center;
  padding:12px;
  color:#ffcc00;
  font-size:14px;
}

/* ==================== RESPONSIVE MOBILE ==================== */
@media (max-width: 768px) {
  /* Layout konten mobile */
  .top-section {
    grid-template-columns: 1fr;
  }
  
  .file-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }

  /* Header mobile - sama seperti desktop, hanya ukuran dikecilkan */
  header {
    height: 15px;
  }

 .header-logo-desa {
    top: 12px;
    left: 6px;
    max-width: 45%;
  }

  .header-logo-desa img {
    width: 55%;
    margin-top: 15px;
  }

  .header-nav {
    top: 18px;
    right: 0;
    max-width: 150px;
  }

  .header-nav a {
    padding: 8px 10px 8px 14px;
    gap: 8px;
  }

  .header-nav .nav-text {
    font-size: 5px;
    line-height: 1.2;
  }

  .header-nav .nav-logo {
    width: 32px;
    height: 32px;
  }

  .header-nav .nav-logo img {
    width: 35px;
    height: 35px;
  }

  /* Box merah tengah - tetap di bawah seperti desktop */
  .header-box {
    bottom: -70px;
    padding: 14px 20px;
    max-width: 45%;
  }

  .header-text h1 {
    font-size: 16px;
    white-space: normal;
    line-height: 1.3;
  }

  .header-text span {
    font-size: 7px;
    margin-top: 4px;
  }

  /* Wrapper disesuaikan */
  .wrapper {
    margin-top: 100px;
  }

  
  /* ===== RESPONSIF TEXT BERITA & KONTEN ===== */
  
  /* Panel berita sidebar */
  .side-news-card {
    padding: 20px;
  }

  .search-box input {
    padding: 10px 36px 10px 14px;
    font-size: 13px;
  }

  

  /* Content article text */
  .title {
    font-size: 26px;
    margin: 20px 10px 14px;
  }

  .content p {
    font-size: 1px;
    line-height: 1.8;
  }

  /* Left card description */
  .left-card {
    padding: 20px;
  }

  .left-desc p {
    font-size: 16px;
    line-height: 1.8;
  }
  .file-grid {
    max-width: 91%;
  }
}

/* Smooth transitions */
.header-logo-desa img,
.header-nav a,
.header-box {
  transition: all 0.2s ease-in-out;
}