/* TA Corporation (Tiong Aik) - Main Stylesheet */
/* Responsive Design for Desktop, Tablet, and Mobile */

:root {
  --primary-red: #C41E3A;
  --dark-gray: #333333;
  --light-gray: #F5F5F5;
  --text-color: #333333;
  --border-color: #DDDDDD;
  --white: #FFFFFF;
  --accent-green: #2E7D32;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background-color: var(--white);
  border-bottom: 3px solid var(--primary-red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-top {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 10px 0;
  font-size: 0.9rem;
}

.header-top-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.contact-info {
  display: flex;
  gap: 30px;
}

.contact-info a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--primary-red);
}

.header-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-red);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-size: 1.5rem;
  font-weight: 700;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--dark-gray);
  font-weight: 400;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}

nav ul li {
  position: relative;
}

nav ul li a {
  display: block;
  padding: 15px 18px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

nav ul li a:hover {
  background-color: var(--light-gray);
  border-bottom-color: var(--primary-red);
  color: var(--primary-red);
}

nav ul li a.active {
  border-bottom-color: var(--primary-red);
  color: var(--primary-red);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
              url('../images/hero-bg.jpg') center/cover no-repeat;
  color: var(--white);
  padding: 100px 20px;
  text-align: center;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  max-width: 700px;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-red);
  color: var(--white);
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-red);
}

.cta-button:hover {
  background-color: transparent;
  color: var(--primary-red);
}

.cta-button-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.cta-button-secondary:hover {
  background-color: var(--white);
  color: var(--primary-red);
}

/* ===== MAIN CONTENT ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

section:last-child {
  border-bottom: none;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: var(--primary-red);
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--primary-red);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

p {
  margin-bottom: 15px;
  line-height: 1.8;
  color: #555555;
}

/* ===== GRID LAYOUTS ===== */
.grid {
  display: grid;
  gap: 30px;
  margin-bottom: 40px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===== CARDS ===== */
.card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 25px;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--primary-red);
}

.card-text {
  font-size: 0.95rem;
  color: #666666;
  line-height: 1.6;
}

.card-footer {
  padding: 0 25px 25px;
}

.card-link {
  color: var(--primary-red);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.card-link:hover {
  color: var(--accent-green);
}

/* ===== ABOUT SECTION ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-text h3 {
  color: var(--primary-red);
  margin-bottom: 20px;
}

.about-image {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== SERVICES SECTION ===== */
.service-item {
  background-color: var(--light-gray);
  padding: 30px;
  border-left: 4px solid var(--primary-red);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.service-item:hover {
  background-color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.service-item h3 {
  color: var(--primary-red);
  margin-bottom: 15px;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 25px;
  border: 2px solid var(--primary-red);
  background-color: var(--white);
  color: var(--primary-red);
  cursor: pointer;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-red);
  color: var(--white);
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.portfolio-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(196, 30, 58, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--white);
  padding: 20px;
  text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.portfolio-category {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ===== STATS SECTION ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-item {
  padding: 30px;
  background-color: var(--light-gray);
  border-radius: 4px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-red);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-color);
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonial {
  background-color: var(--light-gray);
  padding: 30px;
  border-radius: 4px;
  border-left: 4px solid var(--primary-red);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 15px;
  color: #666666;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary-red);
}

.testimonial-position {
  font-size: 0.9rem;
  color: #999999;
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 50px 20px 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  margin-bottom: 20px;
  color: var(--primary-red);
  font-size: 1.1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #CCCCCC;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-red);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid #555555;
  text-align: center;
  color: #AAAAAA;
  font-size: 0.9rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-red);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--accent-green);
}

.breadcrumb span {
  color: #999999;
  margin: 0 8px;
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table th {
  background-color: var(--primary-red);
  color: var(--white);
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

table tr:hover {
  background-color: var(--light-gray);
}

/* ===== FORMS ===== */
form {
  max-width: 600px;
  margin: 30px 0;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="phone"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="phone"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

button[type="submit"] {
  background-color: var(--primary-red);
  color: var(--white);
  padding: 12px 40px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button[type="submit"]:hover {
  background-color: var(--accent-green);
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-red);
}

.mt-20 {
  margin-top: 20px;
}

.mt-40 {
  margin-top: 40px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-40 {
  margin-bottom: 40px;
}

.hidden {
  display: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .header-top-content {
    flex-direction: column;
    gap: 10px;
  }

  .contact-info {
    flex-direction: column;
    gap: 10px;
  }

  .header-main {
    flex-wrap: wrap;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--white);
    border-bottom: 3px solid var(--primary-red);
    width: 100%;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li a {
    padding: 12px 20px;
    border-bottom: none;
    border-left: 4px solid transparent;
  }

  nav ul li a:hover,
  nav ul li a.active {
    border-left-color: var(--primary-red);
    border-bottom: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero {
    padding: 60px 20px;
    min-height: 350px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .portfolio-filters {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.3rem;
  }

  .logo-main {
    font-size: 1.1rem;
  }

  .logo-sub {
    font-size: 0.65rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
  }

  h3 {
    font-size: 1.1rem;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 0.95rem;
  }

  .card-image {
    height: 200px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-image {
    height: 200px;
  }

  section {
    padding: 40px 0;
  }

  .service-item {
    padding: 20px;
  }

  .testimonial {
    padding: 20px;
  }
}

/* ===== ACCESSIBILITY ===== */
a:focus {
  outline: 2px solid var(--primary-red);
  outline-offset: 2px;
}

button:focus {
  outline: 2px solid var(--primary-red);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-red);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}
