/*
Theme Name: NguyenTheVinh
Theme URI: https://NguyenTheVinh.com/
Author: Nguyễn Thế Vinh
Author URI: https://NguyenTheVinh.com/
Description: Theme design dành riêng cho Portfolio của Nguyễn Thế Vinh – người đàn ông đào hoa nhất vũ trụ.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ngthevinh
Tags: portfolio, cv, design, graphic-designer, responsive, clean, modern
*/

/* ==================================================
= Root Variables =
================================================== */
:root {
  --primary-color: #0171D5;
  --secondary-color: #2296FE;
  --color-1: #F8F9FA;
  --color-2: #DDD;
  --text-color-1: #333;
  --text-color-2: #666;
  --text-color-3: #999;

  --header-border: #0061b7;
  --menu-border: #0061b7;
  --color-white: #ffffff;

  --font-heading: 'Roboto', sans-serif;
  --font-body: 'Roboto', sans-serif;

  --border-radius-3: 3px;
  --border-radius-5: 5px;
}

/* ==================================================
= Reset & Global Styles =
================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}
html, body {
  height: 100%;
}
body {
  color: var(--text-color-1);
  font-size: 1.125rem;
  line-height: 1.6;
 display: flex;
 flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-body);
  padding-top: 112px;
}
body:not(.admin-bar) {
  padding-top: 80px;
}

/* ✅ Giữ đúng behavior trang chủ: hero full height, header overlay lên hero */
body:is(.page-template-front-page-php,.front-page) {
  padding-top: 0;
}

/* ==================================================
= Typography =
================================================== */
h1 {
  font-size: 2.5rem;
  line-height: 1.3;
  margin: 3rem 0 1.5rem;
}
h2 {
  font-size: 2rem;
  line-height: 1.35;
  margin: 2.8rem 0 1.3rem;
}
#logo h2 {
  line-height: 40px;
  margin: 0;
}
h3 {
  font-size: 1.75rem;
  line-height: 1.4;
  margin: 2.6rem 0 1.2rem;
}
h4 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 2.4rem 0 1rem;
}
h5 {
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 2.2rem 0 0.9rem;
}
h6 {
  font-size: 1rem;
  line-height: 1.6;
  margin: 2rem 0 0.8rem;
}
ul {
  list-style: disc inside;
}
.main-container li::marker {
  color: var(--accent-color);
}
.main-container li {
  padding: 5px 0 15px 0;
}
a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.2s ease-in-out;
}
p {
  margin-bottom: 1rem;
}

/* === Ảnh hiển thị chung trong theme === */
img {
  border-radius: 5px;
  transition: border-radius 0.2s ease;
}

.logo img,
.custom-logo-link img {
  border-radius: 0; /* giữ nguyên góc vuông cho logo */
}

/* Bo góc cho tất cả iframe YouTube */
iframe[src*="youtube.com"],
iframe[src*="youtu.be"],
.wp-block-embed__wrapper iframe {
  border-radius: 5px;
  overflow: hidden;
}

/* ==================================================
= Utility Classes =
================================================== */
.page-content {
  margin-bottom: 2.4rem;
}

.wp-block-image img {
  margin-top: 10px;
  margin-bottom: 20px;
}
.archive-title,
.content-title {
  text-align: center;
  margin-bottom: 2rem;
}
.text-center {
  text-align: center;
}
.mt-2 {
  margin-top: 2rem;
}
.mb-2 {
  margin-bottom: 2rem;
}

/* ==================================================
= Layout: Container & Grid =
================================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}
.row {
  display: flex;
  flex-wrap: wrap;
}
.col {
  flex: 1;
  padding: 1rem;
}
.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
}
.col-4 {
  flex: 0 0 33.333%;
  max-width: 33.333%;
}

/* ==================================================
= Layout: Full Height Wrapper =
================================================== */
.wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}
main {
  width: 100%;
  padding-bottom: 4rem;
}

/* ==================================================
= Buttons =
================================================== */
.btn {
  display: inline-block;
  padding: 0.85rem 1.2rem;
  font-size: 1.125rem;
  color: var(--color-white);
  background-color: var(--primary-color);
  border: none;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  min-width: 140px;
  border-radius: var(--border-radius-3);
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.btn:hover {
  background-color: var(--secondary-color);
}

/* ==================================================
= Footer =
================================================== */
#site-footer {
  background-color: var(--secondary-color);
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
  color: var(--color-white);
  margin-top: auto;
}

/* ================================
📌 Footer Widgets (Top)
================================ */
#site-footer .footer-widgets {
  padding: 3rem 0 2.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#site-footer .footer-widgets-grid {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

#site-footer .footer-widget-col {
  flex: 1;
  min-width: 0;
}

#site-footer .footer-cols-1 .footer-widget-col {
  flex: 0 0 100%;
  max-width: 100%;
}

#site-footer .footer-cols-2 .footer-widget-col {
  flex: 0 0 calc(50% - 1.25rem);
  max-width: calc(50% - 1.25rem);
}

#site-footer .footer-cols-3 .footer-widget-col {
  flex: 0 0 calc(33.333% - 1.666rem);
  max-width: calc(33.333% - 1.666rem);
}

#site-footer .footer-widget .widget-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

#site-footer .footer-widget,
#site-footer .footer-widget p,
#site-footer .footer-widget li {
  color: rgba(255, 255, 255, 0.9);
}

#site-footer .footer-widget a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

#site-footer .footer-widget a:hover {
  color: #ffffff;
  text-decoration: underline;
}

#site-footer .footer-widget ul,
#site-footer .footer-widget ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/* ================================
📌 Footer Bottom (Giữ footer-inner hiện tại)
================================ */
#site-footer .footer-bottom {
  padding: 0.625rem 0;
  background: var(--primary-color);
}
#site-footer a {
  color: var(--color-white);
}
.footer-inner{
  display: flex;
  align-items: center;
  min-height: 1.875rem;
}
.footer-social ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}
.footer-social li {
  display: inline-block;
}
.footer-social a {
  color: #ffffff;
  font-size: 1.2rem;
  text-decoration: none;
}
.footer-social a:hover {
  color: var(--primary-color);
}

/* ==================================================
📌 1. ARCHIVE – Style cho danh sách thiết kế
================================================== */
/* (Viết riêng tại design.css) */

/* ==================================================
📌 2. ITEM – Style riêng cho từng item thiết kế
================================================== */
/* (Viết riêng tại design.css) */

/* ================================================
📌 Hover Border Effect for Item Thumbnails
================================================== */
.image-container {
  width: 100%;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.image-container img {
  display: block;
  width: 100%;
  height: auto;
}

.image-container::before {
  content: '';
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  right: 0.625rem;
  bottom: 0.625rem;
  border: 1px solid white;
  pointer-events: none;
  opacity: 0.7;
  transition: all 0.5s ease;
}

.image-container:hover::before {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
}

/* ==================================================
📌 3. SINGLE – Layout chi tiết trang thiết kế
================================================== */
/* (Viết riêng tại design.css) */

/* ==================================================
📌 4. RELATED – Carousel các thiết kế liên quan
================================================== */
/* (Viết riêng tại design.css) */

/* ================================================
📌 Responsive Embed YouTube/Vimeo (Gutenberg block)
================================================== */
.wp-block-embed {
  margin: 2rem 0;
  max-width: 100%;
}

.wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%; /* Tỷ lệ 16:9 */
  height: 0;
  overflow: hidden;
}

.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* ================================================
📌 SIDEBAR – Giao diện thanh bên phải
================================================ */
/* ✅ Dùng chung layout cho cả sidebar và project meta */


.sidebar-area {
  width: 25%;
  position: sticky;
  top: 11rem;
  align-self: flex-start;
}

.site-sidebar {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color-1);
}

.site-sidebar .widget_search label {
  position: absolute;
  left: -9999px;
  visibility: hidden;
}

.site-sidebar .widget {
  margin-bottom: 2.5rem;
}

/* ✅ Tiêu đề sidebar */
.site-sidebar h2,
.site-sidebar .widget-title,
.site-sidebar .wp-block-heading {
  font-size: 1.5rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-2);
  padding-bottom: 0.375rem;
  margin-bottom: 1rem;
/*  color: var(--primary-color);*/
}

/* ✅ Danh sách: giữ nguyên font mặc định, bỏ dấu chấm */
.site-sidebar ul,
.site-sidebar ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.site-sidebar li {
  margin-bottom: 0.5rem;
}

/* ✅ Link */
.site-sidebar li a {
  color: var(--text-color-1);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1.125rem;
  line-height: 1.6;
}

.site-sidebar li a:hover {
  color: var(--primary-color);
}

/* ✅ FORM TÌM KIẾM - Sửa lỗi submit bị co lại */
.site-sidebar .widget_search form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.site-sidebar .widget_search input[type="search"],
.site-sidebar .widget_search input[type="text"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-2);
  border-radius: var(--border-radius-3);
  font-size: 1rem;
}

.site-sidebar .widget_search input[type="submit"] {
  padding: 0.5rem 1rem;
  height: 100%;
  font-size: 1rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--border-radius-3);
  cursor: pointer;
  white-space: nowrap;
}

.site-sidebar .widget_search input[type="submit"]:hover {
  background-color: var(--secondary-color);
}


/* ==================================================
🎨 5. SOCIALS WIDGET
================================================== */

  .footer-social a[href*="nangtho.vn"] {
    background-color: orange !important; /* ✅ FIX cú pháp */
  }

.footer-social a {
  border-radius: 50%;
  color: #fff !important;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* ==================================================
🎨 5.1 BLOCK
================================================== */
.wp-block-image :where(figcaption) {
  color: var(--text-color-3);
  font-size: 1rem;
  text-align: right;
  font-style: italic;
  margin-top: 0;
}

ul.wp-block-list li {
	padding: 5px 0 !important;
}

/* ==================================================
📱 6. RESPONSIVE – Tablet (≤ 1440px)
================================================== */
@media screen and (max-width: 1440px) {
  .footer-social ul {
    padding-right: 7rem;
  }
	
  #site-footer .footer-widget ul,
  #site-footer .footer-widget ol {
    float: left;
  }
} /* ✅ FIX: đóng media 1440 đúng chỗ */

/* ==================================================
📱 7. RESPONSIVE – Mobile (≤ 768px)
================================================== */
@media (max-width: 768px) {
  .row {
    gap: 0;
  }
	
  .col-6,
  .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* ✅ FIX: admin bar mobile cao hơn (WP thường ~46px) */
  body {
    padding-top: 80px; /* giữ đúng offset cơ bản */
  }

  body.admin-bar {
    padding-top: calc(80px + 46px);
  }

  /* ✅ Giữ đúng behavior trang chủ */
  body:is(.page-template-front-page-php,.front-page) {
    padding-top: 0;
  }

  /* ✅ Footer căn lại cho hợp lý */

  #site-footer .footer-widgets {
    padding: 2.25rem 0 1.75rem;
  }

  #site-footer .footer-widgets-grid {
    flex-direction: column;
    gap: 1.5rem;
  }

  #site-footer .footer-widget-col {
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .footer-left {
    text-align: center;
	padding-bottom: 0.625rem;
    margin-bottom: 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
/*     border-bottom: 1px dashed var(--color-2); */
  }

  .footer-right {
    text-align: left;
    margin-bottom: 0.2rem;
  }

  .footer-social ul {
    justify-content: flex-start;
    padding-right: 0;
  }

  .footer-social ul li {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
  }

  /* 🎨 Style Socials Widget */
  .footer-social a {
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
  }

  .wp-block-social-link.wp-social-link:hover {
    transform: scale(1.1) !important;
  }

  .footer-social a svg {
    width: 26px !important;
    height: 26px !important;
    flex-shrink: 0;         /* ✅ không bị co trong flex */
    display: block;         /* ✅ loại bỏ inline spacing */
    vertical-align: middle; /* ✅ tránh méo do căn giữa theo text */
  }
}
