/* Design System - CartsDepot Redesign (Template 1: Dark Mode) */

:root {
    --bg-primary: #0f1113;
    --bg-secondary: #1a1d21;
    --accent-green: #2ecc71;
    --accent-green-hover: #27ae60;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #2e343b;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Theme Toggle Button removed */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Accessibility: Focus Indicators */
:focus-visible {
    outline: 3px solid var(--accent-green);
    outline-offset: 2px;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 60px;
    /* Fixed height to prevent expansion */
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    z-index: 1001;
    width: 280px;
    /* Reserve space for the logo */
    height: 60px;
    /* Match fixed header height */
    margin-right: 2rem;
    /* Add spacing from nav links */
}

.logo img {
    height: 140px;
    /* Increased size */
    width: auto;
    object-fit: contain;
    position: absolute;
    top: -40px;
    /* Adjusted to not touch the top */
    left: 0;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent-green);
}

.menu-toggle {
    display: none;
    /* Hidden on desktop */
}

/* Hero Section */
.hero {
    padding: 7rem 0;
    /* Increased padding */
    background: linear-gradient(rgba(15, 17, 19, 0.4), rgba(15, 17, 19, 0.4)), url('hero_bg.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    min-height: 92vh;
    /* Increased height by ~15% */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff !important;
    /* Force White Text in all modes */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Added shadow for readability */
}

.hero p {
    font-size: 1.25rem;
    color: #ffffff !important;
    /* Force White Text in all modes */
    /* Brighter white text */
    margin-bottom: 2rem;
    max-width: 800px;
    /* Widened slightly for text flow */
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    /* Added shadow for readability against light bg */
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-green);
    color: #ffffff !important;
    /* Force White Text in all modes */
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-green-hover);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-green);
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
}

/* Contact Info */
.info-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
}

footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

.footer-links {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-green);
}

/* Featured List Section */
.featured-lists {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 4rem 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.featured-column h2 {
    color: var(--accent-green);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.featured-column ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.featured-column li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.featured-column li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 800;
}

/* Tooltip Hover Cards */
.featured-column li {
    cursor: pointer;
    transition: color 0.3s ease;
}

.featured-column li:hover {
    color: var(--accent-green);
}

.featured-column li .tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 1rem;
    width: 280px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.featured-column li:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.featured-column li .tooltip img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.featured-column li .tooltip h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.featured-column li .tooltip p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Adjust tooltip position for right column */
.featured-column:last-child li .tooltip {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 1rem;
}

@media (max-width: 768px) {
    .featured-column li .tooltip {
        display: none;
    }
}

/* Card Grid Tooltips */
.card {
    position: relative;
}

.card .tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    text-align: center;
    pointer-events: none;
}

.card:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.card .tooltip h4 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--accent-green);
}

.card .tooltip p {
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

/* Tooltip arrow */
.card .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: var(--bg-secondary) transparent transparent transparent;
}

@media (max-width: 768px) {
    .card .tooltip {
        display: none;
    }
}

@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .nav-container {
        height: 60px;
        /* Keep fixed height on mobile */
        flex-direction: row;
        /* Horizontal layout */
        justify-content: space-between;
        padding: 0;
    }

    .logo {
        width: auto;
        height: 60px;
        margin-right: 0;
        margin-bottom: 0;
        /* Remove bottom margin */
        display: flex;
        justify-content: flex-start;
        position: relative;
        z-index: 1002;
        /* Above menu */
    }

    .logo img {
        height: 80px;
        width: auto;
        position: absolute;
        top: -10px;
        /* Adjust overlap */
        left: 0;
    }

    /* Mobile Menu Toggle */
    .menu-toggle {
        display: flex;
        /* Show on mobile */
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 1003;
        background: none;
        border: none;
        padding: 0;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--text-primary);
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* Hamburger Animation */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    nav {
        position: absolute;
        top: 60px;
        /* Below header */
        left: 0;
        width: 100%;
        background-color: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        z-index: 1001;
        /* Below logo/toggle */
    }

    nav.active {
        max-height: 400px;
        /* Adjust as needed */
        padding: 1rem 0;
    }

    nav ul {
        gap: 0;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    nav li {
        width: 100%;
        text-align: center;
    }

    nav a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    /* Move Theme Toggle inside menu */
    .theme-toggle {
        margin-left: 0;
        margin-top: 1rem;
        display: inline-block;
    }

    .hero h1 {
        font-size: 2rem;
    }
}