/* 
   MG Training - The Strategy Board
   Aesthetic: Isometric, tactile board game UI, vibrant energetic colors.
*/

:root {
    --mg-bg: #EAEFF2;
    --mg-bg-board: #F8FAFC;
    --mg-text: #1E293B;
    --mg-accent: #FF6B35; /* Energetic Orange */
    --mg-dark: #1A2A3A;   /* Deep Navy */
    --font-sans: 'Inter', 'Noto Sans JP', sans-serif;
    --game-shadow: 6px 6px 0px var(--mg-dark);
    --game-shadow-hover: 2px 2px 0px var(--mg-dark);
}

body.theme-mg-v2 {
    background-color: var(--mg-bg);
    color: var(--mg-text);
    font-family: var(--font-sans);
    /* Subtle grid background */
    background-image: linear-gradient(rgba(26, 42, 58, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(26, 42, 58, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Navigation overrides */
.theme-mg-v2 .glass-nav {
    background: rgba(234, 239, 242, 0.9);
    border-bottom: 2px solid var(--mg-dark);
    padding: 15px 0;
}
.theme-mg-v2 .glass-nav .logo {
    color: var(--mg-dark);
    text-shadow: none;
    font-weight: 800;
}
.theme-mg-v2 .glass-nav .nav-menu a {
    color: var(--mg-text);
    text-shadow: none;
    font-weight: 600;
}
.theme-mg-v2 .glass-nav .nav-menu a:hover::after {
    background-color: var(--mg-accent);
}
.theme-mg-v2 .btn-contact {
    background-color: var(--mg-accent);
    color: #fff !important;
    border: 2px solid var(--mg-dark);
    box-shadow: 3px 3px 0px var(--mg-dark);
    border-radius: 4px;
    font-weight: 700;
}
.theme-mg-v2 .btn-contact:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--mg-dark);
    background-color: var(--mg-accent);
}
.theme-mg-v2 .glass-nav .menu-toggle span {
    background-color: var(--color-primary);
}
.theme-mg-v2 .glass-nav .menu-toggle.active span {
    background-color: #fff;
}

/* Hero Section */
.mg-hero {
    min-height: 100vh;
    padding-top: 100px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.mg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.mg-hero-grid {
    display: flex;
    align-items: center;
    gap: 40px;
}

.mg-hero-text {
    flex: 1;
    z-index: 2;
}

.mg-hero-badge {
    display: inline-block;
    background-color: var(--mg-dark);
    color: #fff;
    padding: 6px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 3px 3px 0px var(--mg-accent);
}

.mg-hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--mg-dark);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.mg-hero-lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--mg-text);
    font-weight: 500;
}

@media (min-width: 901px) {
    .mg-hero-lead {
        white-space: nowrap;
    }
}

.mg-hero-image {
    flex: 1.2;
    z-index: 1;
}

.mg-hero-image img {
    width: 100%;
    transform: perspective(1000px) rotateY(-15deg);
    filter: drop-shadow(20px 20px 30px rgba(26,42,58,0.2));
    animation: floatBoard 6s ease-in-out infinite;
}

@keyframes floatBoard {
    0% { transform: perspective(1000px) rotateY(-15deg) translateY(0); }
    50% { transform: perspective(1000px) rotateY(-15deg) translateY(-20px); }
    100% { transform: perspective(1000px) rotateY(-15deg) translateY(0); }
}

/* Game Board Section */
.mg-section {
    padding: 100px 0;
    position: relative;
}

.mg-section-header {
    margin-bottom: 60px;
}

.mg-section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--mg-dark);
    display: inline-block;
    position: relative;
}
.mg-section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 6px;
    background-color: var(--mg-accent);
}

/* Cards (Playing Card Style) */
.mg-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.mg-card {
    background-color: var(--mg-bg-board);
    border: 3px solid var(--mg-dark);
    border-radius: 8px;
    padding: 40px 30px;
    box-shadow: var(--game-shadow);
    transition: all 0.2s ease;
    position: relative;
}

.mg-card:hover {
    transform: translate(4px, 4px);
    box-shadow: var(--game-shadow-hover);
}

.mg-card-icon {
    width: 50px;
    height: 50px;
    background-color: var(--mg-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.5rem;
    border: 2px solid var(--mg-dark);
    position: absolute;
    top: -25px;
    left: 30px;
}

.mg-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    margin-top: 10px;
}

.mg-card p {
    font-size: 1rem;
    line-height: 1.7;
}

/* Flex Grid for Image + Text */
.mg-flex-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}
.mg-flex-grid.reverse {
    flex-direction: row-reverse;
}
.mg-flex-img, .mg-flex-text {
    flex: 1;
}
.mg-flex-img img {
    width: 100%;
    border: 3px solid var(--mg-dark);
    border-radius: 8px;
    box-shadow: var(--game-shadow);
}

/* Timeline (Board Game Path) */
.mg-path {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    padding-left: 50px;
}
.mg-path::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 6px;
    background-color: var(--mg-dark);
}

.mg-path-item {
    background-color: #fff;
    border: 3px solid var(--mg-dark);
    padding: 30px;
    border-radius: 8px;
    position: relative;
    box-shadow: var(--game-shadow);
}
.mg-path-item::before {
    content: '';
    position: absolute;
    left: -48px;
    top: 30px;
    width: 30px;
    height: 30px;
    background-color: var(--mg-accent);
    border: 3px solid var(--mg-dark);
    border-radius: 50%;
    z-index: 2;
}

.mg-path-item h4 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--mg-dark);
}

/* Pricing Table Game style */
.mg-table-wrapper {
    background-color: #fff;
    border: 3px solid var(--mg-dark);
    border-radius: 8px;
    box-shadow: var(--game-shadow);
    overflow: hidden;
}
.mg-table {
    width: 100%;
    border-collapse: collapse;
}
.mg-table th {
    background-color: var(--mg-dark);
    color: #fff;
    padding: 20px;
    font-size: 1.2rem;
    text-align: left;
    border-right: 1px solid rgba(255,255,255,0.2);
}
.mg-table th:last-child { border-right: none; }
.mg-table th.highlight {
    background-color: var(--mg-accent);
}
.mg-table td {
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
    border-right: 1px solid #E2E8F0;
    vertical-align: top;
}
.mg-table td:last-child { border-right: none; }
.mg-table tr:last-child td { border-bottom: none; }
.mg-table .feature {
    font-weight: 700;
    background-color: #F8FAFC;
}

/* Animations */
.mg-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* bouncy */
}
.mg-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 900px) {
    .mg-hero-grid, .mg-flex-grid, .mg-flex-grid.reverse {
        flex-direction: column;
    }
    .mg-hero-title {
        font-size: 3rem;
    }
    .mg-path {
        padding-left: 30px;
    }
    .mg-path::before {
        left: 10px;
    }
    .mg-path-item::before {
        left: -32px;
        width: 20px;
        height: 20px;
    }
}

/* Responsive navigation override for mobile drawer */
@media (max-width: 1024px) {
    .theme-mg-v2 .glass-nav .nav-menu a {
        color: #FAFAFA;
    }
}

