/* ==================================
   GLOBAL RESET & TYPOGRAPHY
================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: #0056b3;
    transition: color 0.3s;
}

a:hover {
    color: #003d7a;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
}

/* ==================================
   NAVBAR (FRONTEND)
================================== */

.navbar-lppm {
    background: linear-gradient(135deg, #0056b3, #003d7a);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand span {
    color: #ffd700;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* ==================================
   SIDEBAR ADMIN
================================== */

.sidebar {
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    background: linear-gradient(180deg, #2c3e50, #1a2530);
    color: white;
    padding-top: 70px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar .sidebar-brand {
    padding: 1.5rem 1rem;
    font-weight: 700;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.75rem 1.5rem;
    margin: 0.1rem 0;
    border-radius: 0.375rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    width: 24px;
    margin-right: 10px;
    text-align: center;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(255,215,0,0.2);
    border-right: 3px solid #ffd700;
}

.sidebar .nav-link.text-danger {
    color: #ff6b6b !important;
}

.sidebar .nav-link.text-danger:hover {
    background: rgba(255,107,107,0.1);
    transform: translateX(0);
}

/* ==================================
   CONTENT AREA (ADMIN)
================================== */

.content {
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Untuk layar kecil */
@media (max-width: 992px) {
    .sidebar {
        width: 220px;
    }
    .content {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding-top: 1rem;
    }
    .content {
        margin-left: 0;
    }
}

/* ==================================
   CARD & SECTION STYLING
================================== */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, #0056b3, #003d7a);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* ==================================
   BUTTON STYLING
================================== */

.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #0056b3, #003d7a);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #003d7a, #002a55);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,91,0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border: none;
    color: #212529;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800, #c69500);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62, #343a40);
    transform: translateY(-2px);
}

/* ==================================
   TABLE STYLING
================================== */

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #0056b3, #003d7a);
    color: white;
    font-weight: 600;
    border: none;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(0,86,179,0.05);
}

.table td,
.table th {
    vertical-align: middle;
    padding: 1rem;
}

/* ==================================
   FORM STYLING
================================== */

.form-control {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 0.2rem rgba(0,86,179,0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ==================================
   HOME PAGE SPECIFIC
================================== */

/* Slider Caption Styling */
.carousel-caption {
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    padding: 1rem;
    bottom: 30px;
    max-width: 80%;
    left: 10%;
    right: 10%;
}

/* Infografis Grid */
#infografis-grid .col-6 img {
    border-radius: 8px;
    transition: transform 0.3s;
    cursor: pointer;
}

#infografis-grid .col-6 img:hover {
    transform: scale(1.05);
}

/* Dropdown Rekap */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.dropdown-item:hover {
    background: #0056b3;
    color: white;
}

/* Even Pengabdian Table */
.even-table th,
.even-table td {
    text-align: center;
    vertical-align: middle;
}

/* ==================================
   FOOTER
================================== */

.footer {
    background: linear-gradient(135deg, #2c3e50, #1a2530);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer .footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer p,
.footer a {
    color: rgba(255,255,255,0.7);
}

.footer a:hover {
    color: #ffd700;
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    padding: 1rem 0;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* ==================================
   RESPONSIVE DESIGN
================================== */

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.3rem;
    }

    .carousel-caption {
        bottom: 10px;
        max-width: 90%;
        left: 5%;
        right: 5%;
        padding: 0.75rem;
    }

    .home-grid .col-md-4 {
        margin-bottom: 1.5rem;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table td,
    .table th {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* ==================================
   ANIMATIONS
================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate__fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* ==================================
   ALERT STYLING
================================== */

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* ==================================
   PRINT STYLING (OPTIONAL)
================================== */

@media print {
    .navbar,
    .sidebar,
    .btn,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100% !important;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }
}


/* ==================================
   Tambahan (OPTIONAL)
================================== */



/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Newsletter Button */
#newsletterForm .btn {
    padding: 0.5rem 0.75rem;
}

/* Footer Link Hover */
.footer a:hover {
    text-decoration: underline;
}

.bg-purple {
    background-color: #6f42c1 !important;
    color: white !important;
}

.nav-link.active { 
    background: #495057; color:white; }


<!-- Extra Hover Style -->

  .btn-link {
    text-decoration: none;
    position: relative;
  }
  .btn-link::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -2px;
    background-color: white;
    transition: width 0.3s ease;
  }
  .btn-link:hover::after {
    width: 100%;
  }    

<!-- Extra nafbar alus -->
  html {
  scroll-behavior: smooth;
}

<!-- ttd png/jpg -->
.ttd {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
}

.ttd .box {
  width: 280px;
  text-align: center;
  position: relative;
  font-size: 12pt;
}

/* Area tanda tangan */
.ttd-area {
  position: relative;
  width: 160px;   /* lebar area */
  height: 100px;  /* tinggi area dibatasi */
  margin: 0 auto 10px auto; /* ada jarak bawah */
  overflow: hidden; /* cegah meluber */
}

/* Stempel transparan */
.stempel {
  position: absolute;
  top: 5px;
  left: 5px;
  max-width: 80px;
  max-height: 80px;
  opacity: 0.6;
}

/* Tanda tangan */
.ttd-img {
  position: absolute;
  top: 20px;
  left: 50px;
  max-width: 100px;
  max-height: 60px;
  opacity: 0.9;
}




