:root {
  /*--primary-blue: #0056e0;*/
  --primary-blue: #0f919d;
  --dark-bg: #0a1128;
  --darker-bg: #010e0f;
  --light-bg: #f8f9fa;
  --text-gray: #a0aabf;
}

body {
  font-family: 'Google Sans', 'Anuphan', sans-serif;
  color: #333;
}

/* การตกแต่ง Navbar */

.navbar-custom {
  /*background-color: var(--dark-bg);*/
  padding: 1rem 0;
}

.navbar-brand .logo-text {
  font-weight: 700;
  letter-spacing: 1px;
  /*font-size: 1.25rem;*/
  /*line-height: 1.1;*/
}

.navbar-brand .sub-text {
  font-size: 0.75rem;
  color: var(--text-gray);
  font-weight: 400;
}

.nav-link {
  font-weight: 600;
  /*font-size: 0.95rem;*/
  text-transform: uppercase;
  margin: 0 10px;
  /*color: #fff !important;*/
  opacity: 0.8;
  /*transition: opacity 0.3s;*/
}

.nav-link:hover, .nav-link.active {
  opacity: 1;
}

.nav-link.active {
  border-bottom: 2px solid var(--primary-blue);
}

.btn-primary-custom {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
  border-radius: 50px;
  padding: 10px 24px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-primary-custom:hover {
  /*background-color: #0046b8;*/
  /*border-color: #0046b8;*/
  background-color: #3ea7b0;
  border-color: #3ea7b0;
  transform: translateY(-2px);
}

.btn-outline-light-custom {
  border: none;
  border-bottom: 1px solid #fff;
  border-radius: 0;
  padding: 0 0 5px 0;
  color: #fff;
  font-weight: 500;
}

.btn-outline-light-custom:hover {
  color: #ccc;
  border-color: #ccc;
}

/* ส่วน Hero Section */

.hero-section {
  position: relative;
  background: url('../../assets/img/Hi%20Tech%20Booth%20Image%20-%20ChatGPT%20-%20690716.webp') center/cover no-repeat;
  padding: 100px 0 50px;
  color: #fff;
}

.hero-section.home {
  padding: 150px 0 100px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(10,17,40,0.95) 0%, rgba(10,17,40,0.7) 40%, rgba(10,17,40,0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  /*max-width: 800px;*/
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ส่วนแถบสถิติที่ลอยอยู่ (Stats Bar) */

.stats-container {
  position: relative;
  z-index: 10;
  margin-top: -60px;
}

.stats-bar {
  background: linear-gradient(135deg, #1a2a4c 0%, #0d1a36 100%);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  padding: 30px;
  color: white;
}

.stat-icon {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-right: 15px;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1;
}

.stat-text {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 0;
}

/* ส่วนบริการ (Services) */

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-bg);
  margin-bottom: 0.5rem;
}

.section-subtitle-small {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  margin-bottom: 1rem;
}

.service-card {
  background-color: #fff;
  border-radius: 16px;
  padding: 30px;
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover {
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
  transform: translateY(-5px);
}

.service-icon-wrapper {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary-blue);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.service-desc {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ส่วนผลงาน (Portfolio) */

.portfolio-section {
  background-color: var(--bs-secondary-bg);
}

/* ส่วน Footer และ CTA */

.cta-footer-section {
  background: var(--bs-tertiary-bg);
  /*background-image: url('https://images.unsplash.com/photo-1551818255-e6e10975bc17?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');*/
  background-blend-mode: overlay;
  /*background-color: rgba(10, 17, 40, 0.9);*/
  /*color: white;*/
  position: relative;
}

.contact-info-list {
  list-style: none;
  padding: 0;
}

.contact-info-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.contact-info-list .bi {
  color: var(--primary-blue);
  font-size: 1.25rem;
  margin-right: 15px;
  width: 20px;
  text-align: center;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  margin-right: 10px;
  transition: all 0.3s;
  text-decoration: none;
}

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

.footer-bottom {
  background-color: var(--darker-bg);
  padding: 20px 0;
  font-size: 0.85rem;
  color: var(--text-gray);
}

.footer-links a {
  color: var(--text-gray);
  text-decoration: none;
  margin-left: 15px;
}

.footer-links a:hover {
  color: white;
}

/* ปรับแต่งลูกศรในปุ่ม */

.btn i {
  margin-left: 8px;
  font-size: 0.9em;
}

.btn-primary {
  color: white;
}

#contact-info li a {
  text-decoration: none;
  color: var(--bs-gray);
}

/* Portfolio Page */

/* Project Card */
@media (min-width: 1200px) {
    .project-card {
        padding: 2rem !important;
        margin-bottom: 2rem !important;
    }
}

.project-info {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
}

.project-category {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.project-location {
    color: var(--primary-blue);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.project-details-list {
    list-style: none;
    padding: 0;
    margin: 0 0 auto 0; /* push button to bottom */
}

.project-details-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
/*    font-size: 0.9rem;
    color: var(--text-dark);*/
}

.project-details-list i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.project-gallery {
    flex: 1;
    display: grid;
    grid-template-columns: 2.5fr 1fr; /* Adjusted ratio to give main image more space */
    gap: 1rem;
}

/* Anchor wrapper for main image */
.gallery-main-link {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.project-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between; /* Distribute thumbnails evenly */
}

/* Anchor wrapper for thumbnail images */
.gallery-thumb-link {
    display: block;
    width: 100%;
    height: calc((100% - 2rem) / 3);
    min-height: 100px;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Subtle zoom effect when hovering clickable images */
.gallery-main-link:hover .gallery-main,
.gallery-thumb-link:hover .gallery-thumb {
    transform: scale(1.04);
}

/* Overlay for extra images count on the last thumbnail */
.gallery-thumb-link {
    position: relative;
}

.gallery-thumb-overlay { display: none; }

.has-more .gallery-thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 43, 76, 0.5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
}

.gallery-thumb-link.has-more:hover .gallery-thumb-overlay {
    background-color: rgba(0, 153, 168, 0.85);
}

/* Responsive */
@media (max-width: 991.98px) {
    .project-card {
        flex-direction: column;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-main-link {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .project-gallery-thumbs {
        flex-direction: row; /* Horizontal thumbnails on mobile */
        gap: 0.5rem;
    }

    .gallery-thumb-link {
        height: auto;
        aspect-ratio: 4 / 3;
        width: calc((100% - 1rem) / 3);
    }
}
