/*
====================================================================
ETRUSCAFORM THEME - VERSION 2.2 UPDATES
====================================================================
Changelog:
- Countdown position fix in single article
- Download button pattern (animated)
- Dark mode social icons fix
- Team section complete redesign
- Breadcrumbs styling
====================================================================
*/

/* ============================================
   1. COUNTDOWN POSITION FIX - Single Article
   ============================================ */

/* Move countdown below title with proper spacing */
.entry-header .ef-single-countdown,
.ef-single-countdown {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Ensure countdown doesn't overlap hero content */
.ef-single-hero .ef-single-countdown {
  position: relative;
  top: auto;
  margin-top: 1.25rem;
}

/* Countdown within article header area */
.single-post .entry-header .ef-countdown,
.single .entry-header .ef-countdown {
  display: inline-flex;
  margin-top: 1rem;
}

/* Hero countdown positioning */
.ef-hero-content .ef-countdown {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ============================================
   2. DOWNLOAD BUTTON PATTERN - Simple Animated
   ============================================ */

/* Base container */
.ef-download-block {
  display: inline-flex;
  margin: 1rem 0;
}

/* Main label - acts as button */
.ef-download-label {
  background-color: transparent;
  border: 2px solid var(--color-secondary, #d07c39);
  display: flex;
  align-items: center;
  border-radius: 50px;
  width: auto;
  min-width: 200px;
  cursor: pointer;
  transition: all 0.4s ease;
  padding: 5px;
  position: relative;
  text-decoration: none !important;
}

.ef-download-label:hover {
  border-color: var(--color-primary, #39110e);
  box-shadow: 0 4px 15px rgba(57, 17, 14, 0.15);
  transform: translateY(-2px);
}

/* Circle with icon */
.ef-download-circle {
  height: 45px;
  width: 45px;
  min-width: 45px;
  border-radius: 50%;
  background-color: var(--color-secondary, #d07c39);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.ef-download-label:hover .ef-download-circle {
  background-color: var(--color-primary, #39110e);
}

/* Download icon */
.ef-download-icon {
  color: #fff;
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.ef-download-label:hover .ef-download-icon {
  animation: ef-bounce-down 0.6s ease infinite;
}

@keyframes ef-bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Filename text */
.ef-download-filename {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary, #39110e);
  transition: all 0.3s ease;
  padding: 0 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
  text-decoration: none !important;
}

/* File type badge */
.ef-download-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--color-cream, #f5f0eb);
  color: var(--color-soft-brown, #8b7355);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.75rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Dark Mode */
[data-theme="dark"] .ef-download-label {
  border-color: var(--color-secondary, #f0a050);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .ef-download-filename {
  color: #f5f5f5;
}

[data-theme="dark"] .ef-download-type {
  background: rgba(255, 255, 255, 0.1);
  color: #a0a0a0;
}

/* Variant: Compact */
.ef-download-block--compact .ef-download-circle {
  height: 36px;
  width: 36px;
  min-width: 36px;
}

.ef-download-block--compact .ef-download-icon {
  width: 18px;
  height: 18px;
}

.ef-download-block--compact .ef-download-filename {
  font-size: 0.8rem;
}

/* Variant: Full width */
.ef-download-block--full {
  width: 100%;
}

.ef-download-block--full .ef-download-label {
  width: 100%;
  justify-content: space-between;
}

.ef-download-block--full .ef-download-filename {
  max-width: none;
  flex: 1;
}

/* Dark Mode */
[data-theme="dark"] .ef-download-label {
  border-color: var(--color-secondary, #f0a050);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .ef-download-filename {
  color: #f5f5f5;
}

[data-theme="dark"] .ef-download-type {
  background: rgba(255, 255, 255, 0.1);
  color: #a0a0a0;
}

[data-theme="dark"] .ef-download-label:hover {
  border-color: var(--color-secondary, #f0a050);
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   3. DARK MODE - Social Icons Footer Fix
   ============================================ */

/* Make dark mode social icons identical to light mode */
[data-theme="dark"] .ef-footer__social,
[data-theme="dark"] .social-footer-buttons {
  display: flex;
  gap: 18px;
  justify-content: flex-start;
  align-items: center;
}

[data-theme="dark"] .ef-footer__social .ef-social__link,
[data-theme="dark"] .social-footer-buttons .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f5f5f5 !important;
  background: transparent !important;
  padding: 0;
  border-radius: 0;
  width: auto;
  height: auto;
  transition: all 0.3s ease;
}

[data-theme="dark"] .ef-footer__social .ef-social__link svg,
[data-theme="dark"] .social-footer-buttons .social-icon svg {
  fill: #f5f5f5 !important;
  width: 32px;
  height: 32px;
  transition: all 0.3s ease;
}

/* Hover effects - same as light mode */
[data-theme="dark"] .ef-footer__social .ef-social__link:hover,
[data-theme="dark"] .social-footer-buttons .social-icon:hover {
  transform: scale(1.2);
  background: transparent !important;
}

/* LinkedIn */
[data-theme="dark"] .ef-footer__social .ef-social__link.linkedin:hover svg,
[data-theme="dark"] .social-footer-buttons .social-icon.linkedin:hover svg {
  fill: #0077b5 !important;
}

/* Facebook */
[data-theme="dark"] .ef-footer__social .ef-social__link.facebook:hover svg,
[data-theme="dark"] .social-footer-buttons .social-icon.facebook:hover svg {
  fill: #1877f2 !important;
}

/* Instagram */
[data-theme="dark"] .ef-footer__social .ef-social__link.instagram:hover svg,
[data-theme="dark"] .social-footer-buttons .social-icon.instagram:hover svg {
  fill: #e1306c !important;
}

/* ============================================
   4. BREADCRUMBS
   ============================================ */

.ef-breadcrumbs {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--color-soft-brown, #8b7355);
}

.ef-breadcrumbs__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md, 1.5rem);
}

.ef-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ef-breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ef-breadcrumbs__link {
  color: var(--color-soft-brown, #8b7355);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ef-breadcrumbs__link:hover {
  color: var(--color-secondary, #d07c39);
}

.ef-breadcrumbs__separator {
  color: var(--color-soft-brown, #8b7355);
  opacity: 0.5;
}

.ef-breadcrumbs__current {
  color: var(--color-primary, #39110e);
  font-weight: 500;
}

/* Dark mode breadcrumbs */
[data-theme="dark"] .ef-breadcrumbs {
  color: #a0a0a0;
}

[data-theme="dark"] .ef-breadcrumbs__link {
  color: #a0a0a0;
}

[data-theme="dark"] .ef-breadcrumbs__link:hover {
  color: var(--color-secondary, #f0a050);
}

[data-theme="dark"] .ef-breadcrumbs__current {
  color: #f5f5f5;
}

/* ============================================
   5. TEAM SECTION - Pill to Square Hover Effect
   ============================================ */

.ef-team-section {
  padding: var(--space-2xl, 4rem) var(--space-md, 1.5rem);
  background: var(--color-warm-white, #faf8f5);
}

.ef-team-header {
  text-align: center;
  margin-bottom: var(--space-xl, 3rem);
}

.ef-team-header .ef-section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-secondary, #d07c39);
  margin-bottom: 0.75rem;
}

.ef-team-header h2 {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--color-primary, #39110e);
  margin-bottom: 0.5rem;
}

.ef-team-header p {
  color: var(--color-soft-brown, #8b7355);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Team Grid - Flexbox centered */
.ef-team-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  min-height: 300px;
  padding: 2rem 0;
}

/* Team Card - SMALL Pill Shape */
.ef-team-card {
  position: relative;
  width: 80px;
  height: 200px;
  border-radius: 50px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  /* Slow smooth animation */
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover: Expand to SQUARE */
.ef-team-card:hover {
  width: 250px;
  height: 250px;
  border-radius: 16px;
  z-index: 10;
}

/* Card Image - Full Cover */
.ef-team-card__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ef-team-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ef-team-card:hover .ef-team-card__image img {
  transform: scale(1.05);
}

/* Placeholder */
.ef-team-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary, #39110e) 0%, #5a2820 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ef-team-card__placeholder svg {
  width: 30px;
  height: 30px;
  color: var(--color-secondary, #d07c39);
  opacity: 0.4;
}

/* Dark Overlay - ALWAYS visible on hover for readability */
.ef-team-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 20, 30, 0.75);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.ef-team-card:hover .ef-team-card__overlay {
  opacity: 1;
}

/* Content - Bottom positioned, visible on hover */
.ef-team-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  text-align: center;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: 0.2s;
}

.ef-team-card:hover .ef-team-card__content {
  transform: translateY(0);
  opacity: 1;
}

/* Name - First */
.ef-team-card__name {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.3rem;
  white-space: nowrap;
}

/* Role - Second */
.ef-team-card__role {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  display: block;
}

/* Social Links - Third (bottom) */
.ef-team-card__social {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.4s ease;
  transition-delay: 0.3s;
}

.ef-team-card:hover .ef-team-card__social {
  opacity: 1;
  transform: translateY(0);
}

.ef-team-card__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.ef-team-card__social-link svg {
  width: 16px;
  height: 16px;
}

.ef-team-card__social-link:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.35);
}

/* Social Brand Colors */
.ef-team-card__social-link--linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
}

.ef-team-card__social-link--facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.ef-team-card__social-link--instagram:hover {
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  border-color: transparent;
}

.ef-team-card__social-link--email:hover {
  background: var(--color-secondary, #d07c39);
  border-color: var(--color-secondary, #d07c39);
}

/* Hide badge - not used */
.ef-team-card__badge {
  display: none;
}

/* Dark Mode */
[data-theme="dark"] .ef-team-section {
  background: #0a0a0a;
}

[data-theme="dark"] .ef-team-header h2 {
  color: #f5f5f5;
}

/* Responsive */
@media (max-width: 768px) {
  .ef-team-grid {
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: auto;
  }
  
  .ef-team-card {
    width: 60px;
    height: 150px;
    border-radius: 40px;
  }
  
  .ef-team-card:hover {
    width: 180px;
    height: 180px;
    border-radius: 12px;
  }
  
  .ef-team-card__content {
    padding: 1rem;
  }
  
  .ef-team-card__name {
    font-size: 1.1rem;
  }
  
  .ef-team-card__role {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .ef-team-card__social-link {
    width: 28px;
    height: 28px;
  }
  
  .ef-team-card__social-link svg {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 480px) {
  .ef-team-card {
    width: 50px;
    height: 120px;
    border-radius: 30px;
  }
  
  .ef-team-card:hover {
    width: 150px;
    height: 150px;
  }
}

/* ============================================
   6. ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Better focus states */
.ef-download-label:focus-visible,
.ef-team-card__social-link:focus-visible {
  outline: 3px solid var(--color-secondary, #d07c39);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ef-download-label,
  .ef-download-circle,
  .ef-download-icon,
  .ef-team-card,
  .ef-team-card__image img,
  .ef-team-card__social-link {
    transition: none;
  }
  
  .ef-download-label:hover .ef-download-icon {
    animation: none;
  }
}
