/* 
  Style for AZLAN SMART LTD 
  Colors: Dark charcoal (#222), Red Accent (#e63946), White cards (#fff)
*/

:root {
  --primary-color: #e63946;
  --primary-hover: #d62828;
  --dark-charcoal: #222222;
  --darker-charcoal: #1a1a1a;
  --light-gray: #f4f4f4;
  --white: #ffffff;
  --text-dark: #333333;
  --text-light: #f1faee;
  --transition: all 0.3s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-gray);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark-charcoal);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title span {
  color: var(--primary-color);
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary-color);
  color: var(--white);
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background: var(--primary-hover);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Header */
header {
  background: var(--darker-charcoal);
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--white);
  text-transform: uppercase;
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--white);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary-color);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--white);
}

/* Hero Section */
.hero {
  height: 80vh;
  min-height: 600px;
  background-image: linear-gradient(rgba(34, 34, 34, 0.8), rgba(34, 34, 34, 0.8)), url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--white);
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Sections */
section {
  padding: 5rem 0;
}

.bg-dark {
  background: var(--dark-charcoal);
  color: var(--white);
}

.bg-dark h2, .bg-dark h3 {
  color: var(--white);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.card {
  background: var(--white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.card .icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 15px;
}

/* Services Grid */
.service-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-img {
  height: 200px;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-img img {
  transform: scale(1.1);
}

.service-content {
  padding: 25px;
}

.service-content h3 {
  margin-bottom: 15px;
}

.service-content p {
  margin-bottom: 20px;
  color: #666;
}

/* About Preview */
.about-preview {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 1;
}

.about-image img {
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial {
  background: var(--darker-charcoal);
  padding: 30px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.testimonial p {
  font-style: italic;
  margin-bottom: 20px;
}

.testimonial-author {
  font-weight: bold;
  color: var(--primary-color);
}

/* CTA Section */
.cta-section {
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 4rem 0;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 20px;
}

.cta-section .btn {
  background: var(--white);
  color: var(--primary-color);
}

.cta-section .btn:hover {
  background: var(--dark-charcoal);
  color: var(--white);
}

/* Page Header */
.page-header {
  background: var(--dark-charcoal);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* Services Detailed */
.service-detail {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 4rem;
}

.service-detail:nth-child(even) {
  flex-direction: row-reverse;
}

.service-detail-img {
  flex: 1;
}

.service-detail-img img {
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-detail-content {
  flex: 1;
}

.service-detail-content h2 {
  color: var(--primary-color);
}

.service-detail-content ul {
  margin-top: 15px;
}

.service-detail-content li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.service-detail-content li::before {
  content: '✓';
  color: var(--primary-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-info h3 {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: 10px;
}

.info-item {
  margin-bottom: 25px;
}

.info-item strong {
  display: block;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

#form-message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 4px;
  display: none;
}

.success-msg {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Map */
.map-container {
  height: 400px;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 50px;
  border-radius: 8px;
  color: #6c757d;
  font-size: 1.2rem;
}

/* Footer */
footer {
  background: var(--darker-charcoal);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 3rem;
}

.footer-col h3 {
  color: var(--white);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background: var(--primary-color);
}

.footer-col p {
  color: #ccc;
  margin-bottom: 10px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ccc;
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  color: #888;
}

/* Text Pages (Privacy, Terms) */
.text-page {
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.text-page h2 {
  margin-top: 30px;
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 992px) {
  .about-preview {
    flex-direction: column;
  }
  .service-detail {
    flex-direction: column !important;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--darker-charcoal);
    flex-direction: column;
    padding: 20px 0;
    text-align: center;
  }
  .nav-links.active {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
}
