/* Base Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #e63946;
    --gray-light: #adb5bd;
    --gray-dark: #495057;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fb;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: auto;
}

.nav-logo {
    height: 44px;
    max-height: 44px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.btn-login, .btn-logout {
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
}

.btn-login {
    background: var(--primary-color);
    color: white !important;
}

.btn-logout {
    background: var(--danger-color);
    color: white !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: white;
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.mobile-link {
    padding: 1rem;
    text-decoration: none;
    color: var(--dark-color);
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Hero Section */
.hero {
    max-width: 900px;
    margin: 2rem auto;
    padding: 3rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--gray-dark);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.welcome-user-wrapper {
    display: flex;
    justify-content: center;
}

.welcome-user {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.75rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
    color: white;
    text-align: left;
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.welcome-user .user-info h3 {
    color: white;
    margin: 0 0 0.35rem 0;
    font-size: 1.35rem;
}

.welcome-user .user-info p {
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-size: 0.95rem;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Categories */
.categories {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.categories h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-decoration: none;
    color: var(--dark-color);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 5px solid var(--cat-color);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.category-icon {
    font-size: 3rem;
    color: var(--cat-color);
    margin-bottom: 1rem;
}

/* Guides */
.popular-guides {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.see-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.guide-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.guide-card:hover {
    transform: translateY(-5px);
}

.guide-category {
    padding: 0.8rem 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-content {
    padding: 1.5rem;
}

.guide-content h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.guide-meta {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    color: var(--gray-light);
    font-size: 0.9rem;
}

.btn-read {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    height: 44px;
    max-height: 44px;
    width: auto;
    display: block;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .nav-brand {
        font-size: 1.15rem;
        gap: 8px;
    }

    .nav-logo {
        height: 32px;
        max-height: 32px;
    }

    .hero {
        padding: 2rem 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 1.85rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .welcome-user {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1.75rem;
    }
    
    .welcome-user .user-info h3 {
        font-size: 1.2rem;
    }
    
    .welcome-user .user-info p {
        font-size: 0.9rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .guides-grid {
        grid-template-columns: 1fr;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer-content {
        padding: 0 1rem;
    }

    .footer-logo {
        font-size: 1.4rem;
    }

    .footer-logo img {
        height: 32px;
        max-height: 32px;
    }

    .footer-links {
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .nav-brand {
        font-size: 1.05rem;
        gap: 6px;
    }

    .nav-logo {
        height: 28px;
        max-height: 28px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-logo {
        font-size: 1.2rem;
    }

    .footer-logo img {
        height: 28px;
        max-height: 28px;
    }
}