/* 
   Advanced Premium UI CSS 
*/

:root {
    --bg-color: #f0f4f8; /* Soft blue-gray background */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary-color: #2563eb; /* Premium Blue */
    --primary-hover: #1d4ed8;
    --secondary-color: #f43f5e; /* Rose accent */
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --input-bg: #f8fafc;
    --focus-ring: rgba(37, 99, 235, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header Navbar */
.site-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #2563eb, #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.site-logo:hover {
    text-decoration: none;
}
.logo-icon {
    -webkit-text-fill-color: initial;
    font-size: 28px;
}

/* Main Layout */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* Calculators */
.calc-wrapper {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}
.calc-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    color: #0f172a;
}

.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
    color: #334155;
}
.input-group input, 
.input-group select, 
.input-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    background-color: var(--input-bg);
    transition: all 0.2s;
}
.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--focus-ring);
    background-color: #fff;
}

.calc-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.15);
    position: relative;
    overflow: hidden;
}
.calc-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.2);
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.5s ease;
}
.calc-btn:hover::after {
    transform: rotate(45deg) translateY(100%);
}
.calc-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 25px -5px rgba(37, 99, 235, 0.4), 0 10px 10px -5px rgba(37, 99, 235, 0.2);
}
.calc-btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.4);
}

/* Dropdown Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}
.nav-item {
    position: relative;
}
.nav-item > a {
    font-weight: 600;
    color: #334155;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.nav-item > a:hover {
    color: var(--primary-color);
    background: #f1f5f9;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.dropdown-menu {
    position: absolute;
    top: 150%;
    left: 50%;
    transform: translateX(-50%) rotateX(-15deg);
    transform-origin: top;
    background: #ffffff;
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25), 0 0 15px rgba(0,0,0,0.05);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    border: 1px solid var(--border-color);
}
.nav-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    top: 100%;
    transform: translateX(-50%) rotateX(0);
}
.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.dropdown-menu a:hover {
    background: #f8fafc;
    color: var(--primary-color);
    text-decoration: none;
    transform: translateX(5px);
}


.result-box {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.result-box.error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fca5a5;
    color: #991b1b;
}
.result-value {
    font-size: 38px;
    font-weight: 900;
    color: #166534;
    margin-top: 10px;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
}

/* Article / SEO Content */
.article-content {
    background-color: var(--card-bg);
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}
.article-content h2 {
    font-size: 24px;
    margin-top: 35px;
    margin-bottom: 15px;
    color: #0f172a;
    font-weight: 800;
}
.article-content h2:first-child {
    margin-top: 0;
}
.article-content h3 {
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 10px;
    color: #1e293b;
}
.article-content p {
    margin-bottom: 15px;
    color: #475569;
    font-size: 16px;
}
.article-content ul, .article-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
    color: #475569;
}
.article-content li {
    margin-bottom: 8px;
}

/* Homepage Grid */
.home-hero {
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 60px 20px;
    border-radius: 16px;
    color: white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.home-hero h1 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 15px;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.home-hero p {
    font-size: 18px;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}
.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s;
}
.tool-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    transform: translateY(-5px);
    text-decoration: none;
    border-color: transparent;
}
.tool-card:hover::before {
    opacity: 1;
}

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}
.tool-icon {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
    transition: background 0.3s, transform 0.3s;
}
.tool-card:hover .tool-icon {
    background: #e0e7ff;
    transform: scale(1.1) rotate(-5deg);
}

.tool-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.tool-card p {
    font-size: 14px;
    color: var(--text-muted);
    flex-grow: 1;
    line-height: 1.5;
}

/* Footer */
.site-footer {
    background-color: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 60px 20px;
    margin-top: 80px;
    border-top: 4px solid #1e293b;
}
.site-footer a {
    color: #38bdf8;
}
.site-footer a:hover {
    color: #bae6fd;
}
