/* =========================================================================
   site-shell.css — Khung chung dùng cho MỌI trang (header, footer, nav,
   biến màu, dark theme, responsive).

   ⚠️ SỬA HEADER/FOOTER CHỈ SỬA FILE NÀY. Trước đây cùng bộ CSS này bị chép
   thành 2 bản: 1 bản inline trong layouts/app.blade.php (lặp ~50KB trên mọi
   trang) và 1 bản trong modern-ui.min.css cho trang chủ — sửa 1 nơi quên nơi
   kia là header lệch nhau mà không ai phát hiện.

   --service-color: trang dịch vụ ghi đè bằng inline style trên <html>.
   ========================================================================= */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --ink: #1f2937;
    --muted: #6b7280;
    --light: #f8fafc;
    --line: #e5e7eb;
    --bg: #ffffff;
    --bg-card: #ffffff;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --ink: #f1f5f9;
    --muted: #94a3b8;
    --light: #1e293b;
    --line: #334155;
    --bg: #0f172a;
    --bg-card: #1e293b;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; overflow-x: clip; width: 100%; }
/* Base Font - Inter */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--light);
    color: var(--ink);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 15px; /* Retained from original body */
    transition: background 0.3s, color 0.3s; /* Retained from original body */
    min-height: 100%; /* Retained from original body */
    display: flex; /* Retained from original body */
    flex-direction: column; /* Retained from original body */
    overflow-x: clip; /* Retained from original body */
    width: 100%; /* Retained from original body */
}
.main-content { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; content-visibility: auto; }
img[loading="lazy"] { opacity: 1; transition: opacity 0.3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Shared header styles live in header.css (loaded separately). */

/* FOOTER */
.site-footer {
    background: #fff; padding: 40px 20px 20px;
    border-top: 1px solid var(--line); margin-top: 60px;
}
.footer-copyright { text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }
.footer-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 25px; }
.footer-link {
    padding: 8px 16px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 13px; color: #374151; text-decoration: none; transition: all 0.2s;
}
.footer-link:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 640px) {
    .site-footer { padding: 24px 16px 16px; margin-top: 40px; }
    .footer-copyright { font-size: 12px; margin-bottom: 16px; padding: 0 10px; }
    .footer-links { gap: 8px; justify-content: center; }
    .footer-link { padding: 6px 12px; font-size: 12px; flex: 0 0 auto; }
}

/* SEARCH BAR */
.tool-search-bar {
    padding: 12px 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #fdf4ff 100%);
    border-bottom: 1px solid #e5e7eb;
}
.tool-search-inner {
    max-width: 900px; margin: 0 auto;
    display: flex; align-items: center; gap: 15px; flex-wrap: wrap;
}
.tool-search-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
}
.tool-search-content { flex-shrink: 0; }
.tool-search-title { display: block; font-size: 14px; font-weight: 700; color: #1f2937; }
.tool-search-desc { font-size: 12px; color: #6b7280; }
.tool-search-form {
    flex: 1; display: flex; min-width: min(280px, 100%);
    background: #fff; border-radius: 25px; border: 2px solid #e5e7eb;
    overflow: hidden; transition: all 0.2s;
}
.tool-search-form:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.tool-search-input { flex: 1; padding: 10px 18px; border: none; font-size: 14px; outline: none; background: transparent; }
.tool-search-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff; border: none; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* Responsive shell */
@media (max-width: 600px) { 
    .tool-search-icon { display: none; } 
    .tool-search-content { text-align: center; width: 100%; } 
    .tool-search-form { min-width: 100%; }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1e40af;
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    font-size: 14px;
    font-weight: 600;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}
