/**
 * SoftHub Theme - Additional Custom Styles
 * @package SoftHub
 * @version 1.0.0
 */

/* Custom animations */
@keyframes slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes modal-pop {
    from {
        transform: scale(0.95) translateY(10px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes backdrop-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slide-up 0.3s ease-out;
}

.animate-modal-pop {
    animation: modal-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-backdrop-fade {
    animation: backdrop-fade 0.3s ease-out forwards;
}

/* Header hide/show on scroll */
header.header-hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

header {
    transition: transform 0.3s ease-in-out;
}

/* Tooltip styles */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom buttons */
.btn-primary {
    background: linear-gradient(to right, #9333ea, #3b82f6);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(to right, #7e22ce, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(147, 51, 234, 0.4);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: #10b981;
    color: white;
}

.badge-warning {
    background-color: #f59e0b;
    color: white;
}

.badge-danger {
    background-color: #ef4444;
    color: white;
}

.badge-info {
    background-color: #3b82f6;
    color: white;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #9333ea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #9333ea, #3b82f6);
    transition: width 0.3s ease;
}



/* ==================== Modal Styles ==================== */

/* Modal backdrop blur - başlangıçta gizli */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

/* Modal container - centered layout */
.modal-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 1rem;
    pointer-events: none;
}

.modal-container>* {
    pointer-events: auto;
}


/* Modal overlay wrapper */
.modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal overlay hidden state - tamamen gizli */
.modal-overlay.hidden {
    display: none !important;
}

/* Modal content - initial hidden state */
.modal-content {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Modal active state - animated entrance */
.modal-active .modal-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.modal-active .modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Modal backdrop fade in animation */
@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal content animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    to {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(to right, #9333ea, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.15);
    background-color: #ffffff;
}

/* Header search input - override autofill and focus */
header input[name="s"] {
    background-color: transparent !important;
}

header input[name="s"]:focus {
    background-color: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

header input[name="s"]:-webkit-autofill,
header input[name="s"]:-webkit-autofill:hover,
header input[name="s"]:-webkit-autofill:focus,
header input[name="s"]:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px transparent inset !important;
    -webkit-text-fill-color: white !important;
    background-color: transparent !important;
    transition: background-color 5000s ease-in-out 0s;
}

.floating-input-group {
    position: relative;
    transition: all 0.3s ease;
}

.floating-input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    transition: all 0.3s ease;
}

.floating-input-group input:focus+i {
    color: #9333ea;
}

.floating-input-group input {
    padding-left: 40px !important;
}

/* Hover glow effect */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.5);
}

/* Ripple effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: ripple 600ms linear;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}

.empty-state svg {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    header,
    footer,
    .sidebar,
    .comments-area,
    button {
        display: none !important;
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hide {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to add dark mode support
    body {
        background-color: #1f2937;
        color: #f9fafb;
    }
    */
}

/* ==================== Messaging System Styles ==================== */

/* Read tick animations */
@keyframes tick-appear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.read-tick svg {
    animation: tick-appear 0.2s ease-out;
}

/* Online status pulse */
@keyframes pulse-green {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.online-badge.online {
    animation: pulse-green 2s infinite;
}

/* Message bubble animations */
@keyframes message-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-item {
    animation: message-in 0.3s ease-out;
}

/* Conversation item hover */
.conversation-item:hover {
    background-color: #f9fafb;
    transform: translateX(5px);
    transition: all 0.2s ease;
}

/* Custom Width Override */
.max-w-7xl {
    max-width: 75rem !important;
}

/* ==================== Announcement Bar Styles ==================== */

/* Slide down animation on load */
@keyframes announcement-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.announcement-bar-slide-down {
    animation: announcement-slide-down 0.5s ease-out forwards;
}

/* Smooth transitions for dismiss */
#announcement-bar {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== Premium Menu Styles ==================== */

/* Primary Menu Container */
.menu-primary {
    position: relative;
}

/* Primary Menu Items */
.menu-primary>li {
    position: relative;
}

/* Primary Navigation Links */
.nav-link {
    position: relative;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Active Menu Item Indicator */
.menu-item.active>.nav-link,
.menu-item.current-menu-item>.nav-link,
.menu-item.current_page_item>.nav-link {
    color: #ffffff !important;
    font-weight: 600;
}

.menu-item.active>.nav-link::after,
.menu-item.current-menu-item>.nav-link::after,
.menu-item.current_page_item>.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Hover Effect for Primary Links */
.nav-link:hover {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Dropdown Menu Glassmorphism */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(147, 51, 234, 0.1);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.15),
        0 0 50px rgba(147, 51, 234, 0.05);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    background: white;
    border-left: 1px solid rgba(147, 51, 234, 0.1);
    border-top: 1px solid rgba(147, 51, 234, 0.1);
    transform: rotate(45deg);
}

/* Dropdown Links */
.dropdown-link {
    color: #374151;
    font-weight: 500;
}

.dropdown-link:hover {
    color: #9333ea;
    background: linear-gradient(90deg, rgba(147, 51, 234, 0.05), rgba(147, 51, 234, 0.02));
}

/* Dropdown Icons */
.dropdown-link i {
    color: #9333ea;
    opacity: 0.7;
    transition: all 0.2s;
}

.dropdown-link:hover i {
    opacity: 1;
    transform: translateX(2px);
}

/* Secondary Menu */
.menu-secondary>li {
    position: relative;
}

.menu-secondary>li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: 1px;
    background: #e5e7eb;
}

/* Secondary Menu Hover */
.menu-secondary a:hover {
    color: #2563eb !important;
    transform: translateY(-1px);
}

/* Secondary Menu Active State */
.menu-secondary .current-menu-item>a,
.menu-secondary .current_page_item>a {
    color: #2563eb !important;
    font-weight: 700;
    position: relative;
}

.menu-secondary .current-menu-item>a::before,
.menu-secondary .current_page_item>a::before {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 2px;
    background: linear-gradient(90deg, #9333ea, #3b82f6);
    border-radius: 2px;
}

/* Mobile Menu Animations */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Items */
#mobile-menu a {
    transition: all 0.2s ease;
    padding: 0.75rem 0;
    display: block;
    border-radius: 0.5rem;
}

#mobile-menu a:hover {
    padding-left: 1rem;
    background: rgba(255, 255, 255, 0.1);
}

/* Lucide Icon Hover Effect */
.category-item:hover [data-lucide],
.category-item:hover .lucide,
.menu-item:hover [data-lucide],
.menu-item:hover .lucide {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Menu Fade In on Load */
@keyframes menu-fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header nav {
    animation: menu-fade-in 0.5s ease-out;
}

/* No scrollbar for horizontal menu scroll */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Menu Glow Effect on Hover */
.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.5rem;
    opacity: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 70%);
    transition: opacity 0.3s ease;
}

.nav-link:hover::before {
    opacity: 1;
}

/* Responsive Menu Enhancements */
@media (max-width: 768px) {
    .menu-primary {
        flex-direction: column;
        gap: 0.5rem;
    }

    .dropdown-menu {
        position: static !important;
        width: 100%;
        margin-top: 0.5rem;
        transform: none !important;
    }

    .menu-item {
        width: 100%;
    }
}

/* ==================== Icon Anti-Flicker Fix ==================== */

/* 1. Initial State: Hide raw <i> tags with data-lucide attribute */
i[data-lucide] {
    opacity: 0;
    width: 1.25rem;
    /* Reserve space (w-5) */
    height: 1.25rem;
    /* Reserve space (h-5) */
    display: inline-block;
    vertical-align: middle;
}

/* 2. Processed State: Show SVGs created by Lucide */
svg.lucide {
    opacity: 1;
    display: inline-block;
    vertical-align: middle;
}

/* Ensure menu specific overrides work */
.menu-primary i[data-lucide],
.menu-secondary i[data-lucide] {
    opacity: 0;
}

.menu-primary svg.lucide,
.menu-secondary svg.lucide {
    opacity: 1;
}

/* ==================== Contact Form 7 Styles ==================== */

/* Form Container */
.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Labels */
.wpcf7-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Inputs & Textareas */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea,
.wpcf7-form select {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 1rem !important;
    /* Force padding */
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #fff;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    border-color: #9333ea;
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.1);
}

/* Submit Button */
.wpcf7-form input[type="submit"] {
    width: 100%;
    background: linear-gradient(to right, #9333ea, #3b82f6);
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.wpcf7-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(147, 51, 234, 0.4);
}

/* Validation Errors */
.wpcf7-not-valid-tip {
    font-size: 0.85rem;
    color: #ef4444;
    margin-top: 0.25rem;
    display: block;
}

.wpcf7-response-output {
    border: none !important;
    border-radius: 0.5rem;
    padding: 1rem !important;
    margin: 2rem 0 0 0 !important;
    text-align: center;
    font-weight: 500;
}

.wpcf7-response-output.wpcf7-display-none {
    display: none;
}

.wpcf7-mail-sent-ok {
    background-color: #d1fae5;
    color: #065f46;
}

.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Spinner */
.wpcf7-spinner {
    position: absolute;
    margin-top: -10px;
}

.fulladam-ust {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fulladam-gun {
    font-size: 11px;
    font-weight: 700;
    color: #ff4500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fulladam-tarih {
    font-size: 11px;
    color: #888;
    font-weight: 400;
}

.fulladam-zaman-box {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

#fulladam-saat {
    font-size: 40px;
    font-weight: 200;
    color: #1a1a1a;
    line-height: 1;
}

#fulladam-saniye {
    font-size: 20px;
    font-weight: 400;
    color: #bbb;
    width: 25px;
}

#fulladam-progress-bg {
    width: 100%;
    height: 3px;
    background: #f0f0f0;
    margin-top: 15px;
    border-radius: 2px;
}

#fulladam-progress-bar {
    height: 100%;
    width: 0%;
    background: #ff4500;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ==================== Content Formatting Fixes ==================== */

.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.prose strong,
.prose b {
    font-weight: 600;
    color: #1f2937;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.625rem;
    margin-bottom: 1.25rem;
}

.prose ol {
    list-style-type: decimal;
    padding-left: 1.625rem;
    margin-bottom: 1.25rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: #111827;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.prose h1 {
    font-size: 2.25rem;
}

.prose h2 {
    font-size: 1.875rem;
}

.prose h3 {
    font-size: 1.5rem;
}

.prose h4 {
    font-size: 1.25rem;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #1d4ed8;
}

.prose blockquote {
    font-style: italic;
    color: #111827;
    border-left-width: 0.25rem;
    border-left-color: #757575;
    background-color: #ffffe0;
    quotes: "\201C" "\201D" "\2018" "\2019";
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    padding-left: 1em;
}

.bg-amber-50 {
    --tw-bg-opacity: 1;
    background-color: rgb(255 251 235 / var(--tw-bg-opacity, 1));
}

.text-amber-700 {
    --tw-text-opacity: 1;
    color: rgb(180 83 9 / var(--tw-text-opacity, 1));
}

.ring-amber-100 {
    --tw-ring-opacity: 1;
    --tw-ring-color: rgb(254 243 199 / var(--tw-ring-opacity, 1));
}

/* Menu Dropdown Open State Custom */
.menu-secondary li.open>.sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.menu-secondary li.open>.sub-menu.left-full {
    transform: translateX(0) !important;
}