/**
 * Dogology MindMap Landing Page Styles
 * Extracted for WP Rocket CSS optimization
 */

/* ==========================================================================
   BASE & VARIABLES
   ========================================================================== */

.mindmap-wrapper {
    --mm-primary: #0076BA;
    --mm-secondary: #00AB8E;
    --mm-gradient: linear-gradient(90deg, #00AB8E, #0076BA);
    --mm-dark: #1f2937;
    --mm-gray: #f9fafb;
    --mm-gray-text: #6b7280;

    font-family: 'Noto Sans Thai', sans-serif;
    color: var(--mm-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.mindmap-wrapper h1,
.mindmap-wrapper h2,
.mindmap-wrapper h3 {
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0;
}

.mm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

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

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
    border: none;
    line-height: 1.5;
}

.mm-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(0, 118, 186, 0.4);
}

.mm-btn-gradient {
    background: var(--mm-gradient);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mm-btn-white {
    background: white;
    color: var(--mm-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}

.mm-btn-white:hover {
    color: #005c99;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.mm-hero {
    background: radial-gradient(circle at top right, #005c99, var(--mm-primary));
    color: white;
    padding: 3rem 0;
    position: relative;
}

.mm-hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.mm-hero-title-group {
    order: 1;
}

.mm-hero-chart-group {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
}

.mm-hero-text-group {
    order: 3;
}

.mm-hero-btn-group {
    order: 4;
}

@media (min-width: 992px) {
    .mm-hero {
        padding: 6rem 0;
    }

    .mm-hero-grid {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        gap: 4rem;
        text-align: left;
        align-items: center;
    }
}

.mm-desktop-left {
    display: contents;
}

@media (min-width: 992px) {
    .mm-desktop-left {
        display: block;
        order: 1;
    }

    .mm-hero-chart-group {
        order: 2;
        justify-content: flex-end;
    }

    .mm-hero-title-group,
    .mm-hero-text-group,
    .mm-hero-btn-group {
        margin-bottom: 2rem;
    }

    .mm-hero-btn-group {
        justify-content: flex-start;
    }
}

.mm-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mm-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.3;
}

.mm-hero h1 span {
    color: #5eead4;
}

@media (min-width: 768px) {
    .mm-hero h1 {
        font-size: 3.5rem;
    }
}

.mm-hero p {
    font-size: 1rem;
    opacity: 0.95;
    max-width: 600px;
    color: white;
    margin: 0 auto;
    line-height: 1.6;
}

@media (min-width: 992px) {
    .mm-hero p {
        margin: 0;
        font-size: 1.1rem;
    }
}

/* Chart Container */
.mm-chart-container {
    position: relative;
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1/1;
}

@media (min-width: 768px) {
    .mm-chart-container {
        max-width: 380px;
    }
}

.mm-dog-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15%;
    z-index: 10;
    opacity: 0.9;
    pointer-events: none;
}

/* ==========================================================================
   ICEBERG SECTION
   ========================================================================== */

.mm-iceberg-section {
    padding: 5rem 0;
    background: white;
}

.mm-iceberg-wrapper {
    background: linear-gradient(180deg, #bae6fd 0%, #0284c7 40%, #082f49 100%);
    border-radius: 2rem;
    padding: 4rem 1rem;
    text-align: center;
    box-shadow: 0 20px 40px -10px rgba(12, 74, 110, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.mm-iceberg-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.mm-iceberg-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 350px;
}

/* Interactive Iceberg Cards (Tooltips) */
.mm-iceberg-tooltip {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 90px;
}

.mm-iceberg-tooltip.top {
    margin-bottom: auto;
    margin-right: auto;
    margin-left: 0;
    transform: translateX(5%);
}

.mm-iceberg-tooltip.bottom {
    margin-top: auto;
    margin-left: auto;
    margin-right: 0;
    transform: translateX(-5%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 768px) {
    .mm-iceberg-tooltip.top {
        margin-left: 15%;
    }

    .mm-iceberg-tooltip.bottom {
        margin-right: 15%;
    }
}

.mm-iceberg-tooltip.active {
    max-height: 300px;
    background: white;
    transform: scale(1.02) translateX(5%);
    z-index: 50;
}

.mm-iceberg-tooltip.bottom.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--mm-dark);
    transform: scale(1.02) translateX(-5%);
}

@media (hover: hover) {
    .mm-iceberg-tooltip:hover {
        max-height: 300px;
        background: white;
        transform: scale(1.02) translateX(5%);
        z-index: 50;
    }

    .mm-iceberg-tooltip.bottom:hover {
        background: rgba(255, 255, 255, 0.95);
        color: var(--mm-dark);
        transform: scale(1.02) translateX(-5%);
    }

    .mm-iceberg-tooltip.bottom:hover .title {
        color: var(--mm-dark);
    }

    .mm-iceberg-tooltip:hover .mm-tooltip-desc {
        opacity: 1;
    }
}

.mm-iceberg-tooltip.active .mm-tooltip-desc {
    opacity: 1;
}

.mm-iceberg-tooltip.bottom.active .title {
    color: var(--mm-dark);
}

/* Tooltip Content */
.mm-tooltip-header .title {
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.mm-tooltip-header .badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: #e5e7eb;
    color: #4b5563;
}

.mm-iceberg-tooltip.top .badge {
    background: #fee2e2;
    color: #ef4444;
}

.mm-iceberg-tooltip.bottom .badge {
    background: #dcfce7;
    color: #16a34a;
}

.mm-iceberg-tooltip.bottom .title {
    color: #5eead4;
}

.mm-tooltip-desc {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s 0.1s;
    line-height: 1.5;
    color: #4b5563;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
}

.mm-tap-hint {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    pointer-events: none;
}

@media(min-width: 992px) {
    .mm-tap-hint {
        display: none;
    }
}

/* ==========================================================================
   CAROUSEL SECTION
   ========================================================================== */

.mm-carousel-section {
    padding: 5rem 0;
    background: var(--mm-gray);
}

.mm-carousel-container {
    width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 2rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.mm-carousel-container::-webkit-scrollbar {
    display: none;
}

.mm-carousel-container:active {
    cursor: grabbing;
}

.mm-carousel-track {
    display: inline-flex;
    gap: 1.5rem;
    padding: 0 1.5rem;
}

.mm-card {
    flex: 0 0 280px;
    width: 280px;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border-top: 5px solid;
    display: flex;
    flex-direction: column;
    white-space: normal;
    user-select: none;
}

.mm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.1);
}

.mm-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.mm-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--mm-dark);
}

.mm-card .subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.mm-card p {
    font-size: 0.9rem;
    color: var(--mm-gray-text);
    margin: 0;
    line-height: 1.5;
}

.mm-cta-section {
    padding: 6rem 0;
    background: var(--mm-dark);
    color: white;
    text-align: center;
}