/* style.css */

:root {
    --primary: #4a6fa5;
    --secondary: #ff7e5f;
    --light: #f8f9fa;
    --dark: #343a40;
    --success: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background: linear-gradient(135deg, var(--primary), #3a5683);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
    color: var(--secondary);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* [DIUBAHSUAI] Latar belakang hero ditukar */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('https://images.unsplash.com/photo-1534528741775-53994a69daeb?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.hero p {
    font-size: 1.1rem;
    color: var(--dark);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 120px 15px 25px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: var(--secondary);
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.search-btn:hover {
    background: var(--secondary);
}

.gender-tabs {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.gender-tab {
    padding: 10px 20px;
    margin: 0 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gender-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.gender-tab:hover:not(.active) {
    background: #f0f0f0;
}

.filter-controls {
    max-width: 800px;
    margin: 1.5rem auto 0;
    padding: 1rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.alphabet-filter a {
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.alphabet-filter a:hover {
    background-color: #eef2f7;
}

.alphabet-filter a.active {
    background-color: var(--primary);
    color: white;
}

.names-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}

.name-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.name-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.name-card h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.3rem; }
.name-card p { color: #666; margin-bottom: 15px; }
.name-card .origin { display: inline-block; background: #f0f0f0; padding: 3px 10px; border-radius: 50px; font-size: 0.8rem; color: #555; margin-bottom: 15px; }
.name-actions { display: flex; justify-content: space-between; border-top: 1px solid #eee; padding-top: 15px; }
.action-btn { background: none; border: none; cursor: pointer; color: #666; font-size: 0.9rem; display: flex; align-items: center; transition: color 0.3s ease; }
.action-btn i { margin-right: 5px; }
.action-btn:hover { color: var(--primary); }
.bookmarked { color: var(--secondary); }
.all-names-section, .bookmarks-section { margin: 3rem 0; }
.section-title { font-size: 1.8rem; color: var(--primary); margin-bottom: 1.5rem; position: relative; padding-bottom: 10px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 3px; background: var(--secondary); }

footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.footer-links {
    display: flex;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: white;
    margin: 5px 10px;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--secondary);
}

.social-icons {
    margin-bottom: 1rem;
}

.social-icons a {
    color: white;
    margin: 0 10px;
    font-size: 1.2rem;
}

.social-icons a:hover {
    color: var(--secondary);
}

.copyright {
    font-size: 0.9rem;
    color: #aaa;
}

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal-content { background: white; border-radius: 10px; padding: 30px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; position: relative; }
.close-modal { position: absolute; top: 15px; right: 15px; font-size: 1.5rem; background: none; border: none; cursor: pointer; color: #666; }
.modal-title { color: var(--primary); margin-bottom: 1rem; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--success); color: white; padding: 10px 20px; border-radius: 5px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); display: none; z-index: 1000; }

@media (max-width: 768px) {
    .header-content {}
    
    .logo {
        margin-bottom: 0;
    }
    
    nav.nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #3a5683;
        z-index: 100;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    
    nav.nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu ul li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu ul li a {
        display: block;
        padding: 1rem;
    }

    .nav-menu ul li a:hover {
        background-color: var(--primary);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .names-container {
        grid-template-columns: 1fr;
    }

    .all-names-section, .bookmarks-section {
        margin: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .search-input { padding: 12px 95px 12px 20px; }
    .search-btn { padding: 0 20px; font-size: 0.9rem; }
    .gender-tabs, .filter-controls { flex-wrap: wrap; }
    .gender-tab { margin: 5px; padding: 8px 15px; font-size: 0.9rem; }
}