/* Universal Box-Sizing for a predictable layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* General Styling & Branding */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    color: #333333;
    margin: 0;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: #1b4680;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header */
.header {
    background-color: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1b4680;
    text-decoration: none;
}

.nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: absolute;
    top: 60px; /* Positions the menu below the header */
    right: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 10;
}

.nav.is-open {
    display: flex; /* Display menu when toggled */
}

/* These styles are necessary for the mobile menu toggle to work properly */
.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #1b4680;
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block;
    }
}

.nav a {
    margin: 10px 0;
    color: #333333;
    text-decoration: none;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: #1b4680;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #143564;
}

.btn-outline {
    background-color: transparent;
    color: #1b4680;
    border: 2px solid #1b4680;
}

.btn-outline:hover {
    background-color: #1b4680;
    color: #ffffff;
}

/* Hero Section */
.hero-section {
    background-color: #f0f2f5;
    color: #333333;
    text-align: center;
    padding: 50px 20px;
}
.hero-section h1 {
    color: #1b4680;
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.hero-section p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 20px;
}
.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* General Dashboard Layout */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.dashboard-main {
    flex-grow: 1;
    padding: 1rem;
    background-color: #f7f9fc;
}
.dashboard-heading {
    color: #1b4680;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
}
.welcome-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.welcome-section h2 {
    text-align: center;
}
.user-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #1b4680;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 0;
    margin-bottom: 1rem;
}

/* Cards */
.dashboard-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}
.card {
    flex: 1 1 100%;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 5px solid #1b4680;
}
.card h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.5rem;
}
.card-count {
    font-size: 2rem;
    font-weight: bold;
    color: #1b4680;
}
.progress-bar-container {
    background-color: #e0e0e0;
    border-radius: 4px;
    height: 8px;
    margin-top: 1rem;
}
.progress-bar {
    height: 100%;
    background-color: #1b4680;
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}
.profile-complete-text {
    font-weight: bold;
    color: #1b4680;
    margin-top: 0.5rem;
}

/* Sections */
.dashboard-section {
    margin-top: 1.5rem;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-direction: column;
    text-align: center;
}
.section-header h3 {
    font-size: 1.2rem;
    color: #1b4680;
    margin-bottom: 0.5rem;
}

/* ========================================================= */
/* Media Queries for Tablet and Desktop */
/* ========================================================= */

@media (min-width: 768px) {
    /* Tablet & Desktop */
    .header-content {
        padding: 0;
    }
    
    .mobile-menu-toggle {
        display: none; /* Hide the toggle button on larger screens */
    }

    .nav {
        display: flex; /* Always display nav on larger screens */
        flex-direction: row;
        position: static;
        top: auto;
        right: auto;
        background: none;
        box-shadow: none;
        padding: 0;
    }
    .nav a {
        margin: 0 10px;
    }

    .hero-section {
        padding: 100px 20px;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .hero-section p {
        font-size: 1.2rem;
    }

    .hero-cta {
        flex-direction: row;
        gap: 20px;
        justify-content: center;
    }
    
    .welcome-section {
        flex-direction: row;
    }
    .user-avatar-placeholder {
        width: 60px;
        height: 60px;
        margin-right: 1.5rem;
        margin-bottom: 0;
    }

    .dashboard-container {
        flex-direction: row;
    }
    .dashboard-main {
        padding: 2rem;
    }
    .dashboard-cards {
        flex-direction: row;
    }
    .card {
        flex: 1;
    }
    .dashboard-heading {
        margin-bottom: 2rem;
    }
    .section-header {
        flex-direction: row;
        text-align: left;
    }
    .section-header h3 {
        margin-bottom: 0;
    }
}
