/*
Theme Name: SongScrum Theme
Author: Baron
Version: 1.0
*/
/* === Global Variables === */
:root {
  --color-white: #fff;
  --color-black: #000;
  --font-nunitosans: 'Nunito Sans', sans-serif;
  --color-primary: #2563EB; /*blue-600*/
  --color-secondary: #0D9488; /*teal-600*/
  --color-highlight: #d97706; /*amber-600*/
  --color-light: #fff; /*f9fafb-gray-50*/
}

/* === Global Settings === */
body {
  font-family: var(--font-nunitosans);
  background-color: var(--color-light);
  color: var(--color-black);
  overflow-x: hidden;
}

body.blog,
body.single-post,
body.archive,
body.category {
  background-color: white;
}

a {
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

footer {
  text-align: center;
}

/* === Header Styles === */
#header {
  position: relative;
  width: 100%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
}

/* Nhóm 1: LOGO */
.logo-container img {
  max-height: 60px;
  width: auto;
}

/* Nhóm 2: MENU + NGÔN NGỮ (Căn phải) */

/* Dropdown ngôn ngữ */
.lang-switcher {
  position: relative;
}

.lang-switcher .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  border: 1px solid var(--color-secondary);
  /* background-color: var(--color-white); */
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.lang-switcher .dropdown-toggle:hover {
  border-color: var(--color-primary);
}

.lang-switcher .dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  min-width: 140px;
  border-radius: 8px;
  background-color: var(--color-white);
  display: none;
  z-index: 1000;
}

.lang-switcher .dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--color-white);
  transition: background 0.2s ease-in-out;
}

.lang-switcher .dropdown-menu a:hover {
  background-color: var(--color-light);
}

/* Hiển thị dropdown khi click */
.lang-switcher.open .dropdown-menu {
  display: block;
}

/* Nhóm 3: NÚT CONTACT */
.navbar-right {
  display: flex;
}

.btn-custom {
  padding: 8px 16px;
  font-size: 14px;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 30px;
  transition: all 0.3s ease-in-out;
}

.btn-custom:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.menu-item a {
  color: #d1d5db;/* gray-300 */
  white-space: nowrap;
}

.menu-item a:hover {
  color: var(--color-primary);
}

/*--------------------contact form 7----------------------------*/
/* Khoảng cách khối trong form */
.cf7-wrapper .wpcf7-form { margin: 0; }
.cf7-wrapper .wpcf7-form > * + * { margin-top: 1rem; }

/* 2 cột cho từng hàng field */
.cf7-wrapper .cf7-row {
  display: grid;
  grid-template-columns: 1fr; /* mobile: 1 cột */
  gap: 1rem;
}
/* >= 640px: 2 cột */
@media (min-width: 640px) {
  .cf7-wrapper .cf7-row { grid-template-columns: 1fr 1fr; }
}

/* Đảm bảo item full width */
.cf7-wrapper .cf7-row > * { width: 100%; }
.cf7-wrapper .wpcf7-form-control-wrap { display: block; width: 100%; }

/* ===== Base: Input / Textarea (desktop & chung) ===== */
.cf7-wrapper .wpcf7-form-control,
.cf7-wrapper input[type="text"],
.cf7-wrapper input[type="email"],
.cf7-wrapper input[type="tel"],
.cf7-wrapper select,
.cf7-wrapper textarea {
  width: 100%;
  background: #fff;
  color: #172554; /* blue-950 */
  border: 1px solid rgba(217, 119, 6, .3); /* amber-600 */
  border-radius: 0.4rem; /* bo vừa phải */
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
  box-shadow: 0 1px 0 rgba(17,24,39,.03), 0 1px 2px rgba(0,0,0,.04);
  transition: border-color .15s, box-shadow .15s;
}

.cf7-wrapper ::placeholder { color: #9CA3AF; } /* gray-400 */

.cf7-wrapper .wpcf7-form-control:focus,
.cf7-wrapper input[type="text"]:focus,
.cf7-wrapper input[type="email"]:focus,
.cf7-wrapper input[type="tel"]:focus,
.cf7-wrapper select:focus,
.cf7-wrapper textarea:focus {
  border-color: rgba(217, 119, 6, .4);           /* amber-600 */
  box-shadow: 0 0 0 1px rgba(253, 230, 138, .9); /* ring-1 amber-200 */
}

/* Textarea thấp */
.cf7-wrapper textarea,
.cf7-wrapper .cf7-textarea { min-height: 50px; }

/* Nút gửi */
.cf7-wrapper .wpcf7-submit,
.cf7-wrapper input[type="submit"],
.cf7-wrapper button[type="submit"] {
  display: inline-block;   /* tránh full width */
  width: auto;             /* chỉ rộng theo nội dung */
  background-image: linear-gradient(90deg, #f59e0b, #b45309);
  color: #fff;
  padding: 0.7rem 2rem;  /* padding nhỏ hơn nữa */
  border-radius: 0.5rem;   /* bo vừa phải */
  font-weight: 600;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(17,24,39,.06), 0 6px 16px rgba(0,0,0,.08);
  transition: filter .15s, transform .02s;
}
.cf7-wrapper .wpcf7-submit:hover { filter: brightness(1.05); }
.cf7-wrapper .wpcf7-submit:active { transform: translateY(1px); }

/* Tip lỗi */
.cf7-wrapper .wpcf7-not-valid-tip { color: #dc2626; font-size: .875rem; margin-top: .25rem; }

/* Ẩn message mặc định + spinner */
.cf7-wrapper .wpcf7-response-output { display: none !important; }
.cf7-wrapper .wpcf7-spinner { display: none !important; }

/* ===== Mobile OVERRIDES ===== */
@media (max-width: 640px) {
  .cf7-wrapper .wpcf7-form-control,
  .cf7-wrapper input[type="text"],
  .cf7-wrapper input[type="email"],
  .cf7-wrapper input[type="tel"],
  .cf7-wrapper select,
  .cf7-wrapper textarea {
    font-size: 0.875rem;      /* ~14px */
    padding: 0.6rem 0.8rem;   /* gọn hơn */
  }

  .cf7-wrapper .wpcf7-submit {
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
  }
}

/* =============================== */
.justify-text {
  text-align: justify;
}
@media screen and (max-width: 768px) {
  .responsive-bg {
    background-size: contain !important;
    background-position: top center !important;
  }
}

@media screen and (min-width: 769px) {
  .responsive-bg {
    background-size: cover !important;
    background-position: center center !important;
  }
}

/* Tailwind không có, cần thêm vào global styles hoặc inline */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ========= TOC ========= */
/* Làm icon 3 gạch có cùng màu với title */
#toc svg rect { fill: #2563eb; } /* blue-600 */
/* Ẩn bullet mặc định (phòng khi theme ép) */
#toc ul { list-style: none; margin: 0; padding: 0; }

/* Bù trừ khi cuộn đến anchor từ TOC */
h2[id^="toc-"], h3[id^="toc-"], h4[id^="toc-"] {
  scroll-margin-top: var(--toc-offset, 120px); /* mặc định 120px */
}

/* Nếu có admin bar WordPress trên desktop (32px) */
body.admin-bar h2[id^="toc-"],
body.admin-bar h3[id^="toc-"],
body.admin-bar h4[id^="toc-"] {
  scroll-margin-top: calc(var(--toc-offset, 120px) + 32px);
}

/* Admin bar trên mobile (46px) – tuỳ theme có thể không cần */
@media (max-width: 782px) {
  body.admin-bar h2[id^="toc-"],
  body.admin-bar h3[id^="toc-"],
  body.admin-bar h4[id^="toc-"] {
    scroll-margin-top: calc(var(--toc-offset, 120px) + 46px);
  }
}

/*phone shake*/
/* Pulse chính */
@keyframes callPulseStrong {
  0%, 100% {
    transform: scale(1);
    color: #d97706; /* Amber-600 */
  }
  50% {
    transform: scale(1.28);
    color: #f59e0b; /* Amber-500 sáng hơn */
  }
}

/* Sóng ripple xung quanh */
@keyframes ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.phone-call-strong {
  animation: callPulseStrong 1.4s infinite ease-in-out,
             ripple 1.4s infinite ease-out;
  border-radius: 50%;
  padding: 6px;
}

/* Hover hiệu ứng rõ hơn */
.phone-call-strong:hover {
  transform: scale(1.35);
  color: #ffb300;
  text-shadow: 0 0 10px rgba(255, 179, 0, 0.7);
  cursor: pointer;
}

/*========Nút social media=========*/
/* Container cố định giữa mép phải */
.songscrum-social-fixed {
  position: fixed;
  right: 5px;          /* khoảng cách mép phải */
  top: 50%;             /* giữa màn hình theo chiều dọc */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

/* Nút tròn */
.songscrum-social-fixed .social-item {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e293b;          /* slate-800 */
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease;
  text-decoration: none;
}

/* Hover hiệu ứng */
.songscrum-social-fixed .social-item:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

/* Màu theo brand của từng mạng */
.songscrum-social-fixed .social-fb:hover { background: #1877F2; }  /* Facebook */
.songscrum-social-fixed .social-li:hover { background: #0A66C2; }  /* LinkedIn */

/* Ẩn trên mobile nếu muốn (bật dòng dưới) */
/*
@media (max-width: 767px) {
  .songscrum-social-fixed { display: none; }
}
*/

