/* ============================================
   OmniTools — Global Stylesheet
   ============================================ */

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    display: flex;
    flex-direction: column;
    background-color: #f4f6fb;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #2d3748;
}

/* Center everything inside a max-width container */
.container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
}

/* Ensure Bulma columns always flex side by side */
.columns {
    display: flex !important;
    flex-wrap: wrap;
}

.columns.is-centered {
    justify-content: center;
}

.column {
    flex: 1;
    padding: 0.75rem;
}

.section { flex: 1; padding: 3rem 1.5rem; }
.footer  { margin-top: auto; }

/* Bulma column size overrides */
.column.is-4 { flex: none; width: 33.3333%; }
.column.is-6 { flex: none; width: 50%; }
.column.is-8 { flex: none; width: 66.6667%; }
.column.is-12 { flex: none; width: 100%; }

/* --- Navbar --- */
.navbar {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.navbar > .container {
    display: flex;
    align-items: stretch;
}

.navbar-item, .navbar-link {
    color: #e2e8f0 !important;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-item:hover, .navbar-link:hover {
    color: #fff !important;
    background-color: rgba(255,255,255,0.08) !important;
}

.navbar-brand strong {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #63b3ed, #9f7aea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-dropdown {
    background: #1a1a2e !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
    padding: 0.5rem 0;
}

.navbar-dropdown .navbar-item {
    color: #cbd5e0 !important;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.navbar-dropdown .navbar-item:hover {
    background-color: rgba(255,255,255,0.08) !important;
    color: #fff !important;
}

/* --- Hero --- */
.hero.is-primary {
    background: linear-gradient(135deg, #2b5ce6 0%, #7c3aed 100%);
    padding: 3.5rem 1.5rem;
}

.hero .title  { color: #fff !important; font-weight: 700; }
.hero .subtitle { color: rgba(255,255,255,0.85) !important; }

.hero .input.is-large {
    border-radius: 12px 0 0 12px !important;
    border: none;
    font-size: 1rem;
    height: 3.2rem;
}

.hero .button.is-white {
    border-radius: 0 12px 12px 0 !important;
    height: 3.2rem;
    font-weight: 600;
    color: #2b5ce6;
}

/* --- Section headings --- */
.section > .container > .title,
.section > .container > h2 {
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 2rem;
}

/* --- Tool Cards — equal height grid --- */
#toolGrid,
#toolsList {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: -0.75rem;
}

#toolGrid .column,
#toolsList .column {
    display: flex;
    padding: 0.75rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 190px;
    padding: 2rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    border: 1.5px solid #e8edf5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-align: center;
    gap: 0.4rem;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    border-color: #7c3aed;
    color: inherit;
}

.tool-card .icon { margin-bottom: 0.25rem; }

.tool-card .title {
    font-size: 1rem !important;
    font-weight: 700;
    color: #1a202c;
    margin: 0.25rem 0 0 !important;
    line-height: 1.3;
}

.tool-card p {
    font-size: 0.85rem;
    color: #718096;
    margin: 0;
    line-height: 1.4;
}

.tool-card-red:hover    { border-color: #f56565; }
.tool-card-green:hover  { border-color: #48bb78; }
.tool-card-purple:hover { border-color: #9f7aea; }

/* --- Box (calculator pages) --- */
.box {
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    border: 1px solid #e8edf5;
    background: #fff;
}

/* --- Buttons --- */
.button {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.button.is-success { background: linear-gradient(135deg, #38a169, #48bb78); border: none; color: #fff; }
.button.is-info    { background: linear-gradient(135deg, #3182ce, #63b3ed); border: none; color: #fff; }
.button.is-primary { background: linear-gradient(135deg, #2b5ce6, #7c3aed); border: none; color: #fff; }

/* --- Inputs --- */
.input, .select select, .textarea {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
}

.input:focus, .select select:focus, .textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
    outline: none;
}

.label {
    color: #2d3748;
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Notifications --- */
.notification {
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.notification.is-success {
    background: linear-gradient(135deg, #f0fff4, #c6f6d5);
    border: 1px solid #9ae6b4;
    color: #22543d;
}

.notification.is-info {
    background: linear-gradient(135deg, #ebf8ff, #bee3f8);
    border: 1px solid #90cdf4;
    color: #2a4365;
}

.notification.is-danger {
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    border: 1px solid #fc8181;
    color: #742a2a;
}

/* --- Category link boxes --- */
.section .box h3.title { color: #1a202c; font-weight: 700; }
.section .box ul { list-style: none; padding: 0; margin: 0; }
.section .box ul li { padding: 0.3rem 0; border-bottom: 1px solid #f0f4f8; }
.section .box ul li:last-child { border-bottom: none; }
.section .box ul li a { color: #4a5568; font-size: 0.9rem; transition: color 0.2s; }
.section .box ul li a:hover { color: #7c3aed; }

/* --- Footer --- */
.footer {
    background: #1a1a2e;
    color: #a0aec0;
    padding: 2.5rem 1.5rem 1.5rem;
}

.footer .title { color: #e2e8f0 !important; font-size: 1rem !important; }
.footer p, .footer li { color: #a0aec0; font-size: 0.875rem; }
.footer a { color: #90cdf4; transition: color 0.2s; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { padding: 0.2rem 0; }

.footer .content.has-text-centered p {
    color: #718096;
    font-size: 0.8rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.accuracy-note {
    font-size: 0.75rem !important;
    color: #a0aec0 !important;
    font-style: italic;
}

/* --- Tables --- */
.table { font-size: 0.9rem; }
.table thead th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
}

/* --- Navbar search box --- */
.search-box .input {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 8px;
}
.search-box .input::placeholder { color: rgba(255,255,255,0.5); }

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Utilities --- */
.has-text-purple { color: #9f7aea !important; }
.tool-item.is-hidden { display: none !important; }

/* --- Responsive --- */
@media screen and (max-width: 1024px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
}

@media screen and (max-width: 768px) {
    .tool-card { min-height: 160px; padding: 1.5rem 1rem; }
    .hero.is-primary { padding: 2rem 1rem; }
    .hero .title { font-size: 1.5rem !important; }
    .navbar-menu { background: #1a1a2e; padding: 0.5rem 0; }
    /* Stack all columns on mobile */
    .column.is-4,
    .column.is-6,
    .column.is-8 { width: 100%; }
    #toolGrid .column,
    #toolsList .column { width: 50%; flex: 0 0 50%; }
}

@media screen and (max-width: 480px) {
    #toolGrid .column,
    #toolsList .column { width: 100%; flex: 0 0 100%; }
}
