/* CalcWise Global Styles - Shared across all pages */

/* Reset and Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fafbfc;
    color: #0f172a;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Purple color scheme */
:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 88px;
    will-change: transform;
    contain: layout;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    will-change: width;
}

.logo:hover::after {
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    align-items: center;
}

nav a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    will-change: width;
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::before {
    width: 100%;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.dropdown-toggle::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    will-change: width;
}

.dropdown:hover .dropdown-toggle {
    color: var(--primary);
}

.dropdown:hover .dropdown-toggle::before {
    width: 100%;
}

.dropdown-toggle::after {
    content: '▾';
    font-size: 10px;
    transition: transform 0.2s;
    will-change: transform;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: -16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 8px;
    min-width: 220px;
    display: none;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    will-change: opacity, transform;
}

.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    height: 16px;
    background: transparent;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #475569;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-menu a::before {
    display: none;
}

.dropdown-menu a:hover {
    background: #f1f5f9;
    color: var(--primary);
    transform: translateX(4px);
    will-change: transform;
}

/* Footer */
footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 80px 0 40px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    margin-bottom: 56px;
}

.footer-section h4 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 15px;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--primary-light);
    transform: translateX(4px);
    will-change: transform;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #1e293b;
    color: #64748b;
    font-size: 14px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: #64748b;
    min-height: 20px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

/* Mobile adjustments for nav */
@media (max-width: 768px) {
    nav li:not(.dropdown) {
        display: none;
    }
    
    /* Mobile dropdown click handling */
    .dropdown.active .dropdown-menu {
        display: block;
        animation: slideDown 0.2s ease;
    }
    
    .dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }
    
    .container {
        padding: 0 20px;
    }

    .header-content {
        padding: 20px;
    }
    
    .breadcrumb {
        min-height: 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}
