/**
 * Custom Styles for Tably Club Theme
 * Header, Footer, Components
 */

/* ===== HEADER ===== */
.tc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--tc-transition-base);
  background: var(--tc-background);
  box-shadow: var(--tc-shadow-sm);
}

.tc-header--transparent {
  position: absolute;
  width: 100%;
  background: transparent;
  box-shadow: none;
}

.tc-header--transparent .tc-logo-text,
.tc-header--transparent .tc-nav a {
  color: var(--tc-text-primary);
}

.tc-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--tc-space-sm) 0;
  gap: var(--tc-space-md);
}

.tc-header__logo a {
  display: block;
  text-decoration: none;
}

.tc-logo-text {
  font-family: var(--tc-font-heading);
  font-size: var(--tc-text-2xl);
  font-weight: 700;
  color: var(--tc-text-primary);
}

/* Navigation */
.tc-header__nav {
  display: none;
}

.tc-nav {
  display: flex;
  align-items: center;
  gap: var(--tc-space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tc-nav a {
  font-weight: 500;
  color: var(--tc-text-primary);
  transition: var(--tc-transition-fast);
  text-decoration: none;
}

.tc-nav a:hover {
  color: var(--tc-color-3);
}

.tc-nav .current-menu-item > a {
  color: var(--tc-color-3);
}

/* Mobile Toggle */
.tc-header__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.tc-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.tc-hamburger__line {
  width: 100%;
  height: 2px;
  background: var(--tc-text-primary);
  transition: var(--tc-transition-base);
}

.tc-header__toggle[aria-expanded="true"] .tc-hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.tc-header__toggle[aria-expanded="true"] .tc-hamburger__line:nth-child(2) {
  opacity: 0;
}

.tc-header__toggle[aria-expanded="true"] .tc-hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.tc-mobile-menu {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--tc-background);
  z-index: 999;
  transform: translateX(100%);
  transition: var(--tc-transition-base);
  overflow-y: auto;
  padding-top: 80px;
}

.tc-mobile-menu[aria-hidden="false"] {
  transform: translateX(0);
}

/* Hide mobile menu and toggle if menu is empty */
.tc-mobile-menu:empty,
.tc-mobile-menu .tc-mobile-menu__inner:empty {
  display: none !important;
}

/* Hide toggle button if no menu items exist */
.tc-header__nav:empty + .tc-header__cta + .tc-header__toggle,
.tc-header__nav:empty + .tc-header__toggle {
  display: none;
}

.tc-mobile-menu__inner {
  padding: var(--tc-space-lg) var(--tc-container-padding);
}

.tc-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--tc-space-sm);
  list-style: none;
  margin: 0 0 var(--tc-space-lg) 0;
  padding: 0;
}

.tc-mobile-nav a {
  font-size: var(--tc-text-xl);
  font-weight: 600;
  color: var(--tc-text-primary);
  text-decoration: none;
  padding: var(--tc-space-xs) 0;
  display: block;
}

.tc-mobile-menu__cta {
  width: 100%;
  justify-content: center;
}

/* Desktop Navigation */
@media (min-width: 768px) {
  .tc-header__nav {
    display: block;
    flex: 1;
    margin-left: var(--tc-space-lg);
  }
  
  .tc-header__toggle {
    display: none;
  }
  
  .tc-mobile-menu {
    display: none;
  }
}

/* ===== HERO ===== */
.tc-hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: var(--tc-space-xl) 0;
  overflow: hidden;
  background: var(--tc-background-alt);
}

.tc-hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}

.tc-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--tc-space-lg);
  align-items: center;
}

.tc-hero--split .tc-hero__inner {
  grid-template-columns: 1fr;
}

.tc-hero__content {
  max-width: 600px;
}

.tc-hero__title {
  font-size: var(--tc-text-4xl);
  line-height: 1.1;
  margin-bottom: var(--tc-space-md);
  color: var(--tc-primary-navy);
}

.tc-hero__subtitle {
  font-size: var(--tc-text-xl);
  color: var(--tc-text-secondary);
  margin-bottom: var(--tc-space-lg);
}

.tc-hero__actions {
  display: flex;
  gap: var(--tc-space-sm);
  flex-wrap: wrap;
}

.tc-hero__image {
  border-radius: var(--tc-radius-lg);
  overflow: hidden;
  box-shadow: var(--tc-shadow-lg);
}

.tc-hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 768px) {
  .tc-hero--split .tc-hero__inner {
    grid-template-columns: 1fr 1fr;
  }
  
  .tc-hero {
    min-height: 700px;
  }
}

/* ===== FOOTER ===== */
.tc-footer {
  /* Background color set via Customizer inline styles */
  color: rgba(255, 255, 255, 0.9);
  padding: 4rem 0 1.5rem;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tc-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: var(--tc-transition-fast);
}

.tc-footer a:hover {
  color: white;
}

/* Footer Main - 4 Columns */
.tc-footer__main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1023px) {
  .tc-footer__main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .tc-footer__main {
    grid-template-columns: 1fr;
  }
}

.tc-footer__column {
  min-width: 0;
}

.tc-footer__title {
  color: white;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  font-family: var(--tc-font-heading);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.tc-footer__text {
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Footer Social Icons */
.tc-footer__social-icons {
  display: flex;
  gap: var(--tc-space-sm);
  margin-top: var(--tc-space-md);
}

.tc-footer__social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--tc-transition-base);
}

.tc-footer__social-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Footer Address */
.tc-footer__address {
  margin-top: var(--tc-space-md);
  padding-top: var(--tc-space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--tc-text-sm);
  line-height: 1.6;
}

.tc-footer__address strong {
  display: block;
  margin-bottom: var(--tc-space-xs);
  color: white;
}

/* Footer Hours */
.tc-footer__hours {
  font-size: var(--tc-text-sm);
  line-height: 1.8;
  margin-bottom: var(--tc-space-md);
  opacity: 0.85;
}

.tc-footer__hours strong {
  color: white;
  display: block;
  margin-top: var(--tc-space-sm);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.tc-footer__hours strong:first-child {
  margin-top: 0;
}

/* Footer Contact Info */
.tc-footer__contact-info {
  margin-top: var(--tc-space-md);
  padding-top: var(--tc-space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tc-footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.tc-footer__contact-item {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.tc-footer__contact-item svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
  opacity: 0.8;
}

.tc-footer__contact-item:last-child {
  margin-bottom: 0;
}

.tc-footer__contact-item strong {
  display: block;
  color: white;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.tc-footer__contact-item a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.tc-footer__contact-item a:hover {
  color: white;
}

/* Footer Navigation */
.tc-footer__nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tc-footer__nav li {
  margin-bottom: 0.75rem;
}

.tc-footer__nav a {
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  display: inline-block;
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  padding-left: 0;
}

.tc-footer__nav a::before {
  content: '→';
  position: absolute;
  left: -1.25rem;
  opacity: 0;
  transition: all 0.2s ease;
}

.tc-footer__nav a:hover::before {
  opacity: 1;
  left: -1rem;
}

/* Contact List */
.tc-footer__contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--tc-space-xs);
}

.tc-footer__contact-list li {
  font-size: var(--tc-text-sm);
}

/* Newsletter Form */
.tc-footer__newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.tc-footer__newsletter-form input[type="email"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.tc-footer__newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--tc-color-3);
  background: rgba(255, 255, 255, 0.08);
}

.tc-footer__newsletter-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.tc-footer__newsletter-form button {
  padding: 0.875rem 1.5rem;
  width: 100%;
  background: var(--tc-color-3);
  border: none;
  cursor: pointer;
  color: white;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.tc-footer__newsletter-form button:hover {
  background: var(--tc-color-2);
  transform: translateY(-1px);
}

.tc-btn--coral {
  background: var(--tc-color-3);
  color: var(--tc-color-2);
  font-weight: 600;
}

.tc-btn--coral:hover {
  background: var(--tc-color-2);
  color: var(--tc-color-1);
  transform: translateY(-2px);
}

/* Footer Subscribe Button Override - DO NOT hardcode hover */
.tc-footer .tc-btn:hover,
.tc-footer-subscribe-btn:hover {
  /* Hover color managed by Customizer in functions.php */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Footer Certifications */
.tc-footer__certifications {
  margin-top: var(--tc-space-md);
  padding-top: var(--tc-space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tc-footer__cert-text {
  font-size: var(--tc-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin: 0;
  font-weight: 600;
}

/* Footer Bottom */
.tc-footer__bottom {
  padding-top: 1.5rem;
}

.tc-footer__bottom-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.tc-footer__copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  width: 100%;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tc-footer__legal-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tc-footer__legal-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease;
}

.tc-footer__legal-links a:hover {
  color: white;
}

@media (max-width: 767px) {
  .tc-footer__bottom-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tc-footer__languages,
  .tc-footer__copyright,
  .tc-footer__legal-links {
    order: unset;
    width: 100%;
  }
}

.tc-footer__social {
  display: flex;
  gap: var(--tc-space-sm);
}

.tc-footer__social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--tc-transition-base);
}

.tc-footer__social a:hover {
  background: var(--tc-color-3);
  transform: translateY(-2px);
}

/* Language Switcher */
.tc-footer__languages {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.tc-footer__languages span {
  font-size: var(--tc-text-sm);
  color: rgba(255, 255, 255, 0.6);
  margin-right: var(--tc-space-xs);
}

.tc-footer__languages ul {
  display: flex;
  gap: var(--tc-space-sm);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tc-footer__languages li {
  margin: 0;
}

.tc-footer__languages a,
.tc-footer__lang {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  display: inline-block;
}

/* Hover/active colors are controlled via inline styles in footer.php */

/* Blog Link */
.tc-footer__blog-link {
  font-size: var(--tc-text-sm);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--tc-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: var(--tc-transition-base);
}

.tc-footer__blog-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--tc-color-3);
}

/* Mobile Responsive */
@media (max-width: 767px) {
  .tc-footer__main {
    grid-template-columns: 1fr;
    gap: var(--tc-space-lg);
  }
  
  .tc-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tc-footer__bottom-left,
  .tc-footer__bottom-right {
    width: 100%;
    justify-content: flex-start;
  }
  
  .tc-footer__newsletter-form {
    flex-direction: column;
  }
  
  .tc-footer__newsletter-form button {
    width: 100%;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tc-animate-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--tc-primary-navy);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100000;
}

.skip-link:focus {
  top: 0;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== 404 PAGE ===== */
@media (max-width: 767px) {
  .error404 .tc-main section {
    padding: 60px 0 !important;
  }
  
  .error404 .tc-main a {
    width: 100%;
    text-align: center;
  }
}
