/* Main CSS for Max Storage Limited Documentation */
:root {
    --primary: #2563eb;
    --secondary: #7c3aed;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --dark: #1f2937;
    --light: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumbs */
.breadcrumb {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #6b7280;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: #9ca3af;
}

/* Navigation */
.nav {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    height: 40px;
    width: 40px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links > li {
    position: relative;
}

/* Extend hover area for dropdown items */
.nav-links > li.has-dropdown::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(100% + 15px);
    z-index: -1;
}

/* Ensure dropdowns are hidden initially - fallback rule */
.nav .nav-content .nav-links .nav-dropdown {
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
    display: block;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

/* Dropdown Menus - Enhanced specificity for production */
.nav-dropdown {
    position: absolute;
    top: calc(100% - 5px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: white;
    min-width: 240px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    opacity: 0 !important;
    visibility: hidden !important;
    display: block !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
    /* Add padding-top to create invisible bridge */
    padding-top: 15px;
    margin-top: -10px;
}

/* Hover state with enhanced specificity */
.nav-links li.has-dropdown:hover .nav-dropdown,
.nav-dropdown:hover {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-right: none;
    border-bottom: none;
    z-index: 1;
}

/* Invisible bridge to maintain hover */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.nav-dropdown a {
    display: block;
    padding: 12px 20px;
    margin: 0;
    color: var(--dark);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    border-radius: 0;
    font-weight: 400;
    font-size: 14px;
}

.nav-dropdown a:first-child {
    border-radius: 11px 11px 0 0;
}

.nav-dropdown a:last-child {
    border-bottom: none;
    border-radius: 0 0 11px 11px;
}

.nav-dropdown a:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
    color: var(--primary);
    padding-left: 25px;
}

.nav-dropdown-header {
    padding: 12px 20px 8px;
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Dropdown arrow indicator */
.has-dropdown > a::after {
    content: '▾';
    font-size: 10px;
    margin-left: 6px;
    opacity: 0.5;
    display: inline-block;
    transition: transform 0.3s;
}

.has-dropdown:hover > a::after {
    transform: rotate(180deg);
    opacity: 1;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card h2, .card h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

/* Status indicators */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.status-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--primary);
}

.status-card.complete {
    border-left-color: var(--success);
    background: #f0fdf4;
}

.status-card.progress {
    border-left-color: var(--warning);
    background: #fefce8;
}

.status-card.pending {
    border-left-color: var(--danger);
    background: #fef2f2;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

th {
    background: var(--dark);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

tr:hover {
    background: var(--light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Sections */
.section {
    margin: 40px 0;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 10px;
}

/* Lists */
ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 40px 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer h4 {
    margin-bottom: 15px;
}

.footer ul {
    list-style: none;
    margin-left: 0;
}

.footer a {
    color: #9ca3af;
    text-decoration: none;
}

.footer a:hover {
    color: white;
}

/* Fix for hover on touch devices */
@media (hover: hover) {
    /* Only apply hover effects on devices that support hover */
    .nav-links li.has-dropdown:hover .nav-dropdown {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Hide dropdowns on mobile */
    .nav-dropdown {
        display: none !important;
    }
}

/* Alert boxes */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.alert-info {
    background: #dbeafe;
    border-left: 4px solid var(--primary);
    color: #1e40af;
}

.alert-success {
    background: #d1fae5;
    border-left: 4px solid var(--success);
    color: #065f46;
}

.alert-warning {
    background: #fed7aa;
    border-left: 4px solid var(--warning);
    color: #92400e;
}

/* Quick stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    display: block;
}

.stat-label {
    color: #6b7280;
    font-size: 0.875rem;
}