/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4%;
    background-color: rgba(255, 255, 255, 0.98);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

/* Logo Container */
.navbar-brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.navbar-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Navigation Links - Hidden on mobile by default */
.navbar-nav {
    display: flex;
    justify-content: center;
    flex: 1;
}

.nav-links {
    display: none; /* Hidden on mobile */
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #2d3748;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Auth Buttons */
.navbar-actions {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

/* Button Styles - Optimized for mobile */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border: none;
    white-space: nowrap;
}

.btn-login {
    background-color: transparent;
    border: 1.5px solid #3b82f6;
    color: #3b82f6;
}

.btn-login:hover {
    background-color: #3b82f6;
    color: white;
}

.btn-register {
    background-color: #3b82f6;
    border: 1.5px solid #3b82f6;
    color: white;
}

.btn-register:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Mobile Menu Toggle (if needed) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #2d3748;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===== HERO SECTION - MOBILE OPTIMIZED ===== */
.hero {
    height: 100vh;
    min-height: 500px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('../images/dpp1.jpg') no-repeat center center;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 4%;
    margin-top: 60px;
    color: white;
    position: relative;
}

.hero-content {
    max-width: 100%;
    text-align: center;
    z-index: 2;
}

.hero h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.6;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.cta-button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* ===== ABOUT SECTION - MOBILE OPTIMIZED ===== */
.about-us {
    padding: 40px 4%;
    background-color: #f8fafc;
    color: #2d3748;
    line-height: 1.7;
}

.about-us .container {
    max-width: 100%;
    margin: 0 auto;
}

.about-us-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.6rem;
    color: #1a202c;
    font-weight: 700;
}

.about-us p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    text-align: justify;
}

.about-us ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.about-us ul li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* ===== SOCIAL LINKS SECTION - MOBILE OPTIMIZED ===== */
.social-links-section {
    padding: 30px 4%;
    background-color: #ffffff;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.social-links-title {
    font-size: 1.4rem;
    color: #1a202c;
    margin-bottom: 25px;
    font-weight: 700;
}

.social-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 350px;
    margin: 0 auto;
}

.social-link-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2d3748;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.social-link-item:hover {
    transform: translateY(-3px);
    color: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    background-color: #ffffff;
}

.social-icon {
    width: 35px;
    height: 35px;
    margin-right: 15px;
    object-fit: contain;
    flex-shrink: 0;
}

.social-link-item span {
    font-size: 0.95rem;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

/* ===== WARNING POPUP - MOBILE OPTIMIZED ===== */
.warning-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 15px; /* Kurangi padding untuk layar yang lebih kecil */
    opacity: 1;
    transition: opacity 0.3s ease;
}

.warning-popup.hidden {
    opacity: 0;
    pointer-events: none;
}

.warning-content {
    background-color: #ffffff;
    border-radius: 12px;
    width: 95%; /* Gunakan persentase untuk lebar */
    max-width: 500px; /* Lebar maksimum yang sedikit lebih besar untuk PC */
    max-height: 95vh; /* Tinggi maksimum berdasarkan viewport height */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex; /* Gunakan flexbox untuk layout internal */
    flex-direction: column; /* Atur item dalam kolom */
}

.warning-body {
    padding: 0; /* Padding akan diberikan pada gambar jika diperlukan */
    text-align: center;
    overflow-y: auto; /* Memungkinkan scroll jika konten melebihi tinggi */
    max-height: calc(95vh - 70px); /* Kurangi tinggi footer dari total tinggi popup */
    display: flex; /* Flexbox untuk gambar */
    flex-direction: column; /* Gambar di atas tombol (jika ada text di body) */
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* Biarkan body mengisi ruang yang tersedia */
}

.warning-image {
    width: 100%;
    height: auto;
    display: block;
    padding: 15px; /* Padding di sekitar gambar */
    object-fit: contain; /* Memastikan gambar sepenuhnya terlihat */
    max-width: 100%; /* Batasi lebar gambar agar tidak melebihi container */
}

.warning-footer {
    padding: 15px;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0; /* Pastikan footer tidak menyusut */
}

.close-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px; /* Tingkatkan max-width tombol untuk PC */
    margin: 0 auto;
    display: block;
}

.close-btn:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 10px 3%;
    }
    
    .navbar-logo {
        height: 40px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .auth-buttons {
        gap: 6px;
    }
    
    .hero {
        margin-top: 55px;
        min-height: 450px;
        padding: 0 3%;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .hero p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .cta-button {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .about-us, .social-links-section {
        padding: 25px 3%;
    }
    
    .about-us-title {
        font-size: 1.4rem;
    }
    
    .social-links-title {
        font-size: 1.2rem;
    }
    
    .social-links-grid {
        max-width: 100%;
        gap: 12px;
    }
    
    .social-link-item {
        padding: 12px;
    }
    
    .social-icon {
        width: 30px;
        height: 30px;
        margin-right: 12px;
    }
    
    .social-link-item span {
        font-size: 0.9rem;
    }

    /* Popup specific for very small mobiles */
    .warning-popup {
        padding: 10px;
    }

    .warning-content {
        width: 98%; /* Sedikit lebih lebar untuk layar sangat kecil */
        border-radius: 8px;
    }

    .warning-image {
        padding: 10px;
    }

    .close-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Large Mobile (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .navbar-logo {
        height: 50px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.05rem;
    }
    
    .social-links-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 500px;
        gap: 15px;
    }
    
    .social-link-item span {
        font-size: 0.9rem;
    }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .navbar {
        padding: 15px 4%;
    }
    
    .navbar-logo {
        height: 60px;
    }
    
    .nav-links {
        display: flex;
    }
    
    .hero {
        margin-top: 75px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .social-links-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 700px;
        gap: 20px;
    }
    
    .social-link-item {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    
    .social-icon {
        margin-right: 0;
        margin-bottom: 10px;
        width: 40px;
        height: 40px;
    }

    /* Popup specific for tablets */
    .warning-popup {
        padding: 20px;
    }
    .warning-content {
        max-width: 550px;
    }
}

/* Desktop (1025px+) */
@media (min-width: 1025px) {
    .navbar {
        padding: 15px 5%;
    }
    
    .navbar-logo {
        height: 70px;
    }
    
    .nav-links {
        display: flex;
        gap: 30px;
    }
    
    .nav-links a {
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    .auth-buttons {
        gap: 15px;
    }
    
    .hero {
        margin-top: 85px;
        padding: 0 5%;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-content {
        max-width: 600px;
        text-align: left;
    }
    
    .about-us, .social-links-section {
        padding: 60px 5%;
    }
    
    .about-us .container {
        max-width: 900px;
    }
    
    .social-links-grid {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        max-width: 900px;
        gap: 30px;
    }
    
    .social-link-item {
        flex-direction: column;
        text-align: center;
        min-width: 120px;
        max-width: 180px;
        padding: 25px 20px;
    }
    
    .social-icon {
        width: 50px;
        height: 50px;
        margin-right: 0;
        margin-bottom: 15px;
    }

    /* Popup specific for desktops */
    .warning-popup {
        padding: 20px;
    }
    .warning-content {
        max-width: 600px; /* Lebar maksimum yang lebih besar untuk PC */
        border-radius: 15px;
    }

    .warning-image {
        padding: 20px;
    }

    .close-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

/* Prevent horizontal scroll on all devices */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.nav-links a:focus,
.social-link-item:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .warning-popup {
        display: none !important;
    }
    
    .hero {
        margin-top: 0;
    }
}