/*
Theme Name: Transpacific Aviation
Theme URI: https://transpacificaviation.com
Author: Transpacific Aviation
Author URI: https://transpacificaviation.com
Description: Custom responsive WordPress theme for Transpacific Aviation - Aircraft Line Maintenance & Repair Services.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: transpacificaviation
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* WordPress Alignment & Core Classes */
.alignleft {
  float: left;
  margin: 0 1.5em 1.5em 0;
}

.alignright {
  float: right;
  margin: 0 0 1.5em 1.5em;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  clear: both;
}

.alignwide {
  margin-left: -50px;
  margin-right: -50px;
}

.alignfull {
  margin-left: calc(-100vw / 2 + 100% / 2);
  margin-right: calc(-100vw / 2 + 100% / 2);
  max-width: 100vw;
}

.wp-caption {
  margin-bottom: 1.5em;
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.85rem;
  color: #777777;
  text-align: center;
  margin-top: 0.5em;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Custom Logo */
.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo {
  height: 75px;
  max-height: 80px;
  width: auto;
  object-fit: contain;
  transition: all 0.3s ease;
}

.site-header.is-sticky .custom-logo {
  height: 58px;
}

/* Dynamic WordPress Menu Active Classes */
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a,
.nav-menu > li.current-menu-ancestor > a,
.nav-menu > li.active > a {
  color: #ff6633 !important;
  background: transparent !important;
  position: relative;
}

.nav-menu > li.current-menu-item > a::after,
.nav-menu > li.current_page_item > a::after,
.nav-menu > li.current-menu-ancestor > a::after,
.nav-menu > li.active > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background-color: #ff6633;
}

.mobile-menu-list li.current-menu-item a,
.mobile-menu-list li.current_page_item a,
.mobile-menu-list li.current-menu-ancestor a,
.mobile-menu-list li.active a {
  background: #fff5f0 !important;
  color: #ff6633 !important;
}

/* Navigation Submenu Support */
.nav-menu li {
  position: relative;
}

.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 999;
  list-style: none;
}

.nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu li a {
  padding: 9px 18px;
  color: #2b2d42 !important;
  font-size: 0.9rem;
  display: block;
  text-shadow: none !important;
  border-radius: 0;
}

.nav-menu .sub-menu li a:hover {
  background: rgba(61, 100, 255, 0.08) !important;
  color: #3d64ff !important;
}

.mobile-menu-list .sub-menu {
  padding-left: 15px;
  list-style: none;
}

.mobile-menu-list .sub-menu li a {
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 12px;
}

/* WordPress Admin Bar Compatibility - Sticky Header Only */
body.admin-bar .site-header.is-sticky {
  top: 32px !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header.is-sticky {
    top: 46px !important;
  }
}

@media screen and (max-width: 600px) {
  body.admin-bar .site-header.is-sticky {
    top: 0 !important;
  }
}

/* In standard document flow, header sits flush with zero gap below top-bar */
.site-header.header-solid:not(.is-sticky) {
  top: 0 !important;
}

/* ==========================================================================
   Employee Login Portal (Matches Live Site)
   ========================================================================== */
.employee-login-section {
  padding: 60px 0 90px;
  background-color: #ffffff;
  min-height: calc(100vh - 280px);
}

.employee-login-card {
  max-width: 620px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e0e4ec;
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.employee-login-header-bar {
  background: #ff6633;
  padding: 13px 22px;
}

.employee-login-header-bar h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Cabin', sans-serif;
  letter-spacing: 0.2px;
}

.employee-login-divider {
  height: 2px;
  background-color: #5bc0de;
  width: 100%;
}

.employee-login-body {
  padding: 30px 24px 28px;
}

.login-feedback {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-feedback.error {
  background-color: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #f8b4b4;
}

.login-feedback.success {
  background-color: #def7ec;
  color: #03543f;
  border: 1px solid #bcf0da;
}

/* wp_login_form overrides matching live site */
.employee-login-card #loginform {
  margin: 0;
}

.employee-login-card #loginform p {
  margin: 0 0 18px 0;
}

.employee-login-card #loginform p.login-username label,
.employee-login-card #loginform p.login-password label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #222222;
  margin-bottom: 7px;
  font-family: 'Cabin', sans-serif;
}

.employee-login-card #loginform input.input {
  width: 100%;
  height: 42px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #333333;
  background-color: #ffffff;
  border: 1px solid #d6d9e0;
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.employee-login-card #loginform input.input:focus {
  border-color: #ff6633;
  box-shadow: 0 0 0 3px rgba(255, 102, 51, 0.18);
}

.employee-login-card #loginform p.login-submit {
  margin-top: 22px;
  margin-bottom: 15px;
}

.employee-login-card #loginform input#wp-submit {
  background-color: #ff6633 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 8px 24px !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-block !important;
  box-shadow: none !important;
  text-shadow: none !important;
  height: auto !important;
  line-height: normal !important;
  transition: background-color 0.2s ease, transform 0.1s ease !important;
}

.employee-login-card #loginform input#wp-submit:hover {
  background-color: #e55322 !important;
}

.employee-login-links {
  margin-top: 10px;
  font-size: 0.92rem;
  color: #ff6633;
}

.employee-login-links a {
  color: #ff6633;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.employee-login-links a:hover {
  text-decoration: underline;
}

.employee-login-links .sep {
  color: #ff6633;
  margin: 0 4px;
}

/* Logged in state box */
.employee-logged-in-box {
  text-align: center;
  padding: 10px 0 15px;
}

.employee-logged-in-box .logged-in-icon {
  font-size: 3.5rem;
  color: #ff6633;
  margin-bottom: 12px;
}

.employee-logged-in-box h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: #222222;
}

.employee-logged-in-box p {
  color: #666666;
  font-size: 0.95rem;
  margin-bottom: 22px;
}

.employee-logged-in-box .logged-in-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.employee-logged-in-box .logged-in-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.employee-logged-in-box .btn-admin-dash {
  background: #2b2d42;
  color: #ffffff;
}

.employee-logged-in-box .btn-admin-dash:hover {
  background: #1a1b29;
}

.employee-logged-in-box .btn-go-home {
  background: #f1f3f8;
  color: #333333;
  border: 1px solid #dcdcdc;
}

.employee-logged-in-box .btn-go-home:hover {
  background: #e2e6f0;
}

.employee-logged-in-box .btn-logout {
  background: #ff6633;
  color: #ffffff;
}

.employee-logged-in-box .btn-logout:hover {
  background: #e55322;
}

/* WordPress Entry Content & Gutenberg Styles */
.entry-content {
  line-height: 1.85;
  color: #4a5568;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  margin-top: 1.8rem;
  margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content blockquote {
  border-left: 4px solid #3d64ff;
  padding: 12px 20px;
  margin: 1.5rem 0;
  background: #f8f9fc;
  font-style: italic;
}

/* Posts Pagination */
.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e5e8f0;
  color: #2b2d42;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.nav-links .page-numbers.current,
.nav-links .page-numbers:hover {
  background: #3d64ff;
  color: #ffffff;
  border-color: #3d64ff;
}
