/* core/static/css/style.css */

/* ==========================================================================
   1. VARIABLES & GLOBAL RESETS
   ========================================================================== */
:root {
    --primary-color: #ff9900; /* Amber/Orange for Construction */
    --secondary-color: #2D3748; /* Dark Slate Gray */
    --text-color: #4A5568;
    --light-text-color: #718096;
    --white: #ffffff;
    --light-gray-bg: #F7FAFC;
    --border-color: #E2E8F0;
    --danger-color: #E53E3E;
    --success-color: #38A169;
    --info-color: #3182CE;
    --header-height: 70px;
    --border-radius: 6px;
    --font-sans: 'Montserrat', sans-serif;
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 80px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background-color: var(--white);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
}
body.dashboard-body { background-color: var(--light-gray-bg); }
body.mobile-menu-open { overflow: hidden; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
a { color: var(--primary-color); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary-color); }
h1, h2, h3, h4 { font-weight: 800; color: var(--secondary-color); margin-bottom: 1rem; }
main { padding: 3rem 0; }

/* ==========================================================================
   2. HEADER, LOGO & PUBLIC NAVIGATION
   ========================================================================== */
.site-header {
    background: var(--white);
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1010;
}
.header-container { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 1.5rem; }
.logo a {
    font-weight: 800;
    font-size: 1.25rem;
    text-decoration: none !important;
    color: var(--secondary-color) !important;
    background-color: var(--primary-color) !important;
    padding: 0.5rem 1.25rem;
    display: inline-block;
}

.main-nav { display: none; }
.hamburger-menu { display: block; border: none; background: none; cursor: pointer; z-index: 1011; }
.header-center { display: none; }

@media (min-width: 1024px) {
    .header-center { display: flex; align-items: center; gap: 3rem; }
    .main-nav { display: flex; }
    .main-nav ul { display: flex; list-style: none; gap: 2rem; margin-bottom: 0; }
    .main-nav a {
        color: var(--secondary-color); font-weight: 700; font-size: 0.9rem;
        text-transform: uppercase; border-bottom: 3px solid transparent; padding: 5px 0;
        white-space: nowrap;
    }
    .main-nav a.active, .main-nav a:hover { color: var(--primary-color); border-color: var(--primary-color); }
    .hamburger-menu { display: none; }
}
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-contact-info { display: none; }
@media (min-width: 1200px) {
    .header-contact-info { display: flex; align-items: center; gap: 0.75rem; }
    .header-contact-info .icon {
        background-color: var(--primary-color); color: var(--white); border-radius: 50%;
        width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    }
    .header-contact-info .text span { display: block; font-size: 0.8rem; color: var(--light-text-color); }
    .header-contact-info .text strong { font-weight: 700; color: var(--secondary-color); }
}

/* ==========================================================================
   3. HERO SECTION & MOBILE MENU
   ========================================================================== */
.hero { padding: 4rem 0; background-size: cover; background-position: center; min-height: 70vh; display: flex; align-items: center; }
.hero-content-box { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(5px); max-width: 600px; padding: 2rem; border-radius: var(--border-radius); border-left: 5px solid var(--primary-color); }
.hero-buttons { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.mobile-menu-container, .dashboard-sidebar {
    position: fixed; top: 0; left: -100%; width: 280px; height: 100%;
    background: var(--white); z-index: 1020; transition: left 0.3s ease-in-out;
    padding: 1.5rem; display: flex; flex-direction: column; border-right: 1px solid var(--border-color);
}
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.mobile-menu-close { background: none; border: none; font-size: 2rem; cursor: pointer; }
.mobile-menu-container nav ul { list-style: none; }
.mobile-menu-container nav a { display: block; padding: 1rem 0; font-weight: 700; color: var(--secondary-color); }
.mobile-nav-overlay {
    visibility: hidden; opacity: 0;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(45, 55, 72, 0.5); z-index: 1019; transition: opacity 0.3s, visibility 0.3s;
}
body.mobile-menu-open .mobile-menu-container,
body.mobile-menu-open .dashboard-sidebar { left: 0; }
body.mobile-menu-open .mobile-nav-overlay { visibility: visible; opacity: 1; }

/* ==========================================================================
   4. DASHBOARD LAYOUT
   ========================================================================== */
.dashboard-layout { display: flex; }
.dashboard-main-wrapper {
    width: 100%;
    min-height: 100vh;
    transition: margin-left 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.dashboard-main-content { padding: 1.5rem; flex-grow: 1; }

@media (min-width: 1024px) {
    .dashboard-sidebar { position: relative; left: 0; height: 100vh; }
    .dashboard-main-wrapper { width: calc(100% - var(--sidebar-width)); }
    .dashboard-layout.sidebar-collapsed .dashboard-sidebar { width: var(--sidebar-width-collapsed); }
    .dashboard-layout.sidebar-collapsed .dashboard-main-wrapper { width: calc(100% - var(--sidebar-width-collapsed)); }
    .dashboard-main-content { padding: 2rem; }
}

/* ==========================================================================
   5. DASHBOARD SIDEBAR & HEADER
   ========================================================================== */
.dashboard-sidebar { padding: 1.5rem 1rem; }
.dashboard-sidebar nav { flex-grow: 1; margin-top: 1rem; }
.dashboard-sidebar nav ul { list-style: none; }
.dashboard-sidebar nav a {
    display: flex; align-items: center; gap: 1rem; padding: .75rem;
    border-radius: var(--border-radius); color: var(--secondary-color); font-weight: 700;
    transition: all 0.2s; white-space: nowrap; overflow: hidden;
}
.dashboard-sidebar nav a.active, .dashboard-sidebar nav a:hover { background-color: var(--primary-color); color: var(--white); }
.dashboard-sidebar nav a svg { width: 24px; height: 24px; flex-shrink: 0; }
.nav-section-title {
    color: var(--light-text-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}
.sidebar-toggle-button {
    display: none; background: none; border: 1px solid var(--border-color);
    border-radius: 4px; padding: 0.5rem; cursor: pointer; margin-top: auto;
    width: 100%; align-items: center; justify-content: center; gap: 1rem; font-weight: 700; white-space: nowrap;
}
@media (min-width: 1024px) {
    .sidebar-toggle-button { display: flex; }
    .sidebar-collapsed .nav-text, .sidebar-collapsed h3, .sidebar-collapsed .nav-section-title { opacity: 0; width: 0; visibility: hidden; }
    .sidebar-collapsed .sidebar-toggle-button, .sidebar-collapsed .dashboard-sidebar nav a { justify-content: center; }
}

.dashboard-main-wrapper .header-container { justify-content: space-between; }
.dashboard-main-wrapper .header-right { display: flex; align-items: center; gap: 1rem; }

/* ==========================================================================
   6. GENERAL COMPONENTS (Buttons, Cards, Forms, etc.)
   ========================================================================== */
.btn {
    display: inline-block; padding: 0.75rem 1.5rem; border-radius: var(--border-radius);
    font-weight: 700; cursor: pointer; border: 2px solid transparent;
    text-decoration: none !important; text-align: center; transition: all 0.2s;
}
.btn-primary { background-color: var(--primary-color); color: var(--white) !important; border-color: var(--primary-color); }
.btn-primary:hover { background-color: #e68a00; border-color: #e68a00; }
.btn-secondary { background-color: var(--secondary-color); color: var(--white) !important; border-color: var(--secondary-color); }
.btn-secondary:hover { background-color: #1A202C; border-color: #1A202C; }

/* Project Cards */
.project-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.project-card-enhanced { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--border-radius); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; height: 100%; text-decoration: none; color: inherit; }
.project-card-enhanced:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); color: inherit; }
.project-card-header, .project-card-body, .project-card-footer { padding: 1.25rem; }
.project-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.project-card-body { flex-grow: 1; }
.project-card-footer { border-top: 1px solid var(--border-color); }
.team-avatars { display: flex; }
.avatar-stack { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--white); object-fit: cover; margin-left: -12px; }
.avatar-stack:first-child { margin-left: 0; }

/* Forms */
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; margin-bottom: .5rem; font-weight: 700; color: var(--secondary-color); }
.form-field input, .form-field select, .form-field textarea {
    background-color: var(--white); border: 1px solid var(--border-color);
    padding: 0.75rem; border-radius: var(--border-radius); width: 100%; font-size: 1rem;
}

/* ==========================================================================
   7. WIDGETS (User Menu, Notifications)
   ========================================================================== */
.user-menu-container { position: relative; }
.user-menu-button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 700;
}
.user-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    z-index: 1001;
    min-width: 200px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.user-menu-dropdown.active { display: block; }
.user-menu-dropdown a, .user-menu-dropdown .logout-button {
    display: block;
    width: 100%;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-align: left;
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
}
.user-menu-dropdown a:hover, .user-menu-dropdown .logout-button:hover {
    background: var(--light-gray-bg);
}

.notification-container { position: relative; }
.notification-bell { background: none; border: none; cursor: pointer; position: relative; padding: 0.5rem; }
.notification-badge { position: absolute; top: 0; right: 0; background-color: var(--danger-color); color: white; border-radius: 50%; min-width: 18px; height: 18px; font-size: 10px; font-weight: bold; display: none; align-items: center; justify-content: center; padding: 0 4px; border: 1px solid white; }
.notification-dropdown {
    display: none; position: absolute; top: calc(100% + 10px); right: 0; width: 350px; max-width: 90vw; background-color: var(--white);
    border: 1px solid var(--border-color); border-radius: var(--border-radius); box-shadow: var(--shadow-md); z-index: 1011;
}
.notification-dropdown.active { display: block; }
.notification-header, .notification-footer { padding: 0.75rem 1rem; background-color: var(--light-gray-bg); }
.notification-list { list-style: none; max-height: 400px; overflow-y: auto; }
.notification-item a { display: block; padding: 1rem; text-decoration: none; color: var(--text-color); border-bottom: 1px solid var(--border-color); }
.notification-item.unread a { background-color: #FFFBEB; }
.notification-item:last-child a { border-bottom: none; }
.notification-time { font-size: 0.8rem; color: var(--info-color); margin-top: 0.25rem; }

/* ==========================================================================
   8. USER MANAGEMENT & CARDS (CSS FIX)
   ========================================================================== */
.user-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    transition: box-shadow .2s, transform .2s;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--border-color);
    flex-shrink: 0;
}

.user-card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-card-actions {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==========================================================================
   9. NEW FEATURE STYLES (BLOG, TESTIMONIALS)
   ========================================================================== */
.star-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.star-rating .star {
    font-size: 1.2rem;
}
.blog-post-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    text-decoration: none;
    color: var(--text-color);
    transition: box-shadow .2s, transform .2s;
}
.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    color: var(--text-color);
}
.blog-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.blog-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-post-content h4 {
    margin-top: 0;
    color: var(--secondary-color);
}
.blog-post-meta {
    font-size: 0.85rem;
    color: var(--light-text-color);
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

/* ==========================================================================
   10. MOBILE RESPONSIVE FIXES
   ========================================================================== */
@media (max-width: 768px) {
    /* Responsive Tables (Task List, Invoices, etc.) */
    .data-table-container {
        border: none;
        box-shadow: none;
        background-color: transparent;
    }
    .data-table {
        border: none;
        width: 100%;
    }
    .data-table thead {
        display: none;
    }
    .data-table tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 1rem;
        background: var(--white);
        box-shadow: var(--shadow-sm);
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: right;
    }
    .data-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        margin-right: 1rem;
        color: var(--secondary-color);
    }
    .data-table td .d-flex {
        justify-content: flex-end;
    }

    /* Calendar Fixes */
    .fc-header-toolbar {
        flex-direction: column;
        gap: 0.75rem !important;
        align-items: stretch;
    }
    .fc-header-toolbar .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
        gap: 0.25rem;
    }
    .fc .fc-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
}
/* ... (keep all existing CSS) ... */

/* ==========================================================================
   11. OFFER PAGE STYLES & MOBILE FIXES
   ========================================================================== */
.offer-card {
    display: flex;
    gap: 2rem;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.offer-card img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0; /* Prevents image from shrinking */
}

.offer-card h3 {
    margin-top: 0;
    border: none;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .offer-card {
        flex-direction: column; /* Stack vertically on mobile */
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .offer-card img {
        width: 100%; /* Make image full-width */
        height: 200px;
    }

    .offer-card div {
        text-align: center; /* Center the text content */
    }
}