/* ============================================
   UTOC - CONSTRUCTION THEME
   Matching Original Template Style
   Colors: #115b1f (Primary) | #007cd7 (Secondary)
   ============================================ */

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

:root {
    --primary-color: #115b1f;
    --secondary-color: #007cd7;
    --dark-bg: #252525;
    --text-dark: #333333;
    --text-gray: #666666;
    --white: #ffffff;
    --light-bg: #f8f8f8;
    --border-color: #e5e5e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.9;
    font-size: 15px;
    font-weight: 300;
    background: var(--white);
}

/* ============================================
   TOP LINE
   ============================================ */
.top-line {
    background: var(--dark-bg);
    padding: 12px 0;
    font-size: 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.info-list li {
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-list li i {
    color: var(--primary-color);
}

.social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 3px;
    justify-content: flex-end;
}

.social-icons li a {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.05);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons li a:hover {
    background: var(--primary-color);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    padding: 0;
    top: 45px !important;
}

.navbar-brand {
    padding: 15px 0;
    font-size: 28px;
    font-weight: 900;
    color: var(--primary-color);
}

.navbar-nav {
    margin-left: auto;
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    padding: 30px 20px !important;
    letter-spacing: 1px;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 0;
    padding: 0;
    min-width: 240px;
}

.dropdown-item {
    padding: 15px 25px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.dropdown-item:hover {
    background: var(--primary-color);
    color: var(--white);
    padding-left: 35px;
}

.search-btn {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

/* ============================================
   HERO SLIDER WITH CORNER BORDERS
   ============================================ */
.hero-slider {
    position: relative;
    height: 600px;
    margin-top: 123px;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1600');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

/* Corner Border Top Left */
.hero-slider::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 100px;
    width: 150px;
    height: 150px;
    border-top: 4px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    z-index: 1;
}

/* Corner Border Top Right */
.hero-slider::after {
    content: '';
    position: absolute;
    top: 80px;
    right: 100px;
    width: 150px;
    height: 150px;
    border-top: 4px solid var(--primary-color);
    border-right: 4px solid var(--primary-color);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.hero-content h1 {
    font-size: 60px;
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-content h1 span {
    display: block;
    font-weight: 900;
    color: var(--primary-color);
    font-size: 70px;
    margin-top: 10px;
}

.hero-content p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 35px;
    max-width: 600px;
}

/* ============================================
   PAGE BANNER
   ============================================ */
.page-banner {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
                url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?w=1600');
    background-size: cover;
    background-position: center;
    padding: 100px 0 60px;
    margin-top: 123px;
    text-align: center;
    color: var(--white);
}

.page-banner h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.breadcrumb {
    background: transparent;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    font-size: 13px;
    text-transform: uppercase;
}

.breadcrumb-item a {
    color: var(--white);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary-custom {
    background: var(--primary-color);
    color: var(--white);
    padding: 18px 45px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    display: inline-block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary-custom:hover::before {
    left: 0;
}

.btn-primary-custom:hover {
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-outline-custom {
    background: transparent;
    color: var(--white);
    padding: 18px 45px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid var(--white);
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: var(--white);
    color: var(--text-dark);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 90px 0;
}

.bg-light {
    background: var(--light-bg);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 25px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.section-title.centered {
    text-align: center;
}

.section-title.centered::after {
    left: 50%;
    transform: translateX(-50%);
}

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

/* ============================================
   SERVICE CARDS (Template Style)
   ============================================ */
.service-card {
    background: var(--white);
    padding: 45px 35px;
    text-align: center;
    border: 1px solid var(--border-color);
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.service-card:hover::before {
    width: 100%;
}

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

.service-icon {
    width: 90px;
    height: 90px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 50%;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon img {
    transform: scale(1.1);
}

.service-icon i {
    font-size: 40px;
}

.service-icon::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 2px solid var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-icon::after {
    opacity: 1;
}

.service-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.service-card p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.service-card a {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.service-card a i {
    margin-left: 5px;
    transition: margin-left 0.3s ease;
}

.service-card a:hover {
    color: var(--secondary-color);
}

.service-card a:hover i {
    margin-left: 10px;
}

/* ============================================
   PROJECT CARDS
   ============================================ */
.project-card {
    position: relative;
    overflow: hidden;
    height: 350px;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.15);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(17,91,31,0.9) 0%, transparent 70%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 35px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-category {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 6px 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    align-self: flex-start;
}

.project-overlay h3 {
    color: var(--white);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.project-overlay p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--dark-bg);
    color: rgba(255,255,255,0.7);
    padding: 80px 0 0;
}

.footer-widget h3 {
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.footer-widget p {
    font-size: 13px;
    line-height: 1.9;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
    display: block;
}

.footer-links li a::before {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.footer-links li a:hover {
    color: var(--primary-color);
    padding-left: 25px;
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    font-size: 13px;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--secondary-color);
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
    background: var(--white);
    padding: 50px 40px;
    box-shadow: 0 0 30px rgba(0,0,0,0.08);
}

.contact-form h3 {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 35px;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 15px 20px;
    font-size: 13px;
    height: auto;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

textarea.form-control {
    min-height: 180px;
}

.contact-info-box {
    background: var(--primary-color);
    color: var(--white);
    padding: 50px 40px;
    height: 100%;
}

.contact-info-box h3 {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 35px;
}

.contact-info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-info-item i {
    font-size: 24px;
    width: 40px;
}

.contact-info-item h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-info-item p {
    font-size: 14px;
    margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .top-line {
        display: none;
    }

    .navbar {
        top: 0 !important;
    }

    .hero-slider {
        height: 500px;
        margin-top: 70px;
    }

    .hero-slider::before,
    .hero-slider::after {
        width: 100px;
        height: 100px;
        top: 60px;
    }

    .hero-slider::before {
        left: 50px;
    }

    .hero-slider::after {
        right: 50px;
    }

    .hero-content h1 {
        font-size: 45px;
    }

    .hero-content h1 span {
        font-size: 50px;
    }

    .page-banner {
        margin-top: 70px;
    }

    .navbar-nav .nav-link {
        padding: 15px 20px !important;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 400px;
        margin-top: 62px;
    }

    .page-banner {
        margin-top: 62px;
    }
    
    .hero-slider::before,
    .hero-slider::after {
        width: 80px;
        height: 80px;
        top: 40px;
        border-width: 2px;
    }
    
    .hero-slider::before {
        left: 20px;
    }
    
    .hero-slider::after {
        right: 20px;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content h1 span {
        font-size: 38px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .page-banner h1 {
        font-size: 36px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .info-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-icons {
        justify-content: flex-start;
        margin-top: 15px;
    }
}

/* Force resize images - Override width/height attributes */
.content figure.image,
.content figure {
    max-width: 800px !important;
    width: 100% !important;
    margin: 20px auto !important;
}

.content figure.image img,
.content figure img,
.content img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
}

/* Mobile */
@media (max-width: 768px) {
    .content figure.image,
    .content figure {
        max-width: 100% !important;
    }
}

/* Project Card */
.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.project-image {
    position: relative;
    overflow: hidden;
    flex: 1;
}

.project-image img {
    transition: transform 0.3s;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.6));
    color: white;
    padding: 20px;
}

.project-category {
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 10px;
}

.project-overlay h3 {
    font-size: 18px;
    margin: 10px 0;
}

.project-overlay p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

/* Project Footer - ซ่อนปกติ แสดงตอน Hover */
/* View Details Link */
.view-details-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    margin-top: 15px;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.view-details-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    transform: translateX(5px);
}

/* ซ่อนปกติ แสดงตอน Hover Card */
.view-details-link {
    opacity: 0;
    transform: translateY(10px);
}

.project-card:hover .view-details-link {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

/* ลบ project-footer styles (ถ้ามี) */
.project-footer {
    display: none;
}

/* Filter Buttons */
.btn-group .btn {
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-group .btn:hover {
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    gap: 5px;
}

.pagination .page-link {
    color: var(--primary-color);
    border: 2px solid #ddd;
    padding: 10px 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-item.disabled .page-link {
    border-color: #ddd;
}