/* ===================== */
/* 肌 Reset & Base Styles */
/* ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Prevent text selection and copying for all elements */
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE 10+ */
  user-select: none;         /* Standard syntax */
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', sans-serif; /* Inter font for consistency */
  background-color: #f8f9fa; /* Light grey background */
  color: #343a40; /* Dark text for readability */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

nav a, nav span, nav div {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: auto; /* still clickable */
  -webkit-user-drag: none;
  user-drag: none;
}

/* Reusable Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem; /* Consistent padding */
}

/* Accessibility Focus */
:focus {
  outline: 3px solid #ffc107 !important; /* Prominent yellow focus outline for accessibility and style */
  outline-offset: 4px;
  border-radius: 4px; /* Ensure rounded focus for inputs */
}

/* Lock Images */
img {
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none; /* Safari, Chrome */
  user-drag: none;         /* Standard syntax */
  max-width: 100%; /* Ensure images are responsive */
  height: auto;
}

/* ===================== */
/* 塙 Navigation Bar (Shared Styles) */
/* ===================== */
.navbar {
  background: linear-gradient(to right, #1a237e, #4a148c); /* Deep blue to rich purple gradient */
  padding: 1rem 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); /* More pronounced shadow */
  position: fixed;
  width: 100%;
  z-index: 1000; /* Ensure navbar is always on top */
}
.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  position: relative; /* Add this for the absolute menu positioning */
}
.brand-logo {
  font-size: 1.9rem; /* Slightly larger brand name */
  font-weight: 800; /* Bolder brand name */
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.08em; /* Increased letter spacing for classic feel */
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3); /* Subtle text shadow */
}

/* Hamburger button styles - hidden by default for desktop */
.hamburger-menu {
  display: none; /* Hide on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #fff;
  transition: transform 0.3s ease;
  z-index: 1001;
}

.hamburger-menu:focus {
    outline: 3px solid #ffc107 !important;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem; /* More spacing between nav items */
  font-size: 1.05rem; /* Slightly larger font size */
}
.nav-link-item {
  color: #e0e0e0; /* Softer white for links */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease, text-shadow 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem; /* Slightly more space for icon */
}
.nav-link-item:hover, .nav-link-item.active {
  color: #ffdb58; /* Brighter yellow on hover and active */
  transform: translateY(-3px); /* More pronounced lift effect */
  text-shadow: 0 0 8px rgba(255, 219, 88, 0.6); /* Glow effect */
}
.nav-auth-button {
  background-color: #ffc107; /* Bright yellow button */
  color: #1a237e !important; /* Deep blue text for contrast */
  padding: 0.7rem 1.4rem; /* Generous padding */
  border-radius: 9999px; /* Pill-shaped button */
  font-weight: 700; /* Bolder text */
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4); /* Soft shadow */
}
.nav-auth-button:hover {
  background-color: #ffdb58; /* Lighter yellow on hover */
  transform: translateY(-2px) scale(1.03); /* Subtle lift and scale */
  box-shadow: 0 6px 15px rgba(255, 193, 7, 0.6); /* Enhanced shadow */
}

/* ===================== */
/* ｧｱ Footer (Shared Styles) */
/* ===================== */
.main-footer {
  background-color: #1e1e2e; /* Deep dark background for footer */
  color: #adb5bd; /* Soft gray text */
  padding: 3rem 0; /* More vertical padding */
  text-align: center;
  box-shadow: inset 0 6px 20px rgba(0, 0, 0, 0.2); /* Inner shadow for depth */
}
.main-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem; /* More spacing */
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem; /* Wider spacing for social icons */
  margin-top: 1rem;
}
.social-icon {
  color: #adb5bd;
  font-size: 1.7rem; /* Larger social icons */
  transition: color 0.3s ease, transform 0.2s ease;
}
.social-icon:hover {
  color: #ffc107; /* Yellow on hover */
  transform: translateY(-5px) scale(1.1); /* Lift and slight scale */
}

footer, footer a, footer span, footer img, footer div {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: auto; /* still clickable */
  -webkit-user-drag: none;
  user-drag: none;
}

/* ===================== */
/* Index Page Specific Styles */
/* ===================== */
.hero-bg {
  background-image: url('background.jpg'); /* Placeholder image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
}

/* You might want to remove the inline style from index.html body and define it here */
body.index-page { /* Example class if you want specific body styles for index */
  /* font-family: 'Inter', sans-serif; */
  /* background-color: #f8f9fa; */
  /* color: #343a40; */
  /* line-height: 1.6; */
  /* overflow-x: hidden; */
}

/* Hero Section */
/* The existing Tailwind classes on the header element are sufficient for hero layout */

/* Section Titles (Index Page specific overrides or additions) */
.text-blue-800 { color: #1a237e; } /* Ensuring this color is consistent */
.border-yellow-400 { border-color: #ffc107; } /* Ensuring this color is consistent */

/* Card Styling for Services, Advantages, Projects */
/* These styles were primarily Tailwind, but if you have custom non-Tailwind
   styles for these, they would go here to be index-specific if not shared.
   Currently, your HTML uses direct Tailwind for these. */

/* Contact Section (Index Page Specific) */
#contact .bg-gray-800 { background-color: #343a40; } /* Example to make it consistent if needed */
#contact .text-white { color: #fff; }
#contact .text-yellow-400 { color: #ffc107; }
#contact .border-white { border-color: #fff; }
#contact .bg-gray-700 { background-color: #495057; }
#contact .border-gray-600 { border-color: #6c757d; }
#contact .text-blue-900 { color: #1a237e; }


/* ===================== */
/* Animations (Shared) */
/* ===================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===================== */
/* 導 Responsive Adjustments (Shared Navbar & Index Page Specific) */
/* ===================== */
@media (max-width: 767px) { /* Small screens (mobile) */
  /* Navbar adjustments for mobile */
  .navbar-container {
    flex-direction: row; /* Keep elements in a row */
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
  }
  
  /* Show the hamburger menu button */
  .hamburger-menu {
      display: block;
  }

  /* Make the navigation links collapsible */
  .nav-links {
    position: absolute;
    top: 100%; /* Position below the navbar */
    left: 0;
    width: 100%;
    max-height: 0; /* Initially hidden */
    overflow: hidden;
    background: linear-gradient(to right, #1a237e, #4a148c);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    flex-direction: column;
    align-items: center;
    padding: 0;
  }
  
  /* Class to show the menu */
  .nav-links.open {
    max-height: 500px; /* A large enough value to reveal all links */
    padding: 1rem 0; /* Add vertical padding when open */
    gap: 1.5rem;
  }

  /* Adjustments for Index Page specific sections on mobile */
  .hero-bg {
      /* REMOVED: margin-top: 4rem; */ /* This was causing the white space on mobile */
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-tagline {
    font-size: 1.125rem;
  }
  .section-title {
    font-size: 2.2rem;
  }
  .text-large {
    font-size: 1rem;
  }
  .section-padding {
    padding: 3rem 0;
  }
  .about-content {
    grid-template-columns: 1fr; /* Stack on mobile */
  }
  .services-grid, .advantages-grid, .projects-grid {
    grid-template-columns: 1fr; /* Stack cards on mobile */
    gap: 2.5rem;
  }
  .main-footer .container {
    flex-direction: column; /* Stack footer on mobile */
  }
}

@media (min-width: 768px) { /* Medium screens and up */
  .hero-title {
    font-size: 4.5rem; /* Larger on medium screens */
  }
  .hero-tagline {
    font-size: 1.875rem;
  }
  .about-content {
    grid-template-columns: 1fr 1fr; /* Two columns for about content */
    text-align: left;
  }
  .services-grid, .advantages-grid, .projects-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns for cards */
  }
  .main-footer .container {
    flex-direction: row; /* Row layout for footer on larger screens */
    justify-content: space-between;
  }
}

@media (min-width: 1024px) { /* Large screens and up */
  .services-grid, .advantages-grid, .projects-grid {
    grid-template-columns: repeat(3, 1fr); /* Three columns for cards */
  }
}
