/* AnyTools - Bootstrap Native Styles */

/* === Design Token Variables (Premium Theme) === */
:root {
    --at-brand:#0d46a0; /* Primary brand */
    --at-brand-accent:#1d6bff; /* Accent gradient stop */
    --at-brand-alt:#0b377d; /* Darker shade */
    --at-bg-soft:#f5f8fb; /* App background */
    --at-border:#dde3ea; /* Light border */
    --at-border-strong:#c6d0db; /* Stronger border */
    --at-text:#1f2a36; /* Primary text */
    --at-text-soft:#5b6672; /* Muted text */
    --at-radius-sm:4px;
    --at-radius:10px;
    --at-radius-lg:18px;
    --at-shadow-sm:0 2px 4px -1px rgba(15,35,55,.08),0 2px 8px rgba(15,35,55,.06);
    --at-shadow:0 4px 16px -2px rgba(15,35,55,.08),0 8px 28px -4px rgba(15,35,55,.12);
    --at-gradient:linear-gradient(135deg,#0d46a0,#1d6bff 70%);
}

body {
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
    line-height:1.55;
    color:var(--at-text);
    background:var(--at-bg-soft);
}

/* ====== Home Hero (Index Premium) ====== */
.home-hero {background:var(--at-gradient);position:relative;}
.home-hero .hero-title {letter-spacing:-.5px;}
.home-hero .search-panel {max-width:980px;}
.home-hero .hero-accent {position:absolute;border-radius:50%;filter:blur(60px);opacity:.35;pointer-events:none;}
.home-hero .hero-accent-1 {width:380px;height:380px;background:#1d6bff;top:-120px;left:-120px;}
.home-hero .hero-accent-2 {width:320px;height:320px;background:#0b377d;bottom:-100px;right:-80px;}

/* Tool card tweaks inside premium grid */
.tool-card.card {transition:box-shadow .18s, transform .18s;}
.tool-card.card:hover {transform:translateY(-3px);box-shadow:var(--at-shadow);}
.tool-card .badge {font-size:.65rem; letter-spacing:.3px;}

/* Tool card title */
.tool-card h3 {
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* Tool card description */
.tool-card p {
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* Fixed navbar offset */
body.with-fixed-nav { padding-top:72px; }
/* Sabit navbar: scroll ile durum değişikliği kaldırıldı */

/* Minimal Custom Navbar Styles - Bootstrap Native Colors */
.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
}

.navbar.sticky-top {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* Language Selector Styles - Using flag-icons.min.css */
.fi {
    width: 20px;
    height: 15px;
    border-radius: 2px;
}

/* Flag absolute overrides (in case relative path resolution fails in some deployment contexts) */
.fi-tr { background-image: url(/assets/flag-icons/flags/4x3/tr.svg) !important; }
.fi-us { background-image: url(/assets/flag-icons/flags/4x3/us.svg) !important; }
.fi-de { background-image: url(/assets/flag-icons/flags/4x3/de.svg) !important; }
.fi-fr { background-image: url(/assets/flag-icons/flags/4x3/fr.svg) !important; }
.fi-es { background-image: url(/assets/flag-icons/flags/4x3/es.svg) !important; }

/* Inline SVG flag standard sizing */
.flag-inline-svg {
    width:20px;
    height:15px;
    vertical-align:middle;
    border-radius:2px;
    display:inline-block;
}

/* === Mega Menu (Premium) === */
.mega-dropdown .dropdown-menu.mega-menu {
        width:100%;
        max-width:1180px;
        left:0; right:0;
        margin:0 auto;
        top:100%;
        border-radius:var(--at-radius-lg);
        animation:megaFade .18s ease;
        background:#fff;
        border:1px solid var(--at-border);
        box-shadow:var(--at-shadow);
    padding:1.25rem 1.5rem 1.4rem;
    overflow-x:hidden; /* prevent horizontal scroll */
}
@keyframes megaFade {from {opacity:0; transform:translateY(6px);} to {opacity:1; transform:translateY(0);} }
.mega-menu-header h6 { letter-spacing:.5px; font-weight:600; color:var(--at-text-soft); font-size:.72rem; text-transform:uppercase; margin-bottom:.75rem; }
.mega-cat-list .mega-cat-item + .mega-cat-item { margin-top:.3rem; }
.mega-cat-link {font-size:.84rem;padding:.45rem .55rem;border-radius:var(--at-radius-sm);background:transparent;position:relative;transition:background .15s,color .15s,transform .15s;line-height:1.15;display:flex;align-items:flex-start;gap:.45rem;color:var(--at-text-soft);}
.mega-cat-link:hover {background:var(--at-bg-soft);text-decoration:none;color:var(--at-text);} 
.mega-cat-link:active {background:#e6eef5;}
.mega-cat-icon {width:1.1rem;text-align:center;color:var(--at-brand-accent);margin-top:2px;}
.mega-cat-arrow {opacity:0;transition:opacity .2s;font-size:.65rem;margin-left:auto;color:var(--at-brand-accent);} 
.mega-cat-link:hover .mega-cat-arrow {opacity:1;}
.mega-menu-footer {font-size:.7rem;color:var(--at-text-soft);margin-top:.6rem;}
.mega-menu-footer a {text-decoration:none;}
.mega-menu-footer a:hover {text-decoration:underline;}
.mega-search-group .form-control {border-left:0;}
.mega-search-group .input-group-text {border-right:0;}
.mega-category-filter:focus {box-shadow:none;border-color:var(--at-brand-accent);}
.mega-menu-body {max-height:470px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#c9d2dc transparent;}
.mega-menu-body {overflow-x:hidden;} /* extra safety */
.mega-menu-body .row {margin-left:0;margin-right:0;} /* neutralize bootstrap gutter negative margins */
.mega-menu-body [class^="col"], .mega-menu-body [class*=" col"] {padding-left:.5rem;padding-right:.5rem;}
.mega-menu-body::-webkit-scrollbar {width:8px;}
.mega-menu-body::-webkit-scrollbar-thumb {background:#c9d2dc;border-radius:4px;}
.navbar-tool-search .form-control {min-width:300px;}
@media (max-width: 991.98px) {
    .navbar-tool-search {display:none !important;}
    .mega-dropdown .dropdown-menu.mega-menu {max-width:100%;border-radius:0;box-shadow:none;border-left:0;border-right:0;}
    .mega-menu-body {max-height:55vh;}
}

.dropdown-item.active {
    font-weight: 600;
}

/* Header Sections */
.header {
    margin-bottom: 2rem;
}

.header .display-4 {
    font-weight: 700;
    color: #333;
}

.header .lead {
    font-size: 1.2rem;
}

/* Breadcrumb */
.breadcrumb {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Search Section */
.search-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
}

.category-select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    min-width: 150px;
}

.search-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Results Info */
.results-info {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 6px;
}

.clear-filters {
    text-decoration: none;
    font-weight: 600;
    margin-left: 1rem;
}

.clear-filters:hover {
    text-decoration: underline;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tool-title {
    margin-bottom: 0.75rem;
}

.tool-title a {
    color: #333;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
}

.tool-description {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tool-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.tool-category a {
    text-decoration: none;
    font-weight: 500;
}

.tool-category a:hover {
    text-decoration: underline;
}

/* Tool Page Styles */
.tool-page {
    max-width: 800px;
    margin: 0 auto;
}

.tool-header {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.tool-header h2 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tool-header .tool-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Tool Description Rich Text Styles */
.tool-description h3,
.tool-description h4 {
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #333;
}

.tool-description h3 { font-size: 1.4rem; }
.tool-description h4 { font-size: 1.2rem; }

.tool-description p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.tool-description ul,
.tool-description ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.tool-description li {
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.tool-description a {
    color: #0d6efd;
    text-decoration: underline;
}

.tool-description a:hover {
    color: #0a58ca;
}

.tool-description strong,
.tool-description b {
    font-weight: 600;
}

.tool-description em,
.tool-description i {
    font-style: italic;
}

.tool-description u {
    text-decoration: underline;
}

.tool-keywords {
    margin-top: 1rem;
}

.keyword-tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin: 0.25rem;
}

.tool-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #007bff;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Results */
.results-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.results-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.results-output {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
}

.copy-btn {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    padding: 8px 16px;
}

/* Pagination - Bootstrap Native */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-link.dots {
    border-color: transparent;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.no-results h3 {
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}

.footer a {
    color: #007bff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

/* Modal Styles - Bootstrap Native (clean) */
.modal-content {border:none;border-radius:var(--at-radius);box-shadow:var(--at-shadow-sm);}
.modal-header {border-bottom:none;}
.modal-footer {border-top:none;}

/* Premium Navbar classes (kullanılmıyor şu an) */
.navbar.navbar-premium {background:var(--at-gradient);box-shadow:var(--at-shadow-sm);} 
.navbar-light .nav-link {color:var(--at-text-soft);} 
.navbar-light .nav-link:hover,.navbar-light .nav-link:focus {color:var(--at-text);} 
.navbar-light .nav-link.active {font-weight:600;color:var(--at-text);} 

/* Button Enhancements - Bootstrap Native */
.btn {font-weight:500;border-radius:0.5rem;padding:0.75rem 1.4rem;transition:background .25s ease,box-shadow .25s ease;}
.btn:active {transform:translateY(1px);} 

/* Responsive Styles */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-nav {
        margin-top: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid #f8f9fa;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu {
        margin-top: 0;
        border: none;
        box-shadow: none;
        background-color: #f8f9fa;
    }
    
    .dropdown-item {
        padding: 0.75rem 1.5rem;
    }
    
    .header .display-4 {
        font-size: 2rem;
    }
    
    .header .lead {
        font-size: 1rem;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .search-input,
    .category-select,
    .search-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .search-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .header .display-4 {
        font-size: 1.75rem;
    }
    
    .tool-card {
        margin-bottom: 1rem;
    }
}

/* (Removed slideDown animation for stable fixed navbar) */
/* Navbar persistent shadow */
#mainNavbar { box-shadow:0 2px 6px -1px rgba(15,35,55,.08),0 4px 18px -4px rgba(15,35,55,.10); }

/* Navbar auth buttons refinement */
#mainNavbar .btn {line-height:1.2;display:inline-flex;align-items:center;font-weight:600;}
#mainNavbar .btn i {font-size:.9rem;}
#mainNavbar .btn.btn-primary {box-shadow:0 2px 4px rgba(0,0,0,.08);} 
#mainNavbar .btn.btn-primary:hover {box-shadow:0 3px 8px rgba(0,0,0,.12);} 
/* Auth buttons refined size */

.tool-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

/* Focus Styles - Bootstrap Native */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .modal,
    .footer {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header h1 a {
        font-size: 2rem;
    }
    
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input,
    .category-select,
    .search-btn {
        width: 100%;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-header,
    .tool-content {
        padding: 1.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .page-numbers {
        display: none;
    }
}

/* Toast Close Button */
.btn-close-custom {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-custom:hover {
    opacity: 1;
}

.btn-close-custom i {
    font-size: 0.9rem;
}

/* Sidebar Static - No sticky behavior */
.sidebar-static {
    position: relative;
    z-index: 1;
}

/* Rating Input for Comments */
.rating-input {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    align-items: center;
}

.rating-input input[type="radio"] {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

.rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    margin: 0;
    padding: 0.25rem;
}

.rating-input label:hover {
    transform: scale(1.1);
}

.rating-input label i {
    pointer-events: none;
}