/* Site CSS - Matching React/Mantine Layout */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 70px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #000;
    line-height: 1.55;
    background: #fff;
    width: 100%;
    overflow-x: hidden;
}

.container-fluid {
    width: 100%;
    padding-left: var(--mantine-spacing-md, 1rem);
    padding-right: var(--mantine-spacing-md, 1rem);
    margin-left: auto;
    margin-right: auto;
}

.container-xl {
    max-width: 1200px;
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
}

/* Header Styles */
.app-header {
    height: 70px;
    background: #fff;
    border-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: block;
}

.logo {
    height: 50px;
    width: auto;
    margin: 10px 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
    gap: 1rem;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
}

.nav-link {
    text-decoration: none;
    color: #000;
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000;
}

.lang-link .flag-icon {
    font-size: 1.25rem;
    display: inline-block;
}

.lang-link.active {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    margin-top: 0;
    padding-top: 0.5rem;
    z-index: 1000;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #000;
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: background-color 0.15s ease;
    font-weight: 400;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #000;
    transition: transform 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Mobile Navigation */
.mobile-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    width: 250px;
    height: calc(100vh - 70px);
    background: #fff;
    border-right: 1px solid #dee2e6;
    transform: translateX(-100%);
    transition: transform 0.3s;
    overflow-y: auto;
    z-index: 99;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-link {
    padding: 1rem;
    text-decoration: none;
    color: #000;
    text-transform: uppercase;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f3f5;
    transition: background-color 0.2s;
}

.mobile-nav-link:hover {
    background-color: #f8f9fa;
    color: #000;
}

.mobile-nav-sublink {
    padding-left: 2rem;
}

.mobile-nav-group {
    border-bottom: 1px solid #f1f3f5;
}

.mobile-nav-label {
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
}

/* Hero Section */
.hero-wrapper {
    position: relative;
    min-height: 70vh;
    height: 70vh;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 70vh;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    margin-left: 0;
}

.hero-inner {
    max-width: 600px;
    text-shadow: 0 0 4px black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero-title {
    font-size: 42px;
    line-height: 1.2;
    color: white !important;
    margin: 0;
    font-weight: 700;
    font-family: 'Kanit', sans-serif;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 62px;
        line-height: 0.9;
    }
}

.hero-text {
    margin-top: 2rem;
    font-size: 18px;
    color: white;
}

@media (min-width: 640px) {
    .hero-text {
        font-size: 24px;
    }
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

.grid-col {
    display: flex;
    align-items: center;
    min-height: 300px;
}

.grid-col-6 {
    grid-column: span 12;
}

@media (min-width: 768px) {
    .grid-col-6 {
        grid-column: span 6;
    }
}

.grid-col-12 {
    grid-column: span 12;
}

.image-col {
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.section-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s ease, opacity 0.5s ease;
}

/* Fade-in animation for images */
.fade-in-image {
    opacity: 0;
    filter: blur(20px);
}

/* Fade from right (slides left) */
.fade-from-right {
    transform: translateX(100px);
    box-shadow: 100px 100px 100px rgba(0, 0, 0, 0.3);
}

.fade-from-right.visible {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
    transition: opacity 0.8s ease-out, transform 0.8s ease-in-out, filter 0.8s ease-out, box-shadow 0.8s ease-in-out;
}

/* Fade from left (slides right) */
.fade-from-left {
    transform: translateX(-100px);
    box-shadow: -100px -100px 100px rgba(0, 0, 0, 0.3);
}

.fade-from-left.visible {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
    transition: opacity 0.8s ease-out, transform 0.8s ease-in-out, filter 0.8s ease-out, box-shadow 0.8s ease-in-out;
}

.image-col:hover .section-image {
    transform: scale(1.05);
}

.content-box {
    padding: 3rem 2rem;
    width: 100%;
}

@media (min-width: 768px) {
    .content-box {
        padding: 4rem 3rem;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    color: #228be6;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.text-muted {
    color: #868e96;
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

.mt-xl {
    margin-top: 3rem;
}

.mt-md {
    margin-top: 1rem;
}

.story-text {
    font-style: italic;
}

.story-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.service-list {
    list-style: none;
    margin-top: 1rem;
    color: #868e96;
}

.service-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-weight: bold;
}

.inherit-link {
    color: inherit;
    text-decoration: none;
}

.inherit-link:hover {
    text-decoration: underline;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.btn-default {
    background: #fff;
    color: #000;
    border-color: #ced4da;
}

.btn-default:hover {
    background: #f8f9fa;
    color: #000;
}

/* Footer */
.app-footer {
    background: #f8f9fa;
    padding-top: 3rem;
    padding-bottom: 2rem;
    margin-top: 0;
}

.footer-top {
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 200px;
}

.footer-logo {
    height: 50px;
    width: auto;
}

.footer-tagline {
    font-size: 0.75rem;
    color: #868e96;
    margin-top: 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-col h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.footer-text {
    font-size: 0.75rem;
    color: #868e96;
    margin-top: 1rem;
}

.footer-text a {
    color: #228be6;
    text-decoration: none;
}

.footer-text a:hover {
    text-decoration: underline;
}

.footer-image {
    width: 100%;
    max-width: 270px;
    height: auto;
    margin-top: 1rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #dee2e6;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.copyright {
    color: #868e96;
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 0;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #868e96;
    transition: color 0.2s;
}

.social-link:hover {
    color: #495057;
}

.footer-credit {
    text-align: center;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.footer-credit a {
    color: #228be6;
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* Partners Carousel */
.partners-carousel {
    padding: 3rem 0;
    overflow: hidden;
}

.partners-container {
    display: flex;
    gap: 3rem;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.partners-container img {
    height: 100px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.partners-container img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive Orders */
.order-1 { order: 1; }
.order-2 { order: 2; }
.order-3 { order: 3; }
.order-4 { order: 4; }
.order-5 { order: 5; }
.order-6 { order: 6; }
.order-7 { order: 7; }
.order-8 { order: 8; }
.order-9 { order: 9; }
.order-10 { order: 10; }
.order-11 { order: 11; }

/* Mobile adjustments */
@media (max-width: 767px) {
    .image-col {
        display: none;
    }
    
    .grid-col {
        order: initial !important;
    }
}

/* Certifications Grid */
.certifications-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cert-item {
    padding: 3rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0.5rem 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
