/* =========================================
   GLOBAL RESET
========================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fa;
    color: #222222;
    line-height: 1.6;
}


/* =========================================
   HEADER
========================================= */

.site-header {
    width: 100%;
    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    position: sticky;
    top: 0;

    z-index: 1000;
}

.header-container {
    width: 100%;
    max-width: 1200px;

    min-height: 70px;

    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================
   LOGO
========================================= */

.site-logo {
    color: #111827;

    text-decoration: none;

    font-size: 24px;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================
   NAVIGATION
========================================= */

.main-nav {
    display: flex;
    align-items: center;

    gap: 8px;
}

.main-nav a {
    color: #374151;

    text-decoration: none;

    padding: 9px 14px;

    border-radius: 7px;

    font-size: 15px;
    font-weight: 500;

    transition: all 0.2s ease;
}

.main-nav a:hover {
    background: #f1f5f9;
    color: #111827;
}


/* =========================================
   MAIN AREA
========================================= */

.site-main {
    width: 100%;
}

.page-container {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    padding: 30px 20px;

    display: flex;
    align-items: flex-start;

    gap: 25px;
}


/* =========================================
   LEFT MAIN CONTENT - 70%
========================================= */

.main-content {
    width: 70%;
    min-width: 0;
}

.content-box {
    width: 100%;

    background: #ffffff;

    padding: 30px;

    border-radius: 12px;

    border: 1px solid #e5e7eb;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.content-box h1 {
    margin-bottom: 15px;

    font-size: 30px;

    line-height: 1.3;

    color: #111827;
}

.content-box p {
    margin-bottom: 15px;

    color: #4b5563;
}


/* =========================================
   PRIMARY BUTTON
========================================= */

.primary-button {
    display: inline-block;

    margin-top: 10px;

    padding: 12px 22px;

    background: #111827;
    color: #ffffff;

    text-decoration: none;

    font-size: 15px;
    font-weight: 600;

    border-radius: 8px;

    transition: all 0.2s ease;
}

.primary-button:hover {
    background: #374151;

    color: #ffffff;

    transform: translateY(-1px);
}


/* =========================================
   CALCULATOR LIST (Homepage)
========================================= */

.calculator-list {
    list-style: none;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 14px;

    margin-top: 20px;
}

.calculator-list-item a {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 16px;

    background: #f9fafb;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    text-decoration: none;
    color: #111827;

    transition: all 0.2s ease;
}

.calculator-list-item a:hover {
    background: #111827;
    color: #ffffff;

    transform: translateY(-2px);

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.calculator-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border-radius: 8px;

    background: #111827;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
    font-size: 13px;

    transition: all 0.2s ease;
}

.calculator-list-item a:hover .calculator-icon {
    background: #ffffff;
    color: #111827;
}

.calculator-info {
    min-width: 0;
}

.calculator-name {
    display: block;

    font-weight: 600;
    font-size: 15px;
}

.calculator-desc {
    display: block;

    font-size: 13px;

    color: #6b7280;

    margin-top: 2px;
}

.calculator-list-item a:hover .calculator-desc {
    color: #e5e7eb;
}


/* =========================================
   RIGHT SIDEBAR - 30%
========================================= */

.sidebar {
    width: 30%;
    min-width: 0;

    position: sticky;

    top: 95px;

    align-self: flex-start;
}

.sidebar-box {
    width: 100%;

    background: #ffffff;

    padding: 20px;

    border-radius: 12px;

    border: 1px solid #e5e7eb;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-box h2 {
    margin-bottom: 12px;

    font-size: 20px;

    color: #111827;
}

.sidebar-box p {
    color: #4b5563;

    font-size: 15px;
}


/* =========================================
   ADVERTISEMENT CONTAINER
========================================= */

.ad-container {
    width: 100%;

    min-height: 250px;

    margin-bottom: 20px;

    display: flex;

    justify-content: center;
    align-items: center;

    text-align: center;

    overflow: hidden;
}

.ad-container:last-child {
    margin-bottom: 0;
}


/* =========================================
   FOOTER
========================================= */

.site-footer {
    width: 100%;

    margin-top: 40px;

    background: #111827;

    color: #ffffff;
}

.footer-container {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    padding: 40px 20px;

    display: flex;

    gap: 50px;
}

.footer-column {
    flex: 1;
}

.footer-column h3 {
    margin-bottom: 12px;

    font-size: 18px;

    color: #ffffff;
}

.footer-column p {
    color: #d1d5db;
}

.footer-column a {
    display: block;

    color: #d1d5db;

    text-decoration: none;

    margin-bottom: 7px;

    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #374151;

    text-align: center;

    padding: 18px 20px;

    color: #9ca3af;

    font-size: 14px;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

    .page-container {
        gap: 20px;
    }

    .content-box {
        padding: 25px;
    }

    .sidebar-box {
        padding: 18px;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    /* Header */

    .header-container {
        min-height: auto;

        padding-top: 15px;
        padding-bottom: 15px;

        flex-direction: column;

        gap: 12px;
    }


    /* Navigation */

    .main-nav {
        width: 100%;

        justify-content: center;

        flex-wrap: wrap;

        gap: 4px;
    }

    .main-nav a {
        font-size: 14px;

        padding: 7px 10px;
    }


    /* Main Layout */

    .page-container {
        flex-direction: column;

        padding: 20px 15px;

        gap: 20px;
    }


    /* Main Content */

    .main-content {
        width: 100%;
    }

    .content-box {
        width: 100%;

        padding: 22px 18px;
    }

    .content-box h1 {
        font-size: 25px;
    }


    /* Calculator list on mobile: 1 column */

    .calculator-list {
        grid-template-columns: 1fr;
    }


    /* Sidebar */

    .sidebar {
        width: 100%;

        position: static;
    }

    .sidebar-box {
        width: 100%;

        padding: 18px;
    }


    /* Ads */

    .ad-container {
        width: 100%;

        min-height: 200px;

        margin-bottom: 15px;
    }


    /* Footer */

    .footer-container {
        flex-direction: column;

        gap: 25px;

        padding: 30px 20px;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    /* Logo */

    .site-logo {
        font-size: 21px;
    }


    /* Navigation */

    .main-nav {
        gap: 3px;
    }

    .main-nav a {
        font-size: 13px;

        padding: 6px 8px;
    }


    /* Page */

    .page-container {
        padding: 15px 10px;
    }


    /* Content */

    .content-box {
        padding: 18px 15px;

        border-radius: 9px;
    }

    .content-box h1 {
        font-size: 23px;
    }


    /* Sidebar */

    .sidebar-box {
        padding: 15px;

        border-radius: 9px;
    }


    /* Ads */

    .ad-container {
        min-height: 180px;
    }


    /* Footer */

    .footer-container {
        padding: 25px 15px;
    }

    .footer-bottom {
        padding: 15px 10px;

        font-size: 13px;
    }

}
