/* --- BASE STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333;
}

/* --- GRID LAYOUT (DESKTOP) --- */
.site-wrapper {
    display: grid;
    grid-template-areas:
        "header header header"
        "left-sidebar main right-sidebar"
        "left-sidebar footer right-sidebar";
    grid-template-columns: 200px 1fr 200px; /* Sidebars are 200px, main is flexible */
    grid-template-rows: auto 1fr auto;
    min-height: 100vh; /* Ensures the page is at least the height of the screen */
}

/* --- HEADER --- */
header {
    grid-area: header;
    background-color: #fcfcfc; /* Off-white */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: flex-start;
    padding: 15px;
    height: 194px;
    overflow: hidden;    /* This is the secret safety valve */
}

header img {
    height: 100%;        /* The logo will always match the header height */
    max-height: 160px;
    width: auto;         /* Maintains original aspect ratio */
}


.logo-area {
    margin-right: 30px;
}

.menu-system {
    display: flex;
    gap: 40px;
}

.menu-category {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.menu-category h3 a {
    text-decoration: none;
    color: #222;
    font-size: 16px;
    margin-bottom: 8px;
    display: block;
}

.menu-category a {
    text-decoration: none;
    color: #0056b3;
    font-size: 14px;
    margin-bottom: 5px;
}

.menu-category a:hover {
    text-decoration: underline;
}

/* --- SIDEBARS --- */
.left-sidebar {
    grid-area: left-sidebar;
    background-color: #f4f5f6; /* Slightly different off-white */
    padding: 20px;
    border-right: 1px solid #ddd;
}

.right-sidebar {
    grid-area: right-sidebar;
    background-color: #f4f5f6;
    padding: 20px;
    border-left: 1px solid #ddd;
}

.ad-space-portrait {
    width: 100%;
    height: 600px;
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    border: 1px dashed #ccc;
}

/* --- MAIN CONTENT AREA --- */
main {
    grid-area: main;
    background-color: #ffffff;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-wrapper {
    width: 100%;
    max-width: 900px; /* Confines content to 900px */
}

h1, .subtitle {
    text-align: center;
    margin-bottom: 20px;
}

.description-box {
    background-color: #f8f9fa; /* Different background for the box */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-align: center;
    margin-bottom: 30px;
}

.app-interface {
    text-align: center;
    margin-bottom: 40px;
}

.app-interface input {
    padding: 10px;
    font-size: 16px;
    width: 250px;
    margin-right: 10px;
}

.app-interface button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
}

.output-area {
    margin-top: 20px;
    min-height: 50px;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.seo-text {
    line-height: 1.6;
    color: #444;
}

/* --- FOOTER --- */
footer {
    grid-area: footer;
    background-color: #fdfdfd; /* Another new slightly different white */
    position: sticky;
    bottom: 0;
    z-index: 999;
    border-top: 1px solid #ddd;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-space-landscape {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    border: 1px dashed #ccc;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    text-decoration: none;
    color: #0056b3;
    font-size: 14px;
}

/* --- MOBILE RESPONSIVE LAYOUT (< 900px) --- */
@media (max-width: 900px) {
    .site-wrapper {
        grid-template-areas:
            "header"
            "left-sidebar"
            "main"
            "right-sidebar"
            "footer";
        grid-template-columns: 1fr; /* Single column layout */
    }
    
    .menu-system {
        flex-direction: column;
        gap: 20px;
    }
    
    .left-sidebar, .right-sidebar {
        border: none;
        border-bottom: 1px solid #ddd;
    }
}