/* Mangkorn Service Engineering - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap');

:root {
    --orange: #f9711d;
    --orange-dark: #e7610e;
    --beige: #dfd3be;
    --brown: #9d8c6f;
    --dark-brown: #524335;
    --light-bg: #faf8f5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar-mangkorn {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 0.5rem 0;
    transition: all 0.3s;
}
.navbar-mangkorn.scrolled {
    padding: 0.3rem 0;
    box-shadow: 0 2px 30px rgba(0,0,0,0.12);
}
.navbar-brand-mangkorn {
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--orange) !important;
    letter-spacing: 3px;
}
.navbar-brand-sub {
    font-size: 0.65rem;
    color: var(--orange-dark);
    letter-spacing: 2px;
    display: block;
    margin-top: -5px;
}
.nav-link-mangkorn {
    color: var(--dark-brown) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s;
    position: relative;
}
.nav-link-mangkorn:hover, .nav-link-mangkorn.active {
    color: var(--orange) !important;
}
.nav-link-mangkorn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--orange);
    transition: all 0.3s;
    transform: translateX(-50%);
}
.nav-link-mangkorn:hover::after, .nav-link-mangkorn.active::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 50%, var(--dark-brown) 100%);
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="rgba(255,255,255,0.03)" width="50" height="50"/></svg>');
    background-size: 60px;
}
.hero-section .hero-content {
    position: relative;
    z-index: 2;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    line-height: 1.8;
}
.hero-shape {
    position: absolute;
    right: -10%;
    top: -20%;
    width: 60%;
    height: 140%;
    background: rgba(255,255,255,0.05);
    transform: rotate(15deg);
    border-radius: 50px;
}

/* Buttons */
.btn-mangkorn {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}
.btn-mangkorn:hover {
    background: var(--orange-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(249,113,29,0.4);
}
.btn-mangkorn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    padding: 10px 35px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}
.btn-mangkorn-outline:hover {
    background: #fff;
    color: var(--orange);
}

/* Section Styles */
.section-padding { padding: 80px 0; }
.section-bg { background: var(--light-bg); }
.section-title {
    font-weight: 800;
    color: var(--dark-brown);
    margin-bottom: 0.5rem;
    position: relative;
}
.section-title-orange {
    color: var(--orange);
    font-weight: 700;
}
.section-divider {
    width: 60px;
    height: 3px;
    background: var(--orange);
    margin: 15px 0 30px;
}
.section-divider-center {
    width: 60px;
    height: 3px;
    background: var(--orange);
    margin: 15px auto 30px;
}

/* Vision Section */
.vision-section {
    background: linear-gradient(135deg, var(--beige) 0%, #f5ede0 100%);
    padding: 60px 0;
}
.vision-text {
    font-size: 1.1rem;
    color: var(--dark-brown);
    line-height: 2;
}

/* Service Cards */
.service-card {
    background: #fff;
    border-radius: 15px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s;
    border: 1px solid #f0ebe4;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--orange);
}
.service-card .service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: #fff;
}
.service-card .service-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--orange);
    opacity: 0.3;
    position: absolute;
    top: 10px;
    right: 20px;
}
.service-card h4 {
    color: var(--dark-brown);
    font-weight: 700;
    margin-bottom: 5px;
}
.service-card h6 {
    color: var(--orange);
    font-weight: 600;
    margin-bottom: 15px;
}
.service-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Service Detail Cards (Services page) */
.service-detail-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
    transition: all 0.3s;
    margin-bottom: 30px;
}
.service-detail-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}
.service-detail-card .card-header-custom {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: #fff;
    padding: 25px 30px;
}
.service-detail-card .card-header-custom .number {
    font-size: 3rem;
    font-weight: 800;
    opacity: 0.3;
    line-height: 1;
}
.service-detail-card .card-body-custom {
    padding: 30px;
}

/* Partners Section */
.partners-section { background: #fff; }
.partner-logo {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
    height: 80px;
}
.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}
.partner-logo img {
    max-height: 50px;
    max-width: 120px;
    object-fit: contain;
}
.partner-name {
    font-weight: 600;
    color: var(--brown);
    font-size: 0.85rem;
    text-align: center;
    padding: 5px 10px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 50%;
    height: 200%;
    background: rgba(255,255,255,0.05);
    transform: rotate(15deg);
}

/* Contact Section */
.contact-info-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-left: 4px solid var(--orange);
    margin-bottom: 20px;
}
.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.contact-form-card {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
.form-control:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 0.2rem rgba(249,113,29,0.15);
}
.form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 0.2rem rgba(249,113,29,0.15);
}

/* Portfolio Cards */
.portfolio-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    height: 100%;
}
.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.portfolio-card .card-img-top {
    height: 200px;
    object-fit: cover;
}
.portfolio-card .card-body {
    padding: 25px;
}
.portfolio-card .badge-category {
    background: var(--orange);
    color: #fff;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Footer */
.footer-main {
    background: var(--dark-brown);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 30px;
}
.footer-main h5 {
    color: var(--orange);
    font-weight: 700;
    margin-bottom: 20px;
}
.footer-main a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-main a:hover {
    color: var(--orange);
}
.footer-bottom {
    background: #3a2e25;
    color: rgba(255,255,255,0.5);
    padding: 15px 0;
    font-size: 0.85rem;
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.footer-contact-item i {
    color: var(--orange);
    margin-top: 3px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 50%, var(--dark-brown) 100%);
    padding: 100px 0 60px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    right: -10%;
    top: -30%;
    width: 50%;
    height: 160%;
    background: rgba(255,255,255,0.05);
    transform: rotate(15deg);
    border-radius: 50px;
}
.page-header h1 {
    font-weight: 800;
    letter-spacing: 3px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--brown); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; letter-spacing: 2px; }
    .hero-subtitle { font-size: 1rem; }
    .section-padding { padding: 50px 0; }
    .hero-section { min-height: 70vh; }
    .hero-shape { display: none; }
}
@media (max-width: 576px) {
    .hero-title { font-size: 1.8rem; }
    .navbar-brand-mangkorn { font-size: 1.4rem; }
}

/* Admin Styles */
.admin-sidebar {
    min-height: 100vh;
    background: var(--dark-brown);
    color: #fff;
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 2px 10px;
    transition: all 0.3s;
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    background: rgba(249,113,29,0.2);
    color: var(--orange);
}
.admin-sidebar .nav-link i {
    width: 24px;
    margin-right: 10px;
}
.admin-content {
    margin-left: 260px;
    min-height: 100vh;
    background: #f8f9fa;
}
.admin-topbar {
    background: #fff;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stat-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-brown);
}

/* Utility */
.text-orange { color: var(--orange) !important; }
.bg-orange { background-color: var(--orange) !important; }
.bg-dark-brown { background-color: var(--dark-brown) !important; }
.bg-beige { background-color: var(--beige) !important; }
