/*
Theme Name: g2g
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: g2g
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

g2g is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Generic
	- Normalize
	- Box sizing
# Base
	- Typography
	- Elements
	- Links
	- Forms
## Layouts
# Components
	- Navigation
	- Posts and pages
	- Comments
	- Widgets
	- Media
	- Captions
	- Galleries
# plugins
	- Jetpack infinite scroll
# Utilities
	- Accessibility
	- Alignments

--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */
:root {
  --max-width: 1450px;
  --container-padding: 0 1rem;
  --color: #000;
  --primary: #dd0000;
  --secondary: #eaa40a;
  --font-family: "Google Sans Flex", sans-serif;
  --white: #ffffff;
  --radius-pill: 9999px;
  --border: #e6e6e6;
  --text-muted: #888888;
  --radius-lg: 1.1rem;
  --border-radius: 0.8rem;
  --font-size-sm: 0.8rem;
}

@keyframes profession-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

a {
  text-decoration: none;
  color: inherit;
}
.nav-button {
  display: flex;
  gap: 1.5625rem;
  align-items: center;
}
/* ---------- ACCORDION ANIMATION ---------- */

:root {
  interpolate-size: allow-keywords;
}

details::details-content {
  block-size: 0;
  overflow: clip;
  opacity: 0;
  transition:
    block-size 0.3s ease-in-out,
    opacity 0.3s ease-in-out,
    content-visibility 0.3s ease-in-out allow-discrete;
}

details[open]::details-content {
  block-size: auto;
  opacity: 1;
}

html,
body {
  font-size: 16px;
  font-family: var(--font-family);
  padding: 0;
  margin: 0;
  background: linear-gradient(to top, #f7f7f7 0%, rgba(255, 255, 255, 0) 80%);
}

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

section {
  padding:3rem 0;
}

.calendar-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 14px;
  border: none;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
}

.btn-primary {
  background: var(--primary);
  color: #fff;

  &:hover {
    background: color-mix(in srgb, var(--primary) 90%, black);
  }
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;

  &:hover {
    background: color-mix(in srgb, var(--secondary) 90%, black);
  }
}

.btn-white {
  background: var(--white);
  color: var(--color);

  &:hover {
    background: color-mix(in srgb, var(--white) 90%, black);
  }
}

.btn-uppercase {
  text-transform: uppercase;
}

.btn-block {
  width: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--color);
  border: 1px solid var(--color);

  &:hover {
    background: var(--color);
    color: var(--white);
  }
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--container-padding);
  width: 100%;
}

/* relative (không sticky): vẫn cần positioned để .nav-menu mobile
   lấy header làm mốc cho top: 100% */
header {
  position: relative;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;

  img {
    height: 2.2rem;
    width: auto;
  }
}

.nav-menu ul {
  display: flex;
  position: static;
  flex-direction: row;
  align-items: center;
  gap: 1.5625rem;
  
  li {
    list-style: none;
   
    a {
      padding: 0.4375rem 0;
      font-size: 0.875rem;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.02em;
      border-bottom: 2px solid transparent;
      transition: all 0.2s ease-in-out;

      &:hover {
        color: var(--primary);
      }
    }
  }

  li.current-menu-item a {
    border-bottom-color: var(--primary);
  }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.875rem;
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.5625rem;
  gap: 0.3125rem;
}

.chevron-right-icon {
  width: 0.75rem;
  height: 0.75rem;
}

.cta-full {
  display: inline;
}

.cta-short {
  display: none;
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0px solid var(--border);
  border-radius: var(--radius-pill);
  background: #dcdcdc;
  flex-shrink: 0;
  color: var(--color);

  svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* ---------- FORM CONTROLS ---------- */
.contact-form form {
      display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.contact-form  .wpcf7-submit{
  background: var(--secondary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 14px;
    border: none;
    white-space: nowrap;
    transition: all 0.2s ease-in-out;
    width: 100%;
    text-transform: uppercase;
    
    &:hover{
              background: 
color-mix(in srgb, var(--secondary) 90%, black);
    }
}
.contact-form .frm-control .wpcf7-form-control  {
    width: 100%;
    background: var(--white);
    border: none;
    border-radius: 0.75rem;
    padding: 0.625rem 1.5rem;
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.4375rem;
    color: var(--color);

    &::placeholder {
    color: var(--text-muted);
    font-weight: 200;
  }

  &:focus {
    outline: 1px solid var(--secondary);
  }
}
.contact-form .frm-control textarea {
  height: 6.8125rem;
  resize: vertical;
}

.form-control {
  width: 100%;
  background: var(--white);
  border: none;
  border-radius: 0.75rem;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.4375rem;
  color: var(--color);

  &::placeholder {
    color: var(--text-muted);
    font-weight: 200;
  }

  &:focus {
    outline: 1px solid var(--secondary);
  }
}

.form-textarea {
  height: 6.8125rem;
  resize: vertical;
}

/* ---------- FOOTER ---------- */

.site-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.072) 0%, rgba(234, 164, 10, 0.09) 62.2%),
  linear-gradient(66.43deg, rgba(234, 164, 10, 0.18) 0%, rgba(255, 255, 255, 0.072) 28.87%),
  linear-gradient(293.58deg, rgba(234, 164, 10, 0.18) 0%, rgba(255, 255, 255, 0.072) 28.71%);
  padding:25px 0 45px 0;
  .wrap {
    background: var(--white);
    padding: 48px;
    border-radius: 24px;
    margin-top: 45px;
  }
}
.newsletter {
  display: flex;
  justify-content: center;
}
.newsletter aside {
  display: flex;
  align-items: center;
  flex-direction: column;
  max-width: 400px;
  text-align: center;
  gap: 30px;
  .widget-title {
    font-size: 48px;
    line-height: 59px;
    font-weight: 300;
  }
  .textwidget{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
}

.newsletter-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 4rem 3rem;
}

.newsletter-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.newsletter-title {
  font-size: 1.5rem;
  line-height: 2.5625rem;
}

.newsletter-form {
  display: flex;
  align-items: center;
  background: #f7f7f7;
  border-radius: 0.75rem;
  padding-right: 1.5rem;

  .form-control {
    background: transparent;
  }
}

.newsletter-submit {
  background: #EAA40A;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--white);
  transition: all 0.2s ease-in-out;

  &:hover {
    color: var(--primary);
  }
}

.newsletter-orbit {
  position: relative;
  width: 38.8125rem;
  height: 38.8125rem;
  flex-shrink: 0;
}

/* các vòng quỹ đạo — đứng yên, canh giữa. --s: đường kính */
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--s);
  height: var(--s);
  border: 1.5px dashed #ebebed;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.newsletter-orbit-logo {
  position: absolute;
  top: 47.77%;
  left: 44.2%;
  width: 11.68%;
  height: 4.2%;
}

/* --d: đường kính vòng | --a: góc xuất phát | --dur: chu kỳ một vòng */
.orbit-track {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--d);
  height: var(--d);
  transform: translate(-50%, -50%) rotate(var(--a));
}

.orbit-arm {
  position: absolute;
  inset: 0;
  animation: orbit-spin var(--dur) linear infinite;
}

.orbit-planet {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--s);
  height: var(--s);
  transform: translate(-50%, -50%);

  img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: orbit-counter var(--dur) linear infinite;
  }
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

/* quay ngược đúng bằng góc cha (--a + vòng quay) để ảnh không bị nghiêng */
@keyframes orbit-counter {
  from {
    transform: rotate(calc(-1 * var(--a)));
  }
  to {
    transform: rotate(calc(-1 * var(--a) - 360deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-arm,
  .orbit-planet img {
    animation: none;
  }
}
footer {
  font-size: 14px;
  line-height: 24px;
  color: var(--text-muted);
  font-weight: 300;

  .widget-title{
    font-weight: 600;
    color: var(--color);
  }

  ul {
    list-style: none;
  }
  a:hover {
    color: var(--primary);
  }
}
.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  max-width:520px;

  .widget_media_image img {
    height: 2.125rem!important;
    display: flex;
    width: fit-content;
  }

  .email-phone {
    display: flex;
    flex-direction: column;
    gap: 15px;
    
    li{
      display: flex;
      gap: 10px;
    }
  }
}

.footer-address {
  max-width: 36.75rem;
  color: var(--text-muted);
  line-height: 1.5rem;
}

.footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;

  li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.5rem;
  }

  a:hover {
    color: var(--primary);
  }
}

.footer-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--secondary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;

  svg {
    width: 0.75rem;
    height: 0.75rem;
  }
}

.footer-nav {
  display: flex;
  gap: 10rem;
  flex: 1;

  .widget_nav_menu {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  .menu {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
}

.footer-col {
  h3 {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
  }

  ul {
    list-style: none;
    width: 16.6875rem;
  }

  a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    line-height: 1.5rem;
    transition: all 0.2s ease-in-out;

    &:hover {
      color: var(--primary);
    }
  }
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5rem;
}

.footer-policy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.25rem;

  a {
    white-space: nowrap;

    &:hover {
      color: var(--primary);
    }
  }
}

@media (max-width: 1223px) {
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    margin-top: -1rem;
    pointer-events: none;
    opacity: 0;
    transition: all 0.1s ease-in-out;

    a {
      padding: 14px 20px;
      font-size: 14px;
      border-bottom: 1px solid var(--border);
      border-left: 3px solid transparent;

      &.active {
        border-left-color: var(--primary);
        border-bottom-color: var(--border);
      }
    }

    &.open {
      opacity: 1;
      pointer-events: auto;
      margin-top: 0rem;
    }
  }
  .nav-right {
    gap: 1rem;
  }

  .burger {
    display: flex;
  }

  .newsletter-orbit {
    display: none;
  }

  .footer-nav {
    gap: 2rem;
  }

  .footer-col ul {
    width: 14rem;
  }
  footer{
    .footer-main{
      gap: 3rem;
    }
    .footer-brand{
      max-width: 50%;
    }
  }
}

@media (max-width: 950px) {
  .site-footer {
    padding: 3rem 0 2rem;
  }

  .newsletter {
    margin-bottom: 3rem;
    padding: 0;
  }

  .newsletter-text {
    width: 100%;
    padding: 2rem 1.5rem;
  }

  .newsletter-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .newsletter-form {
    width: 100%;
    margin-top: 1.25rem;
  }

  .footer-main {
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
  }

  .footer-nav {
    width: 100%;
  }

  .footer-col {
    flex: 1;

    ul {
      width: 100%;
    }
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 550px) {
  .footer-brand {
    gap: 1.5rem;
  }

  .footer-address {
    font-size: 0.875rem;
    line-height: 1.4rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-col {
    h3 {
      margin-bottom: 0.5rem;
    }

    a {
      padding: 0.625rem 0;
    }
  }

  .footer-bottom {
    font-size: 0.8rem;
  }

  .footer-policy {
    gap: 0.625rem 1.5rem;
  }
}

@media (max-width: 520px) {
  .nav-inner {
    height: 4.5rem;
  }

  .logo img {
    height: 1.8rem;
  }

  .cta-full {
    display: none;
  }
  .cta-short {
    display: inline;
  }
}

@media (max-width: 420px) {
  .nav-cta,
  .nav-right .btn-primary {
    display: none;
  }

  section {
    margin-bottom: 2.5rem;
  }
}
@mixin text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@mixin line-truncate($lines: 2, $line-height: 1.4) {
    display: -webkit-box;
    -webkit-line-clamp: $lines;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: $line-height;
    height: #{$lines * $line-height};
    padding-bottom: 0.2rem;
}

@mixin text-underline {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
