/* ============================================
   SISTEM INFORMASI PELAYANAN DESA TIROWALI
   Main Stylesheet - Modern & Responsive
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary-color: #1565C0;
    --accent-color: #FF9800;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
    --info-color: #2196F3;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Ensures sticky works properly */
    min-height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Ensure body has proper positioning context */
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    /* Ensures smooth scrolling doesn't interfere */
    will-change: transform;
}

/* Add slight blur effect when scrolling for better visibility */
.header.scrolled {
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.98), rgba(27, 94, 32, 0.98));
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: white;
    margin: 0;
}

.logo-text p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #0D47A1;
    color: white;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
}

/* Section */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-box {
    text-align: center;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
}

/* Information Card */
.info-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow-md);
}

.info-card-image {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius);
    flex-shrink: 0;
}

.info-card-content {
    flex: 1;
}

.info-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.info-card-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 20px;
    background: var(--primary-light);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.table tr:hover {
    background: var(--bg-light);
}

.table-responsive {
    overflow-x: auto;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #E8F5E9;
    border-left: 4px solid var(--success-color);
    color: #2E7D32;
}

.alert-warning {
    background: #FFF3E0;
    border-left: 4px solid var(--warning-color);
    color: #E65100;
}

.alert-danger {
    background: #FFEBEE;
    border-left: 4px solid var(--danger-color);
    color: #C62828;
}

.alert-info {
    background: #E3F2FD;
    border-left: 4px solid var(--info-color);
    color: #1565C0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: #333;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

.badge-info {
    background: var(--info-color);
    color: white;
}

.badge-secondary {
    background: var(--text-muted);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-dark);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background: #1B5E20;
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer p {
    opacity: 0.9;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: white;
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-box {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Breadcrumb */
.breadcrumb {
    background: var(--bg-white);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.breadcrumb ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.breadcrumb li::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--text-muted);
}

.breadcrumb li:last-child::after {
    content: '';
}

.breadcrumb a {
    color: var(--primary-color);
}

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 60px auto;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--primary-color);
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--bg-light);
}

/* Responsive */
@media (max-width: 992px) {
    .main-nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-md);
    }
    
    .main-nav ul.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .info-card {
        flex-direction: column;
    }
    
    .info-card-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .section {
        padding: 40px 0;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.hidden { display: none; }
.visible { display: block; }

/* Additional Modern Styles */
.justify-center {
    justify-content: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-danger {
    color: var(--danger-color);
}

/* Modern Card Hover Effects */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 60px 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Button White */
.btn-white {
    background: white;
    color: var(--primary-color);
}

.btn-white:hover {
    background: var(--bg-light);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Info Card Modern */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card-modern {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.info-card-modern:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.info-card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.info-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.info-card-modern:hover .info-card-image-wrapper img {
    transform: scale(1.05);
}

.info-card-body {
    padding: 1.5rem;
}

.info-card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.info-card-body h3 a {
    color: var(--text-dark);
}

.info-card-body h3 a:hover {
    color: var(--primary-color);
}

.info-card-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.hero{
padding: 130px 0 80px 0;
margin-top: 80px;
}

@media (max-width:768px){

.hero{
    margin-top: 80px;
    padding-top: 90px;
}

}

.password-wrapper{
position: relative;
}

.password-input{
padding-right: 45px;
}

.password-toggle{
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
color: #888;
font-size: 16px;
}

.password-toggle:hover{
color: #333;
}

.page-header{
margin-top:0px;
border-top:none;
}

.breadcrumb{
margin-bottom:0;
border:none;
box-shadow:none;
}

