/* ==========================================================================
   1. BIẾN GLOBAL & RESET
   ========================================================================== */
:root {
  --primary-color: #ff7e33; /* Cam iPhone 17 */
  --secondary-color: #ffffff;
  --dark-color: #1d1d1f;
  --gray-light: #f5f5f7;
  --text-color: #333;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

body {
  line-height: 1.6;
  color: var(--text-color);
  scroll-behavior: smooth;
  background-color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   2. HEADER ĐỒNG BỘ (Dùng cho cả Index & Blog)
   ========================================================================== */
header {
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.brand-name {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.text-main {
  color: #222;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.text-com {
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.desktop-nav a {
  text-decoration: none;
  color: var(--dark-color);
  margin-left: 15px;
  font-weight: 500;
  transition: 0.3s;
}

.desktop-nav a:hover {
  color: var(--primary-color);
}

.btn-call.header-phone {
  background: var(--primary-color);
  color: #fff;
  padding: 8px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  animation: pulse 2s infinite;
}

/* ==========================================================================
   3. CẤU TRÚC BLOG KỸ THUẬT (Đã bỏ nền trắng)
   ========================================================================== */
.blog-cta-left {
  display: flex;
  justify-content: flex-start;
  margin: 15px 0;
  background: transparent;
}

.btn-blog-small {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background-color: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  transition: 0.2s ease-in-out;
}

.btn-blog-small:hover {
  background-color: #d35400;
  transform: translateX(2px);
}

.blog-wrapper {
  display: flex;
  gap: 40px;
  margin: 20px 0 50px;
}

.main-content {
  flex: 3;
}
.sidebar {
  flex: 1;
}

.breadcrumb {
  padding: 10px 0;
  font-size: 0.9rem;
  color: #888;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.blog-item {
  display: flex;
  gap: 20px;
  background: #fff;
  margin-bottom: 25px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #eee;
  transition: 0.3s;
}

.blog-item:hover {
  transform: translateY(-5px);
}

.post-img {
  flex: 1;
  min-width: 220px;
}
.post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body {
  flex: 2;
  padding: 20px;
}

.post-cat {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.post-body h2 {
  margin: 10px 0;
  font-size: 1.3rem;
}
.post-body h2 a {
  color: var(--dark-color);
  text-decoration: none;
}
.post-body p {
  color: #666;
  font-size: 0.95rem;
}

/* Sidebar Widgets */
.widget {
  background: var(--gray-light);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-top: 3px solid var(--primary-color);
}

.widget h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
}
.widget ul {
  list-style: none;
}
.widget ul li {
  padding: 8px 0;
  border-bottom: 1px dashed #ddd;
}
.widget ul li a {
  text-decoration: none;
  color: #555;
  transition: 0.2s;
}
.widget ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

/* ==========================================================================
   4. DỊCH VỤ & HERO (Dành cho Trang chủ)
   ========================================================================== */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1581094288338-2314dddb7ee1?auto=format&fit=crop&q=80&w=1470")
      no-repeat center/cover;
  height: 70vh;
  display: flex;
  align-items: center;
  color: white;
  text-align: center;
}

.grid-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.service-card {
  background: var(--gray-light);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  transition: 0.3s;
  border-bottom: 4px solid transparent;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
}
.service-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.detail-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  text-align: left;
}

.detail-item i {
  font-size: 1rem;
  color: #f1c40f;
  margin-right: 10px;
  width: 15px;
  margin-bottom: 0;
}

/* ==========================================================================
   5. FOOTER & FIXED CONTACT
   ========================================================================== */
footer {
  background: var(--dark-color);
  color: #ccc;
  padding: 50px 0;
  text-align: center;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  text-align: left;
}

.fixed-contact {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 9999;
}

/* ==========================================================================
   6. ANIMATIONS & RESPONSIVE
   ========================================================================== */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 126, 51, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 126, 51, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 126, 51, 0);
  }
}

@media (max-width: 768px) {
  .header-right .desktop-nav {
    display: none;
  }
  .blog-wrapper {
    flex-direction: column;
  }
  .blog-item {
    flex-direction: column;
  }
  .post-img {
    min-width: 100%;
    height: 180px;
  }
  .logo-container {
    flex-direction: row;
    justify-content: space-between;
  }
}
