/**
 * Aktim - Modular UI Components
 * Phone CTA + "Yerinizi Alın" Button
 *
 * Based on: docs/phone-cta-prompt.md
 * Design: 0212 (gri) + 876 1515 (accent) | Thin outline button
 *
 * @package    Aktim
 * @author     Mustafa Erdinc <mustafaerdinc@me.com>
 * @copyright  2024-2026 Bilgicler Yapi
 * @link       https://mustafaerdinc.com.tr
 */

/* ============================================
   CSS VARIABLES (Component specific)
   ============================================ */
:root {
  --cta-primary: #5b5d5f;
  --cta-secondary: #6c757d;
  --cta-accent: #9a7744;
  --cta-border: rgba(91, 93, 95, 0.15);
}

/* ============================================
   CTA CONTAINER
   ============================================ */
.cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-group--center {
  justify-content: center;
}

.cta-group--vertical {
  flex-direction: column;
  align-items: flex-start;
}

.cta-group--vertical.cta-group--center {
  align-items: center;
}

/* ============================================
   PHONE CTA - Text-based, no background
   ============================================ */
.cta-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  background: transparent;
  color: var(--cta-primary);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta-phone:hover {
  text-decoration: none;
}

.cta-phone:hover .cta-phone__prefix,
.cta-phone:hover .cta-phone__main {
  color: var(--color-primary);
}

/* Phone icon - accent color */
.cta-phone__icon {
  font-size: 28px;
  color: var(--cta-accent);
}

/* Phone number split: 0212 gri, 876 1515 accent */
.cta-phone__number {
  display: flex;
  align-items: baseline;
  gap: 0.2em;
  font-family: var(--font-primary);
  font-size: 28px;
  font-weight: var(--font-light);
  letter-spacing: 1px;
  color: var(--cta-accent);
}

/* 0212 kısmı - gri */
.cta-phone__prefix {
  color: var(--cta-secondary);
  font-weight: var(--font-light);
}

/* 876 1515 kısmı - accent (default, inherited) */
.cta-phone__main {
  font-weight: var(--font-light);
}

/* Phone sizes */
.cta-phone--sm .cta-phone__icon {
  font-size: 22px;
}

.cta-phone--sm .cta-phone__number {
  font-size: 22px;
}

.cta-phone--lg .cta-phone__icon {
  font-size: 32px;
}

.cta-phone--lg .cta-phone__number {
  font-size: 32px;
}

/* ============================================
   "YERİNİZİ ALIN" BUTTON - Thin outline
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: transparent;
  color: var(--cta-primary);
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: var(--font-light);
  border: 1px solid var(--cta-border);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  border-color: var(--cta-accent);
  color: var(--cta-accent);
}

.btn iconify-icon {
  font-size: 24px;
}

/* Button variants */
.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* Outline is the default style */
.btn--outline {
  background: transparent;
  color: var(--cta-primary);
  border: 1px solid var(--cta-border);
}

.btn--outline:hover {
  border-color: var(--cta-accent);
  color: var(--cta-accent);
}

/* WhatsApp */
.btn--whatsapp {
  background: #25D366;
  color: var(--color-white);
  border-color: #25D366;
  font-weight: var(--font-medium);
}

.btn--whatsapp:hover {
  background: #1da851;
  border-color: #1da851;
}

/* Button sizes */
.btn--sm {
  padding: 8px 16px;
  font-size: 16px;
  gap: 8px;
}

.btn--sm iconify-icon {
  font-size: 20px;
}

.btn--lg {
  padding: 14px 24px;
  font-size: 22px;
}

.btn--lg iconify-icon {
  font-size: 26px;
}

/* ============================================
   DARK THEME OVERRIDES (including Hero section)
   ============================================ */
.fp-section--dark .cta-phone,
.fp-section--hero .cta-phone,
[data-theme="dark"] .cta-phone {
  color: var(--color-white);
}

.fp-section--dark .cta-phone__icon,
.fp-section--hero .cta-phone__icon,
[data-theme="dark"] .cta-phone__icon {
  color: var(--color-white);
}

.fp-section--dark .cta-phone__number,
.fp-section--hero .cta-phone__number,
[data-theme="dark"] .cta-phone__number {
  color: var(--color-white);
}

.fp-section--dark .cta-phone__prefix,
.fp-section--hero .cta-phone__prefix,
[data-theme="dark"] .cta-phone__prefix {
  color: rgba(255, 255, 255, 0.6);
}

.fp-section--dark .cta-phone:hover .cta-phone__prefix,
.fp-section--hero .cta-phone:hover .cta-phone__prefix,
[data-theme="dark"] .cta-phone:hover .cta-phone__prefix,
.fp-section--dark .cta-phone:hover .cta-phone__main,
.fp-section--hero .cta-phone:hover .cta-phone__main,
[data-theme="dark"] .cta-phone:hover .cta-phone__main {
  color: var(--color-primary);
}

.fp-section--dark .btn--outline,
.fp-section--hero .btn--outline,
[data-theme="dark"] .btn--outline {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.2);
}

.fp-section--dark .btn--outline:hover,
.fp-section--hero .btn--outline:hover,
[data-theme="dark"] .btn--outline:hover {
  border-color: var(--color-white);
  color: var(--color-white);
}

/* ============================================
   SOCIAL LINKS
   ============================================ */
.social-links {
  display: flex;
  gap: var(--space-3);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
}

.social-links a:hover {
  background: var(--cta-accent);
  color: var(--color-white);
}

.social-links iconify-icon {
  font-size: 1.25rem;
}

/* Social on dark */
.fp-section--dark .social-links a,
[data-theme="dark"] .social-links a {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.fp-section--dark .social-links a:hover,
[data-theme="dark"] .social-links a:hover {
  background: var(--cta-accent);
  color: var(--color-white);
}

/* ============================================
   RESPONSIVE (Mobile-First)
   Base = mobile (< 576px)
   ============================================ */
.cta-group {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-phone {
  justify-content: center;
}

.cta-phone__number {
  font-size: 22px;
}

.cta-phone__icon {
  font-size: 22px;
}

.btn {
  justify-content: center;
  width: auto;
  font-size: 16px;
  padding: 10px 18px;
}

.btn iconify-icon {
  font-size: 20px;
}

/* sm: Large phones and up */
@media (min-width: 576px) {
  .cta-group {
    gap: 16px;
  }

  .cta-phone__number {
    font-size: 24px;
  }

  .cta-phone__icon {
    font-size: 24px;
  }

  .btn {
    font-size: 18px;
    padding: 12px 20px;
  }

  .btn iconify-icon {
    font-size: 22px;
  }
}

/* lg: Desktop and up */
@media (min-width: 992px) {
  .cta-phone__number {
    font-size: 28px;
  }

  .cta-phone__icon {
    font-size: 28px;
  }

  .btn {
    font-size: 20px;
  }

  .btn iconify-icon {
    font-size: 24px;
  }
}

/* ============================================
   PHONE CTA — BREATHING + SHAKE ANIMATION
   ============================================ */
.cta-phone__icon {
  animation: phone-breathe 3s ease-in-out infinite;
}

@keyframes phone-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  20% {
    transform: scale(1.12) rotate(-3deg);
    opacity: 0.9;
  }
  25% {
    transform: scale(1.12) rotate(3deg);
  }
  30% {
    transform: scale(1.12) rotate(-2deg);
  }
  35% {
    transform: scale(1.1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .cta-phone,
  .btn,
  .social-links a {
    transition: none;
  }

  .cta-phone__icon {
    animation: none;
  }
}
