/* Reset and base */
* { box-sizing: border-box; margin:0; padding:0; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: #f4f7f9;
    color: #333;
}

/* Header & hero */
header {
    background: linear-gradient(135deg, #007BFF, #00BFFF);
    color: white;
    padding: 40px 20px;
    text-align: center;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
header h1 { font-size: 2.5em; margin-bottom:10px; }
header p { font-size: 1.2em; opacity:0.9; }

/* Navigation */
/* Updated Navigation */
nav {
    background: #0056b3;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center; /* This ensures all flex items are centered vertically */
    padding: 10px;
    gap: 15px;
}

nav a, nav button {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1em;
    display: inline-flex;  /* Use flex for internal content alignment */
    align-items: center;   /* Centers text inside the element */
    line-height: 1;        /* Prevents line-height from pushing the box */
    vertical-align: middle; /* Backup for older browser logic */
}

nav a:hover, nav button:hover {
    background: rgba(255,255,255,0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Dropdown */
nav .dropdown { position: relative; }
nav .dropdown-content {
    display: none;
    position: absolute;
    background: #007BFF;
    min-width: 180px;
    top: 100%;
    left: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 100;
}
nav .dropdown-content a {
    display: block;
    padding: 10px 15px;
    color: white;
    font-size: 1em; /* uniform text */
}
nav .dropdown:hover .dropdown-content { display: block; }

/* Tool container / cards */
.tool-container {
    padding: 30px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.calculator-box, .utility-box, .category-links a {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.calculator-box:hover, .utility-box:hover, .category-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Inputs and buttons */
.calculator-box input, .utility-box input {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}
.calculator-box input:focus, .utility-box input:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0 0 8px rgba(0,123,255,0.3);
}

.calculator-box button, .utility-box button {
    background: #007BFF;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.calculator-box button:hover, .utility-box button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Ad slots */
.ad-slot {
    min-height: 90px;
    margin: 25px 0;
    text-align: center;
    background: transparent;
}

/* Category sections */
.category {
    margin-bottom: 30px;
}
.category h2 {
    color: #007BFF;
    margin-bottom: 10px;
    font-size: 1.8em;
}
.category p {
    margin-bottom: 10px;
    opacity: 0.85;
    font-size: 1.05em; /* uniform paragraph size */
}
.category-links a {
    display: inline-block;
    margin: 5px 10px;
    padding: 12px 20px;
    text-decoration: none;
    background: #007BFF;
    color: white;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1em;        /* uniform button text size */
    min-width: 140px;      /* uniform button width */
    text-align: center;
}

/* Footer */
footer {
    background: #007BFF;
    color: white;
    padding: 20px;
    text-align: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    margin-top: 30px;
}
footer p { opacity: 0.9; font-size: 0.95em; }

/* Responsive */
@media (max-width: 768px){
    nav { flex-direction: column; align-items: center; }
    .calculator-box, .utility-box, .category-links a { width: 100%; min-width: unset; }
}
