/* Main Stylesheet */
@import 'variables.css';

/* Global Fixes */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--color-light);
    color: var(--color-text);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 var(--spacing-md);
}

header .logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    z-index: 1001;
    text-decoration: none;
}

/* Desktop Nav */
header nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    margin: 0;
    padding: 0;
    align-items: center;
}

header nav a {
    color: var(--color-white);
    font-weight: 500;
    text-decoration: none;
}

header nav a:hover {
    color: var(--color-primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    padding: 5px;
}

.mobile-menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    transition: 0.3s;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--color-secondary);
        padding-top: 80px;
        transition: 0.3s ease-in-out;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    header nav.active {
        right: 0;
    }

    header nav ul {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 0 20px;
    }

    header nav a {
        font-size: 1.2rem;
        display: block;
        padding: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Adjustments for grids */
    .container {
        padding: 0 20px;
        width: 100%;
    }

    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Header Logo */
    header .logo {
        font-size: 1.1rem;
        max-width: 70%;
    }

    /* Hero Section Text */
    section[style*="padding: 100px 0"] {
        padding: 60px 0 !important;
    }

    h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    p {
        font-size: 1rem !important;
    }

    .btn {
        display: block;
        width: 100%;
        margin: 10px 0 !important;
    }

    /* Fix images in cards */
    .card img {
        height: auto !important;
        max-height: 300px;
    }
}

/* Footer */
footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xxl);
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-in-out;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 80px);
    /* Adjust based on header height */
}

.sidebar {
    width: 250px;
    background-color: var(--color-dark);
    color: white;
    padding: 20px;
    flex-shrink: 0;
}

.sidebar a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: 0.2s;
}

.sidebar a:hover,
.sidebar a.active {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: #f4f6f9;
}

/* Mobile Sidebar */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 10px;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

/* Auth Pages */
.auth-container {
    max-width: 500px;
    margin: var(--spacing-xxl) auto;
    padding: var(--spacing-lg);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border-top: 5px solid var(--color-primary);
}

.auth-title {
    text-align: center;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Multi-step Form */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step.active {
    background: var(--color-primary);
    color: var(--color-secondary);
}

.step.completed {
    background: var(--color-secondary);
    color: var(--color-primary);
}