/* === Reset & Base === */
* {margin:0; padding:0; box-sizing:border-box;}
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: #fff;
    color: #222;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* === Header === */
.site-header {
    background: #1E90FF;
    color: white;
    padding: 1rem 0;
}
.site-header .logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}
.site-header .logo span { color: #FFFF00; }
.main-nav {
    display: flex;
    gap: 1rem;
}
.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* === Hero Section === */
.hero {
    background: linear-gradient(135deg, #7FFF00, #00FFFF, #FF007F);
    text-align: center;
    color: white;
    padding: 5rem 1rem;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.btn-primary {
    display: inline-block;
    background: #FFA500;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}
/* ==== Services Gallery ==== */
.services-gallery {
  overflow: hidden;
  padding: 3rem 0;
  position: relative;
  background: #fff;
}

.services-gallery .section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.services-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scrollServices 45s linear infinite;
}

.service-card {
  min-width: 260px;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.3s ease;
  text-align: center;
}

.service-card .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.8rem;
}

.service-card .icon img {
  max-width: 100%;
  height: auto;
}

.service-card:hover {
  transform: translateY(-6px) scale(1.05);
  background: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* Animation cho services */
@keyframes scrollServices {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.services-gallery:hover .services-track {
  animation-play-state: paused;
}

/* Gradient mask 2 bên */
.gradient-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}

.gradient-mask.left {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}

.gradient-mask.right {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}

/* ==== Services Gallery ==== */
.services-gallery {
  overflow: hidden;
  padding: 3rem 0;
  background: #fff;
  position: relative;
}

.services-gallery .section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.services-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scrollServices 45s linear infinite; /* chậm hơn portfolio */
}

.service-card {
  min-width: 280px;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.3s ease;
  cursor: pointer;
  text-align: center;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.95rem;
  color: #555;
}

.service-card:hover {
  transform: translateY(-6px) scale(1.05);
  background: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

/* Animation cho services */
@keyframes scrollServices {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Hover => dừng scroll */
.services-gallery:hover .services-track {
  animation-play-state: paused;
}

/* === Services === */
.services-preview h2,
.portfolio-preview h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1E90FF;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.service-card {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 4px solid #FFFF00;
    text-align: center;
    transition: transform 0.3s;
}
.service-card:hover { transform: translateY(-5px); }

/* === Portfolio === */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.portfolio-item {
    background: #eee;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}
.btn-secondary {
    display: block;
    width: fit-content;
    margin: 1.5rem auto 0;
    background: #FF007F;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
}

/* === Footer === */
.site-footer {
    background: #1E90FF;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}
.site-footer a { color: #FFFF00; text-decoration: none; }

/* === Responsive === */
@media (max-width: 768px) {
    .main-nav { display: none; flex-direction: column; background:#1E90FF; }
    .main-nav.active { display: flex; }
    .menu-toggle { display: block; color:white; }
}
/* === Page Header === */
.page-header {
    text-align: center;
    padding: 3rem 1rem;
    background: #00FFFF;
    color: #222;
    margin-bottom: 2rem;
}
.page-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }

/* === Contact Form === */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}
.contact-form input,
.contact-form textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.contact-form button {
    border: none;
    cursor: pointer;
}
.success { color: green; text-align: center; }
.error { color: red; text-align: center; }
.success, .error {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-in-out;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.form-loading {
    display: none;
    text-align: center;
    margin-top: 10px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    margin: 0 auto 8px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Hero image layout */
.hero-with-image {
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-image img {
  width: 110%;
  height: 110%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.02) brightness(0.85);
  transform: scale(1.03);
}

/* Content sits above image */
.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: left;
  max-width: 720px;
}

/* Add subtle overlay for readability */
.hero-with-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
}

/* Portfolio placeholder styling */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.portfolio-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(10,10,10,0.06);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portfolio-item img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.portfolio-item h3 {
  padding: 1rem;
  margin: 0;
  font-size: 1.05rem;
}

/* hover */
.portfolio-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(10,10,10,0.12);
}

/* ensure fade-in still works */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
/* Hero Layout */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 80px 0;
}
.hero-text {
    flex: 1 1 50%;
    padding: 20px;
}
.hero-image {
    flex: 1 1 50%;
    text-align: center;
}
.hero-image img {
    max-width: 90%;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Portfolio Preview */
.portfolio-preview {
    padding: 60px 0;
    background: #f8f8f8;
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.portfolio-item img {
    width: 100%;
    border-radius: 12px;
    transition: transform 0.3s ease;
}
.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Simple animations */
.animate-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}
.animate-scale-up {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-visible {
    opacity: 1;
    transform: none;
}
/* 404 Page */
.page-404 {
    text-align: center;
    padding: 100px 20px;
    background: #f8f8f8;
}

.page-404 h1 {
    font-size: 6rem;
    font-weight: bold;
    color: var(--primary-color, #ff6b6b);
    margin-bottom: 10px;
}

.page-404 h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.page-404 p {
    max-width: 600px;
    margin: 0 auto 30px auto;
    color: #555;
    font-size: 1.1rem;
}

.page-404-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.page-404-buttons a {
    background: var(--primary-color, #ff6b6b);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}
/* Hero Section */
.hero-with-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  overflow: hidden;
}
.hero-with-image .hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(70%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(0,0,0,0.6), rgba(0,0,0,0.2));
}
.hero-content {
  position: relative;
  color: #fff;
  z-index: 2;
  max-width: 700px;
}
.hero-content h1 span {
  color: #ffde59;
}
.hero-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.btn-outline {
  padding: 10px 20px;
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  background: #fff;
  color: #333;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.service-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}
.service-card .icon img {
  height: 48px;
  margin-bottom: 1rem;
}
.link-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 500;
  color: #007BFF;
  text-decoration: none;
}
.link-more:hover {
  text-decoration: underline;
}
/* Portfolio Gallery */
.portfolio-gallery {
  overflow: hidden;
  padding: 3rem 0;
  background: #fafafa;
  position: relative;
}
.portfolio-gallery .section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.gallery-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scrollGallery 30s linear infinite;
}

.gallery-item {
  min-width: 300px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Animation keyframes */
@keyframes scrollGallery {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Dịch 1 nửa track để tạo vòng lặp */
}

/* Pause animation khi hover */
.portfolio-gallery:hover .gallery-track {
  animation-play-state: paused;
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}
.portfolio-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}
.portfolio-item:hover img {
  transform: scale(1.05);
}
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: opacity 0.3s ease;
}
.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}
/* ==== Portfolio Page ==== */
.portfolio-page {
  padding: 4rem 0;
  background: #fafafa;
}

.portfolio-page .section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.portfolio-page .section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
}

.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transform: scale(0.97);
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}

.portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.portfolio-item:hover img {
  transform: scale(1.08);
}

.portfolio-item:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.portfolio-item .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  color: #fff;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover .overlay {
  opacity: 1;
}

.portfolio-item .overlay h3 {
  font-size: 1.2rem;
  margin: 0;
}

.portfolio-item .overlay p {
  font-size: 0.95rem;
  margin: 0.2rem 0 0;
  opacity: 0.9;
}
/* ==== HEADER ==== */
.site-header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
}

.logo img {
  height: 40px;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  text-decoration: none;
  font-weight: 500;
  color: #333;
  position: relative;
}

.main-nav a.active::after,
.main-nav a:hover::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 60px;
    right: 10px;
    padding: 1rem;
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
  }

  .main-nav.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}
/* ==== FOOTER ==== */
.site-footer {
  background: #111;
  color: #fff;
  padding: 3rem 1rem 1rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.footer-logo {
  height: 40px;
  margin-bottom: 1rem;
}

.footer-col h4 {
  margin-bottom: 0.8rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul a {
  color: #ccc;
  text-decoration: none;
}

.footer-col ul a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links img {
  height: 20px;
  transition: transform 0.3s ease;
}

.social-links img:hover {
  transform: scale(1.2);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #888;
}
/* ==== ABOUT PAGE ==== */
.about-hero-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: center;
  padding: 3rem 1rem;
}

.about-hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.about-hero-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #555;
}

.about-hero-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* Mission Section */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.mission-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.mission-card:hover {
  transform: translateY(-5px);
}

/* Team Section */
.team-gallery {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  margin-top: 2rem;
}

.team-card {
  flex: 0 0 220px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card img {
  width: 100%;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
