/* MyCalcTools - Global Styles for Cloudflare Pages */

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

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow-lg);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: white;
}

.logo-icon {
    font-size: 2.5rem;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo-tagline {
    font-size: 0.85rem;
    opacity: 0.9;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px 10px;
}

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

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

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-menu > li > a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 8px 8px;
    list-style: none;
    padding: 10px 0;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 10px 20px;
    font-size: 0.95rem;
}

.dropdown-menu a:hover {
    background: var(--primary-color);
    color: white;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 50px 20px 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 5px 0;
}

/* Main Content */
main {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        position: relative;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .logo-tagline {
        font-size: 0.75rem;
    }

    .nav-menu {
        flex-direction: column;
        display: none;
        background: white;
    }

    .nav-menu.active {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-left: 3px solid var(--primary-color);
        margin-left: 20px;
        display: none;
    }

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
