/* UltraMail - Custom Styles (Tailwind-style enhancements) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --success: #10b981;
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #2563eb 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.3);
}

* { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ===== MEGA MENU ===== */
#main-header {
  position: sticky;
}

.mega-menu-wrapper {
  position: static;
}

.mega-menu-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  width: 100%;
  background: white;
  border-top: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  pointer-events: none;
}

#main-header:has(.mega-menu-wrapper:hover) .mega-menu-panel,
#main-header:has(.mega-menu-panel:hover) .mega-menu-panel,
#main-header:has(.mega-menu-wrapper:focus-within) .mega-menu-panel,
.mega-menu-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mega-menu-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.mega-menu-col h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.mega-menu-col .mega-menu-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mega-menu-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.mega-menu-item p {
  margin: 0;
}

.mega-menu-item .mega-item-title {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.mega-menu-item .mega-item-desc {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.mega-menu-item:hover {
  background: var(--gray-50);
  transform: translateX(4px);
}

.mega-menu-item:hover .mega-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.mega-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.2s ease;
}

.mega-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ===== HEADER ===== */
.header-scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

.top-bar {
  background: var(--dark);
  color: white;
  font-size: 0.8125rem;
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--gray-800);
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover { color: var(--primary); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--primary); }

/* ===== HERO ===== */
.hero-gradient {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: blob-float 8s ease-in-out infinite;
}

@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== CARDS ===== */
.pricing-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.pricing-card.featured::before {
  content: 'Popüler';
  position: absolute;
  top: 1rem;
  right: -2rem;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 2.5rem;
  transform: rotate(45deg);
  z-index: 2;
}

.discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid #fcd34d;
}

.support-card-icon {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.support-card-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.support-card-icon.phone { background: #dbeafe; color: #2563eb; }
.support-card-icon.chat { background: #d1fae5; color: #059669; }
.support-card-icon.email { background: #fef3c7; color: #d97706; }

.site-logo,
.footer-logo {
  display: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.group:hover .brand-mark,
.brand-logo:hover .brand-mark {
  transform: scale(1.05);
}

.brand-mark svg {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.brand-accent {
  color: var(--primary);
}

.brand-mark--footer {
  background: var(--primary-light);
}

.brand-name--footer {
  color: white;
}

.brand-accent--footer {
  color: #93c5fd;
}

.footer-payments {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-payments {
    justify-content: flex-end;
  }
}

.footer-payments-label {
  font-size: 0.875rem;
  color: #64748b;
}

.payment-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.payment-badge {
  padding: 0.25rem 0.75rem;
  background: #1e293b;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

.hero-banner-img {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  display: block;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.25));
}

.feature-img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  margin-bottom: 1.25rem;
}

.trustpilot-img {
  height: 1.75rem;
  width: auto;
  margin-top: 1.5rem;
}

.client-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: white;
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  min-height: 5rem;
}

.pricing-intro-img,
.page-content-img {
  border-radius: 1.25rem;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.section-side-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.comparison-table th,
.comparison-table td {
  white-space: nowrap;
}

.feature-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card:hover .feature-icon-wrap {
  background: var(--primary);
  color: white;
}

.feature-icon-wrap {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.3s ease;
  margin-bottom: 1.25rem;
}

/* ===== STATS ===== */
.stat-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
}

.testimonial-slider {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.5rem;
}

.testimonial-slider::-webkit-scrollbar { display: none; }

.testimonial-slider > * {
  scroll-snap-align: start;
  flex: 0 0 calc(33.333% - 1rem);
  min-width: 300px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.625rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.625rem;
  border: 2px solid rgba(255,255,255,0.5);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-outline:hover {
  background: white;
  color: var(--primary);
  border-color: white;
}

/* ===== FOOTER ===== */
.footer-gradient {
  background: linear-gradient(180deg, var(--dark) 0%, #020617 100%);
}

/* ===== FLOATING ACTION BAR ===== */
.fab-bar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fab-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary);
  color: white;
  padding: 0.75rem;
  padding-right: 1rem;
  border-radius: 0.5rem 0 0 0.5rem;
  margin-bottom: 2px;
  transition: all 0.3s ease;
  transform: translateX(calc(100% - 3rem));
  cursor: pointer;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.fab-item:hover {
  transform: translateX(0);
  background: var(--primary-dark);
}

.fab-item svg { flex-shrink: 0; }

/* ===== MOBILE MENU ===== */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.is-open { transform: translateX(0); }

.mobile-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  font-weight: 600;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-200);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
}

.mobile-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-accordion-content.is-open {
  max-height: 600px;
}

/* ===== PAGE HERO ===== */
.page-hero {
  background: var(--gradient-hero);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}

.breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: white; }

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-align: left;
  color: var(--gray-800);
  transition: background 0.2s;
}

.faq-question:hover { background: var(--gray-50); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer.is-open { max-height: 300px; }

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(0.95); opacity: 1; }
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-ring 2s ease infinite;
}

/* ===== CLIENT LOGOS ===== */
.client-logo {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
  height: 3rem;
  object-fit: contain;
}

.client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ===== BLOG CARD ===== */
.blog-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* ===== FORM ===== */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .mega-menu-panel { display: none !important; }
  .mega-menu-grid { grid-template-columns: 1fr; }
  .fab-bar { display: none; }
  .testimonial-slider > * {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

@media (max-width: 640px) {
  .testimonial-slider > * {
    flex: 0 0 85%;
  }
}
