/* ============================================================
   COMMON CSS - Global Styles & Layout
   Modern minimalist design with unique color palette
   ============================================================ */

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

:root {
    /* Unique minimalist color palette */
    --primary-color: #1a1a2e;
    /* Deep navy */
    --secondary-color: #0f3460;
    /* Ocean blue */
    --accent-color: #16c784;
    /* Mint green */
    --accent-light: #4ecdc4;
    /* Teal */
    --warning-color: #ff6b6b;
    /* Coral */
    --bg-light: #f8f9fa;
    /* Light gray */
    --bg-white: #ffffff;
    /* Pure white */
    --text-dark: #2c3e50;
    /* Dark gray-blue */
    --text-light: #7f8c8d;
    /* Light gray */
    --border-color: #e1e8ed;
    /* Light border */

    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --box-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */

header {
    background: var(--bg-white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 101;
    border-bottom: 2px solid var(--accent-color);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}

.logo:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.logo svg {
    width: 32px;
    height: 32px;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    font-size: 0.95rem;
}

nav a:hover,
nav a.active {
    color: var(--accent-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(22, 199, 132, 0.1);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    width: 200px;
    color: var(--text-dark);
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    font-size: 1rem;
}

.search-box button:hover {
    color: var(--accent-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 102;
    position: absolute;
    right: 1rem;
    bottom: .75rem;
}
.mobile-menu-toggle.active {
    bottom: auto;
    top: 0.75rem;
}
.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    background: var(--primary-color);
    color: var(--bg-light);
    margin-top: 4rem;
    border-top: 3px solid var(--accent-color);
}

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

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section a,
.footer-section p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--bg-light);
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.footer-section a:hover {
    color: var(--accent-color);
    padding-left: 4px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    z-index: 99;
}

.back-to-top:hover {
    background: var(--accent-light);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(22, 199, 132, 0.3);
}

.back-to-top.show {
    display: flex;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

.container {
    margin: 0 auto;
    padding: 0 1rem;
}

.container.large {
    max-width: 1400px;
}

.container.medium {
    max-width: 1000px;
}

.container.small {
    max-width: 700px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

p {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ============================================================
   BUTTONS & INTERACTIONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 199, 132, 0.3);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}

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

.btn-dark:hover {
    background: var(--secondary-color);
    box-shadow: var(--box-shadow-lg);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ============================================================
   BADGES & TAGS
   ============================================================ */

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--bg-light);
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}

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

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

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

/* ============================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================================ */

@media (max-width: 768px) {
    .header-content {
        padding: 0.75rem 1rem;
        flex-wrap: nowrap;
        position: relative;
        gap: 1rem;
        align-items: center;
    }

    .logo {
        font-size: 1.3rem;
        order: 1;
        flex-shrink: 0;
    }

    .logo svg {
        width: 28px;
        height: 28px;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 3;
        flex-shrink: 0;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        /* Use dynamic viewport height for mobile */
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 5rem 0 2rem;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 101;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    nav.active {
        right: 0;
    }

    nav a {
        font-size: 1.1rem;
        padding: 1.25rem 2rem;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        display: flex;
        align-items: center;
        transition: all 0.2s ease;
    }

    nav a:hover {
        background: var(--bg-light);
        padding-left: 2.5rem;
    }

    nav a.active {
        background: rgba(22, 199, 132, 0.1);
        border-left: 4px solid var(--accent-color);
    }

    nav a::after {
        display: none;
    }

    .search-box {
        order: 2;
        padding: 0.5rem 1rem;
        border-radius: 24px;
        flex: 1;
        max-width: none;
        margin: 0;
    }

    .search-box input {
        width: 100%;
        font-size: 0.85rem;
    }

    .search-box button {
        font-size: 0.95rem;
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.6);
        z-index: 100;
        opacity: 0;
        transition: opacity 0.35s ease;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    main {
        padding: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    nav {
        gap: 0.5rem;
    }

    nav a {
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.pt-1 {
    padding-top: 0.5rem;
}

.pt-2 {
    padding-top: 1rem;
}

.pt-3 {
    padding-top: 1.5rem;
}

.pb-1 {
    padding-bottom: 0.5rem;
}

.pb-2 {
    padding-bottom: 1rem;
}

.pb-3 {
    padding-bottom: 1.5rem;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}