/**
 * Components CSS - UPA TIK UNTAD
 * Mengatur elemen UI modular seperti Cards, Stats, dan Buttons.
 * Final Organized Version
 */

/* ======================================================
   1. SECTION HEADERS
   Mengatur styling judul agar lebih tegas, modern, dan informatif.
   ====================================================== */
.section-header {
    margin-bottom: 50px;
}

.section-header .title-area {
    border-left: 6px solid var(--secondary-color); /* Garis Kuning Gold Untad */
    padding-left: 20px;
    margin-bottom: 40px;
    position: relative;
}

/* Sub-title kecil di atas judul utama */
.section-header .sub-title {
    display: block;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

/* Aksen garis kecil di bawah judul */
.section-header h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--secondary-color);
    margin-top: 15px;
    border-radius: 2px;
}

/* Khusus untuk Header yang ingin diletakkan di tengah (Center Aligned) */
.text-center.section-header .title-area {
    border-left: none;
    padding-left: 0;
}

.text-center.section-header h2::after {
    margin: 15px auto 0 auto; /* Garis bawah pindah ke tengah */
}

/* ======================================================
   2. SEARCH ITEM CARDS
   Styling kartu hasil pencarian.
   ====================================================== */
.search-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-post-thumbnail {
    flex: 0 0 250px;
}

/* ======================================================
   3. STATS SECTION PREMIUM
   Mengatur tampilan angka statistik/pencapaian.
   ====================================================== */
.stats-section {
    background: #f0f7ff;
    padding: 100px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.stat-item {
    background: var(--primary-dark);
    padding: 45px 20px;
    border-radius: 24px;
    text-align: center;
    color: var(--white);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.stat-item:hover {
    transform: translateY(-12px);
    background: #002544;
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-heavy);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

/* ======================================================
   4. NEWS CARDS SYSTEM (GRID & CARD)
   Sistem kartu berita untuk Blog atau Berita Terbaru.
   ====================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.news-thumb { 
    position: relative; 
    height: 220px; 
    overflow: hidden; 
}

.news-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.news-card:hover .news-thumb img {
    transform: scale(1.1);
}

.news-category { 
    position: absolute; 
    top: 15px; 
    left: 15px; 
    background: var(--secondary-color); 
    color: var(--white); 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: 700;
    z-index: 2;
}

.news-content { 
    padding: 25px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.news-meta { 
    font-size: 13px; 
    color: var(--text-light); 
    margin-bottom: 12px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.news-title { 
    font-size: 1.25rem; 
    margin-bottom: 15px; 
    line-height: 1.4; 
}

.news-title a { 
    color: var(--text-dark); 
    text-decoration: none; 
    font-weight: 700; 
    transition: color 0.3s;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-excerpt { 
    font-size: 14px; 
    color: var(--text-light); 
    margin-bottom: 20px; 
    line-height: 1.6; 
}

.read-more { 
    margin-top: auto; 
    font-weight: 700; 
    color: var(--primary-color); 
    text-decoration: none; 
    font-size: 14px; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 10px;
}

/* ======================================================
   5. LAYANAN HOME SECTION (Layanan TIK)
   Mengatur grid dan kartu untuk layanan fasilitas digital.
   ====================================================== */
.layanan-home-section {
    padding: 100px 0;
    background: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-item-card {
    text-align: center;
    padding: 40px 30px;
    background: #f8fafc;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-item-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.layanan-icon {
    margin-bottom: 25px;
}

.layanan-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.layanan-icon .dashicons {
    font-size: 50px;
    width: 50px;
    height: 50px;
    color: var(--primary-color);
}

.service-item-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
    transition: color 0.3s;
}

.service-item-card:hover h3 {
    color: var(--secondary-color);
}

.service-item-card p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-link {
    color: var(--primary-color);
    font-weight: 800;
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-link .dashicons {
    font-size: 16px;
    vertical-align: middle;
    margin-left: 5px;
}

/* ======================================================
   6. CUSTOM BUTTONS
   Tombol khusus dengan gaya UPA TIK UNTAD.
   ====================================================== */
.btn-primary-untad {
    background: var(--primary-color);
    color: var(--white);
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary-untad:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 74, 153, 0.3);
}

/* ======================================================
   7. FACULTIES GRID SYSTEM
   Mengatur tampilan daftar fakultas secara dinamis.
   ====================================================== */
.faculties-section {
    padding: 80px 0;
    background: var(--white);
}

.faculties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.faculty-link-wrapper {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease;
}

.faculty-item {
    padding: 35px 20px;
    border: 1px solid #f0f0f0;
    border-radius: 15px;
    text-align: center;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.fac-icon-wrapper .dashicons {
    font-size: 42px;
    width: 42px;
    height: 42px;
    color: var(--secondary-color);
    margin-bottom: 18px;
    display: inline-block;
}

.faculty-item h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.3;
}

.fac-action-text {
    margin-top: 15px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Hover States for Faculties */
.faculty-link-wrapper:hover .faculty-item {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 35px rgba(255, 193, 7, 0.15);
}

.faculty-link-wrapper:hover h4 {
    color: var(--secondary-color);
}

.faculty-link-wrapper:hover .fac-action-text {
    opacity: 1;
    letter-spacing: 1px;
}

/* Responsive Grid for Mobile */
@media screen and (max-width: 768px) {
    .faculties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .faculty-item {
        padding: 25px 15px;
    }
    .faculty-item h4 {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   8. UPA TIK UNTAD - LAYANAN COMPONENTS
   ========================================================================== */

/* Banner & Header Archive */
.layanan-archive-banner {
    background: linear-gradient(135deg, #001f3f 0%, #004a99 100%);
    padding: 130px 0 60px;
    color: #ffffff;
    text-align: center;
}

.layanan-archive-banner .sub-title {
    color: #f39c12;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.layanan-archive-banner .page-title {
    margin: 0;
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
}

.layanan-archive-banner .title-line {
    width: 70px;
    height: 4px;
    background: #f39c12;
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Grid System */
.layanan-grid-container {
    background: #f8fafc;
    padding: 80px 0;
}

.layanan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Card Style */
.layanan-card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    height: 100%;
}

.layanan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    border-color: #f39c12;
}

.layanan-card-icon {
    width: 80px;
    height: 80px;
    background: #f8fafc;
    color: #004a99;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.layanan-card h3 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.layanan-card h3 a {
    text-decoration: none;
    color: #004a99;
}

.layanan-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-detail-layanan {
    margin-top: auto;
    color: #004a99;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.btn-detail-layanan:hover {
    background: #004a99;
    color: #fff;
}

/* Pagination */
.upa-pagination {
    margin-top: 60px;
    text-align: center;
}

.upa-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    color: #004a99;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.upa-pagination .page-numbers.current {
    background: #004a99;
    color: #fff;
    border-color: #004a99;
}

/* ======================================================
    9. FORM & INTERACTION COMPONENTS
    Styling untuk Form Kontak dan Sistem Tiket
   ====================================================== */

.contact-form-wrapper {
    background: #ffffff;
    padding: 35px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.upa-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.upa-form .form-group { 
    margin-bottom: 20px; 
}

.upa-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-size: 0.9rem;
}

.upa-form .form-control {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.upa-form .form-control:focus {
    background: #fff;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
    outline: none;
}

/* Tombol Kirim Custom */
.btn-submit-contact {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-submit-contact:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 74, 153, 0.2);
}

.btn-submit-contact:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Feedback Messages */
.form-feedback {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
    text-align: center;
}

.form-feedback.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

.form-feedback.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

/* Animasi Spinner untuk loading button */
.spin {
    animation: upa-spin 1s infinite linear;
}

@keyframes upa-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Form */
@media screen and (max-width: 600px) {
    .upa-form .form-row { 
        grid-template-columns: 1fr; 
    }
}

/* ======================================================
    10. KONTAK & MAP SECTION (HOME PAGE)
    Styling untuk bagian Hubungi Kami di beranda.
    ====================================================== */
.section-kontak {
    padding: 100px 0;
    background: #f8fafc; /* Senada dengan layanan-grid-container */
}

.kontak-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Kolom Informasi Kiri */
.kontak-info h2 { 
    color: var(--primary-dark); 
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 25px; 
}

.kontak-info p {
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 35px;
}

.info-item { 
    display: flex; 
    align-items: flex-start; 
    margin-bottom: 25px; 
}

/* Perbaikan Icon Dashicons agar presisi */
.info-item .dashicons { 
    font-size: 24px; 
    width: 24px;
    height: 24px;
    color: var(--secondary-color); 
    margin-right: 20px; 
    background: #fff; 
    padding: 12px; 
    border-radius: 10px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.info-text strong {
    display: block;
    color: var(--primary-dark);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-text span {
    color: #64748b;
    font-size: 0.95rem;
}

/* Kolom Form Kanan (Card) */
.kontak-form-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    border: 1px solid #e2e8f0;
}

.kontak-form-card h3 {
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: var(--primary-dark);
}

/* --- Form Styling (Agar tidak polos) --- */
.kontak-form-card .upa-form input, 
.kontak-form-card .upa-form textarea {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--primary-dark);
    transition: all 0.3s ease;
    box-sizing: border-box; /* Penting: mencegah input melebar */
}

.kontak-form-card .upa-form input:focus, 
.kontak-form-card .upa-form textarea:focus {
    background: #fff;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
    outline: none;
}

/* Tombol Submit Premium */
.kontak-form-card .btn-submit {
    width: 100%;
    background: var(--primary-color);
    color: #ffffff;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 74, 153, 0.2);
}

.kontak-form-card .btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 74, 153, 0.3);
}

/* Responsif untuk Tablet dan HP */
@media (max-width: 992px) {
    .kontak-wrapper { 
        grid-template-columns: 1fr; 
        gap: 40px;
    }
    .kontak-info { text-align: center; }
    .info-item { 
        flex-direction: column; 
        align-items: center; 
        text-align: center; 
    }
    .info-item .dashicons { margin-right: 0; margin-bottom: 15px; }
}