@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Outfit:wght@400;600;700&display=swap');

/* =========================================
   VARIABLES & GLOBAL
========================================= */
:root {
    --primary: #1e467a;
    --primary-light: #2a5f9e;
    --secondary: #4CAF50;
    --accent: #b08d3e;
    --highlight: #fbb03b;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

body {
    margin: 0;
    font-family: 'Kanit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Kanit', sans-serif;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
}

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

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

/* =========================================
   NAVIGATION BAR
========================================= */
main-nav { display: contents; }

.main-nav {
    display: flex;
    align-items: center;
    padding: 0 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 80px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-right: auto;
}

.nav-logo span { color: var(--secondary); }

.nav-links {
    display: flex;
    height: 100%;
}

.dropdown {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 20px;
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
    height: 100%;
    transition: 0.3s;
    font-size: 16px;
}

.dropdown:hover {
    color: var(--accent);
}

.dropdown::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.dropdown:hover::after { width: 100%; }

.dropdown-content {
    display: none;
    position: absolute;
    top: 80px; 
    left: 0;
    background-color: var(--white);
    min-width: 260px; 
    box-shadow: 0px 10px 30px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    z-index: 100;
    padding: 15px 0;
}

.dropdown:hover .dropdown-content { display: block; animation: slideDown 0.3s ease forwards; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
    color: var(--text-muted);
    padding: 12px 25px;
    display: block;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    transition: 0.2s;
}

.dropdown-content a:last-child { border-bottom: none; }

.dropdown-content a:hover {
    color: var(--primary);
    background-color: #f9f9f9;
    padding-left: 30px;
}

/* =========================================
   HERO SECTION
========================================= */
.hero-section {
    position: relative;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.bg-slideshow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    list-style: none; margin: 0; padding: 0; z-index: -2;
}

.bg-slideshow li {
    position: absolute; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; animation: imageCrossfade 15s linear infinite;
}

.bg-slideshow li:nth-child(1) { background-image: url('../Mask-Group-8.png'); animation-delay: 0s; }
.bg-slideshow li:nth-child(2) { background-image: url('../warehouse.png'); animation-delay: 5s; }
.bg-slideshow li:nth-child(3) { background-image: url('../อาคารยูเนี่ยน.png'); animation-delay: 10s; }

@keyframes imageCrossfade {
    0% { opacity: 0; transform: scale(1.05); }
    10% { opacity: 1; transform: scale(1); }
    33% { opacity: 1; transform: scale(1); }
    43% { opacity: 0; transform: scale(1.05); }
    100% { opacity: 0; }
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
    z-index: -1;
}

.hero-content {
    z-index: 1;
    color: var(--white);
    padding: 0 20px;
    max-width: 800px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--white);
}

.hero-title .highlight {
    color: var(--highlight);
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.9;
}

/* =========================================
   IMPACT SECTION
========================================= */
.impact-section {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    font-size: 36px;
    margin-bottom: 10px;
}

.highlight-blue { color: var(--primary); }

.section-subtitle {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 50px;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.impact-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 40px 20px;
    transition: transform 0.3s;
    border-top: 4px solid var(--secondary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.02);
}

.impact-card:hover { transform: translateY(-5px); }

.impact-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.impact-number {
    font-size: 50px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    margin-top: 15px;
}

.impact-number span { font-size: 24px; color: var(--text-muted); }

.impact-text { color: var(--text-muted); font-size: 16px; }

/* =========================================
   3 PILLARS SECTION
========================================= */
.pillars-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.pillar-card {
    background: var(--white);
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.pillar-icon {
    font-size: 50px;
    margin-bottom: 20px;
    height: 80px; width: 80px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    transition: 0.3s;
}

.pillar-card:hover .pillar-icon { background: var(--primary); color: white; }

.pillar-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary);
}

.pillar-card h3 small {
    display: block; font-size: 16px; color: var(--text-muted); font-weight: 400; margin-top: 5px;
}

.pillar-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
}

.explore-btn {
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    transition: 0.3s;
}

.pillar-card:hover .explore-btn { color: var(--secondary); letter-spacing: 1px; }

/* =========================================
   INNER PAGES STYLING (Content Section)
========================================= */
.content-section {
    max-width: 1000px;
    margin: 60px auto;
    background: var(--white);
    padding: 50px 60px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.content-section h1 {
    font-size: 32px;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.content-section h2 { font-size: 26px; margin-top: 40px; margin-bottom: 20px; }
.content-section h3 { font-size: 22px; margin-top: 30px; margin-bottom: 15px; color: var(--primary-light); }
.content-section h4 { font-size: 18px; margin-top: 25px; margin-bottom: 10px; color: var(--text-main); }

.content-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.content-section ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.content-section ul li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Utilities */
.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 992px) {
    .impact-grid, .pillars-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 36px; }
    .content-section { padding: 30px 20px; }
}

/* =========================================
   INNER HERO (SCG Style)
========================================= */
.inner-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: 0;
    margin-top: 0;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.inner-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}
.inner-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}
.inner-hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.inner-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    opacity: 0.9;
}
.inner-breadcrumb a {
    color: white;
    text-decoration: none;
}
.inner-breadcrumb a:hover {
    text-decoration: underline;
}
.scroll-down-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: white;
    animation: bounce 2s infinite;
}

/* =========================================
   MATERIALITY MATRIX
========================================= */
.matrix-section {
    margin-top: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.matrix-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-align: center;
    margin-bottom: 5px;
}
.matrix-subtitle {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}
.matrix-layout {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.matrix-legend {
    flex: 1;
    min-width: 280px;
}
.legend-group {
    margin-bottom: 25px;
}
.legend-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.legend-title span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    font-size: 14px;
}
.legend-title.env span { background-color: #27ae60; }
.legend-title.soc span { background-color: #e67e22; }
.legend-title.gov span { background-color: #2980b9; }

.legend-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.legend-list li {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
}
.legend-number {
    font-weight: bold;
    color: #555;
}

.matrix-grid-wrapper {
    flex: 2;
    min-width: 300px;
    position: relative;
    padding-left: 40px;
}
.y-axis-label {
    position: absolute;
    left: -80px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}
.zone-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
}
.axis-indicators {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 4px;
    background: #fff;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px solid #cbd5e1;
}
.grid-cell {
    min-height: 80px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    border-radius: 4px;
}
.bubble {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.b-env { background-color: #27ae60; }
.b-soc { background-color: #e67e22; }
.b-gov { background-color: #2980b9; }

@media (max-width: 768px) {
    .matrix-layout { flex-direction: column; }
    .matrix-grid-wrapper { padding-left: 20px; }
    .y-axis-label { left: -30px; font-size: 12px; }
}

.inner-breadcrumb span {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}
.scroll-down-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    color: white;
    transition: 0.3s;
    cursor: pointer;
}

.scroll-down-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
    transform: translateX(-50%) translateY(5px);
}

/* =========================================
   STATS GRID & STAT CARD
========================================= */
.stats-grid {
    display: grid;
    gap: 20px;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 6px solid var(--secondary); /* Green highlight for water/env */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card.blue {
    border-left-color: var(--primary); /* Blue highlight for waste */
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.stat-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-title::before {
    content: "🎯";
    font-size: 18px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    font-family: 'Outfit', 'Kanit', sans-serif;
    letter-spacing: -0.5px;
}

.stat-value.green {
    color: var(--secondary);
}

.stat-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* =========================================
   DATA TABLE
========================================= */
.data-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--white);
    margin: 20px 0;
    border: 1px solid #e2e8f0;
}

.data-table th {
    background-color: var(--primary);
    color: white;
    padding: 16px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
}

.data-table td {
    padding: 14px;
    border: 1px solid #e2e8f0;
    color: var(--text-main);
    line-height: 1.6;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}
