/* --- Base and General Styles --- */
:root {
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --text-color: #333;
    --background-color: #f4f7f6;
    --container-bg: #ffffff;
    --border-color: #ddd;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

h2 {
    color: var(--primary-hover-color);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Header --- */
header {
    background-color: var(--container-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* --- Main Content --- */
main {
    padding: 40px 0;
}

/* --- The Main Tool Wrapper --- */
.tool-wrapper {
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.tool-wrapper h1 {
    text-align: center;
    font-size: 2rem;
}










/* --- Info Sections (About, More Tools) --- */
.info-section {
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.more-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tool-card {
    display: block;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    text-decoration: none;
}



.tool-card h2,h3,h4,h5,h6 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.info-section ul {
    padding-left: 20px;
    margin: 15px 0;
    list-style: disc;
}

.info-section li {
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.5;
}

.info-section li::marker {
    color: var(--primary-color);
}



/* --- F nad Q (About, More Tools) --- */

.faq-section {
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.faq-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: left;
}

.faq-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 16px;
    color: var(--text-color);
    margin: 0;
    line-height: 1.5;
}



/* --- Footer --- */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    color: #95a5a6;
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .tool-wrapper h2 {
        font-size: 1.8rem;
    }
}

/* ======================= NEW CODE START: SIDE ADS ======================= */

.side-ad-left,
.side-ad-right {
    position: fixed;
    top: 100px; /* Adjust this value to position ads vertically below your header */
    width: 160px; /* Standard vertical ad width */
    height: 600px; /* Standard vertical ad height */
    z-index: 10; /* Ensures ads are on top of background but below potential popups */
}

/* Position ads relative to the 900px main container */
.side-ad-left {
    /* (50% of viewport width) - (half of main container width) - (ad width) - (gap) */
    left: calc(50vw - 450px - 160px - 20px);
}

.side-ad-right {
    /* (50% of viewport width) - (half of main container width) - (ad width) - (gap) */
    right: calc(50vw - 450px - 160px - 20px);
}


/* 
  Hide ads on screens that are too narrow to fit them without overlapping content.
  Calculation: 900px (container) + 160px (left ad) + 160px (right ad) + 60px (total gaps) = 1280px.
*/
@media (max-width: 1280px) {
    .side-ad-left,
    .side-ad-right {
        display: none;
    }
}
/* ======================= NEW CODE END: SIDE ADS ======================= */