/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BODY ===== */
body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

/* ===== HEADER ===== */
.header {
    padding: 15px 30px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}

.logo span {
    color: #2563eb;
}

/* ===== MEGA MENU ===== */
.mega-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

/* ===== MENU ITEM ===== */
.menu-item {
    position: relative;
    padding: 10px 18px;
    background: #f1f5f9;
    border-radius: 25px;
    cursor: pointer;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s ease;

    /* IMPORTANT: prevents dropdown gap */
    padding-bottom: 15px;
}

.menu-item:hover {
    background: #2563eb;
    color: white;
}

/* ===== DROPDOWN ===== */
.mega-dropdown {
    position: absolute;
    top: 100%; /* NO GAP */
    left: 50%;
    transform: translateX(-50%);

    background: #ffffff;
    border-radius: 12px;
    padding: 15px;

    /* GRID */
    display: none;
    grid-template-columns: repeat(2, 160px);
    gap: 10px;

    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    z-index: 999;

    opacity: 0;
    transition: opacity 0.2s ease;
}

/* SHOW DROPDOWN */
.menu-item:hover .mega-dropdown {
    display: grid;
    opacity: 1;
}

/* ===== DROPDOWN LINKS ===== */
.mega-dropdown a {
    display: block;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    text-decoration: none;
    transition: 0.2s ease;
}

.mega-dropdown a:hover {
    background: #2563eb;
    color: white;
}

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    max-width: 1300px;
    margin: auto;
    gap: 20px;
    padding: 20px;
}

/* ===== MAIN ===== */
.main {
    flex: 3;
}

/* ===== SIDEBAR ===== */
.sidebar {
    flex: 1;
}

/* ===== ADS ===== */
.ad {
    margin: 20px 0;
    padding: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
}

/* ===== CALCULATOR ===== */
.calculator {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

/* ===== TITLE ===== */
#title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* ===== IFRAME ===== */
iframe {
    width: 100%;
    height: 650px;
    border: none;
    border-radius: 12px;
    background: #f8fafc;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    margin-top: 30px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        order: -1;
    }
}