/* ═══════════════════════════════════════════════════════
   Ecofum — app.css  v3
   Tailwind CDN'in kapsamadığı özel stiller.
   Değişkenler Tailwind config ile senkronize.
═══════════════════════════════════════════════════════ */

/* ── CSS Değişkenleri ───────────────────────────────── */
:root {
    --green:  #268F1C;
    --red:    #BD2433;
    --yellow: #FFEA00;
    --dark:   #010305;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,.08);
}

/* ── Reset / Base ───────────────────────────────────── */
[x-cloak]   { display: none !important; }
html        { scroll-behavior: smooth; }
body        { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
*           { box-sizing: border-box; }

/* ── Hero clip-path ─────────────────────────────────── */
.hero-clip {
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0% 100%);
}
[dir="rtl"] .hero-clip {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 88%);
}

/* ── Servis kartı hover animasyonu ──────────────────── */
.service-card .card-icon {
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.service-card:hover .card-icon {
    transform: scale(1.15) rotate(-3deg);
}

/* ── Navigasyon — smooth underline ──────────────────── */
.nav-link {
    position: relative;
    padding-bottom: 2px;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green);
    border-radius: 2px;
    transition: width .25s ease;
}
[dir="rtl"] .nav-link::after { left: auto; right: 0; }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── Yapışkan header gölgesi ────────────────────────── */
header.is-sticky {
    box-shadow: 0 2px 20px rgba(0,0,0,.10);
}

/* ── Scroll Progress Bar ────────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--green), var(--yellow));
    z-index: 9999;
    transition: width .1s linear;
    pointer-events: none;
}

/* ── Form Input Focus ───────────────────────────────── */
.form-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(38,143,28,.12);
}
.form-input.border-red-400:focus {
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

/* ── WhatsApp Widget Pulse ──────────────────────────── */
@keyframes wa-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(37,211,102,.5); }
    70%  { box-shadow: 0 0 0 14px rgba(37,211,102,0);  }
    100% { box-shadow: 0 0 0 0   rgba(37,211,102,0);   }
}
.wa-btn { animation: wa-pulse 2.5s infinite; }

/* ── WhatsApp Popup Geçişi ──────────────────────────── */
.wa-popup {
    transform-origin: bottom right;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.wa-popup.hidden-popup {
    transform: scale(.88);
    opacity: 0;
    pointer-events: none;
}
[dir="rtl"] .wa-popup { transform-origin: bottom left; }

/* ── Spinner (form submit) ──────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin .7s linear infinite; }

/* ── Cookie Banner Slide-up ─────────────────────────── */
@keyframes slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.cookie-banner { animation: slide-up .4s ease forwards; }

/* ── Stat Cards ─────────────────────────────────────── */
.stat-card {
    background: linear-gradient(135deg, var(--green) 0%, #1a6b13 100%);
}

/* ── Breadcrumb ─────────────────────────────────────── */
.breadcrumb ol { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ── Toast Bildirimleri ─────────────────────────────── */
[data-toast] {
    position: relative;
    overflow: hidden;
}
[data-toast]::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    background: currentColor;
    opacity: .25;
    animation: toast-progress linear forwards;
}

/* ── Lazy-load resimler ─────────────────────────────── */
img[data-src] {
    opacity: 0;
    transition: opacity .4s ease;
}
img[data-src].loaded { opacity: 1; }

/* ── RTL genel düzeltmeler ──────────────────────────── */
[dir="rtl"] .fa-arrow-right,
[dir="rtl"] .fa-chevron-right,
[dir="rtl"] .fa-paper-plane {
    transform: scaleX(-1);
}

/* ── Print ──────────────────────────────────────────── */
@media print {
    #scroll-progress, #wa-widget, .cookie-banner,
    header .topbar, .mobile-bar { display: none !important; }
    main { margin-top: 0 !important; }
}

/* ── Reduced Motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ── intl-tel-input overrides ──────────────────────── */
.iti { width: 100%; }
.iti__flag-container { z-index: 10; }
.iti__selected-flag {
    border-radius: 0.75rem 0 0 0.75rem;
    background-color: #f9fafb;
    border-right: 1px solid #e5e7eb;
    padding: 0 10px;
}
.iti--separate-dial-code .iti__selected-flag {
    border-radius: 0.75rem 0 0 0.75rem;
}
/* Input alanı padding — bayrak + kod için yer */
.iti--separate-dial-code input[type=tel] {
    padding-left: 90px !important;
    border-radius: 0.75rem !important;
    width: 100% !important;
}
.iti__dropdown-content {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    overflow: hidden;
}
.iti__search-input {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
}
.iti__country-list {
    max-height: 180px;
}
.iti__country.iti__highlight,
.iti__country:hover {
    background-color: #f0fdf4;
}

/* intl-tel-input — dropdownContainer:body kullandığında z-index */
.iti { width:100%; }
.iti--container { z-index: 9000 !important; }
.iti__dropdown-content {
    border-radius:.75rem !important;
    box-shadow:0 10px 30px -5px rgba(0,0,0,.15) !important;
    border:1px solid #e5e7eb !important;
    overflow:hidden;
}
.iti__country-list { max-height:200px; font-size:.875rem; }
.iti__country.iti__highlight,
.iti__country:hover { background:#f0fdf4 !important; }
.iti__search-input {
    font-size:.875rem;
    border-bottom:1px solid #e5e7eb;
    padding:.5rem .75rem;
    width:100%;
}
.iti--separate-dial-code input[type=tel] {
    padding-left:90px !important;
    border-radius:.75rem !important;
    width:100% !important;
    box-sizing:border-box !important;
}
