/* Custom Overrides for MubergApps */

/* 
   Sticky Top Navigation Bar 
*/

#top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 15px rgba(0,0,0,0.1);
    height: 4em;
    line-height: 4em;
    font-family: "Source Sans Pro", Helvetica, sans-serif;
}

#top-nav .inner {
    max-width: 100%;
    width: 75em;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 0 2em;
}

#top-nav .brand {
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #4696e5;
    text-decoration: none;
    font-size: 1.1em;
    white-space: nowrap;
}

#top-nav .brand:hover {
    color: #357abd;
}

#top-nav .menu {
    display: flex;
}

#top-nav .menu nav {
    display: flex;
    gap: 0;
}

#top-nav .nav-link {
    color: #555;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.75em;
    padding: 0 1.5em;
    display: inline-block;
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    white-space: nowrap;
}

#top-nav .nav-link:hover {
    color: #4696e5;
    background: rgba(70, 150, 229, 0.03);
    border-bottom-color: #4696e5;
}

/* Hamburger Toggle Button */
#nav-toggle {
    display: none; /* Hidden on Desktop */
    background: transparent;
    border: none;
    color: #4696e5;
    cursor: pointer;
    padding: 0;
    height: 3.5em;
    width: 3.5em;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: background 0.3s ease;
}

#nav-toggle span {
    display: flex;
    width: 1.5em;
    height: 1.5em;
    align-items: center;
    justify-content: center;
}

#nav-toggle span:before {
    font-size: 1.8em;
    line-height: 1;
    font-weight: 900;
}

#nav-toggle:hover, #nav-toggle.active {
    background: rgba(70, 150, 229, 0.05);
}

/* 
   Hero Header Management 
*/

body.is-not-home #header {
    display: none;
}

body.is-not-home #main-content {
    padding-top: 7em !important;
}

body.is-home #header {
    padding-top: 7em !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: left;
}

#header .content {
    text-align: right;
    margin: 0 3em 0 0 !important;
    padding: 0;
    width: auto;
    max-width: 500px;
    flex: 0 1 auto;
}

#header .image-container {
    width: 300px;
    margin: 0 !important;
    position: relative;
    flex: 0 0 300px;
}

#header .actions {
    margin-top: 2.5em;
    margin-bottom: 0;
}

/* 
   Content Styling (Markdown Output)
*/

.inner {
    color: #444;
}

.inner h1, .inner h2, .inner h3, .inner h4, .inner h5, .inner h6 {
    color: #222;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    font-weight: 700;
    line-height: 1.2;
}

.inner h1 {
    font-size: 2.8em;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.4em;
    margin-top: 0;
}

.inner h2 { 
    font-size: 2em;
    border-left: 5px solid #4696e5;
    padding-left: 0.75em;
    margin-top: 2.5em;
}

.inner h3 { font-size: 1.5em; }

.inner p {
    margin-bottom: 1.5em;
    line-height: 1.8;
    font-size: 1.15em;
}

.inner ul, .inner ol {
    margin-bottom: 1.8em;
    padding-left: 1.5em;
}

.inner li { margin-bottom: 0.7em; }

/* Enhanced Link Visibility */
.inner a {
    color: #4696e5;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(70, 150, 229, 0.2);
    transition: all 0.2s ease;
}

.inner a:hover {
    color: #357abd;
    border-bottom-color: #357abd;
    background: rgba(70, 150, 229, 0.05);
}

/* --- BUTTON STYLES --- */

.inner .app-button, .inner .button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: #4696e5 !important;
    color: #fff !important;
    padding: 0.8em 2.5em !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-size: 0.9em !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(70, 150, 229, 0.3) !important;
    margin: 1em 1.5em 1em 0 !important;
    transition: all 0.3s ease !important;
    vertical-align: middle;
}

.inner .app-button:hover, .inner .button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(70, 150, 229, 0.4) !important;
    background-color: #357abd !important;
}

.inner a[href*="buymeacoffee"] {
    background-color: #FFDD00;
    color: #000 !important;
    border-bottom: none !important;
    padding: 0.8em 2em;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 221, 0, 0.3);
}

.inner a[href*="buymeacoffee"]:hover {
    background-color: #FFC700 !important;
    transform: translateY(-2px);
}

/* --- BADGES --- */

.badge-live, .badge-soon {
    font-size: 0.5em;
    vertical-align: middle;
    padding: 0.3em 0.8em;
    border-radius: 4px;
    margin-left: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
}

.badge-live { background-color: #2a4a3a; color: #fff; }
.badge-soon { background-color: #e8a462; color: #fff; }

/* --- SECTION SEPARATORS --- */

.inner hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 4em 0;
}

/* --- FLOATING SCREENSHOTS --- */

.inner img.image-right, 
.inner img.image-left {
    max-width: 220px !important;
    height: auto;
    margin-top: 0;
    margin-bottom: 1em;
    border: 8px solid #ffffff !important;
    outline: 1px solid #ddd !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    z-index: 10;
}

.inner img.image-right { float: right; margin-left: 2em; }
.inner img.image-left { float: left; margin-right: 2em; }

.inner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2em 0;
}

.inner pre {
    background: #272822;
    color: #f8f8f2;
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 2em;
}

/* --- SPOTLIGHT IMPROVEMENTS --- */

.spotlight { margin-bottom: 4em !important; }

.spotlight .image {
    width: 25% !important;
    min-width: 200px;
    border-radius: 0 !important;
    background: transparent !important;
}

.spotlight .image:before, .spotlight .image:after {
    display: none !important;
}

.spotlight .image img {
    border: 6px solid #fff !important;
    border-radius: 15px !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    width: 100% !important;
    height: auto !important;
}

.spotlight .content {
    width: 75% !important;
    padding: 2em 0 2em 4em !important;
}

.spotlight:nth-child(2n) .content {
    padding: 2em 4em 2em 0 !important;
}

/* --- HERO IMAGE ROTATION --- */

.hero-slider {
    position: relative;
    width: 100%;
    overflow: visible;
    display: block;
}

.hero-slider img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: block;
    border: 8px solid #ffffff;
    outline: 1px solid #ddd;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.hero-slider img:first-child {
    position: relative !important;
}

/* 3-image cycle */
.hero-slider img:nth-child(1) { animation: fadeImg1 15s infinite; }
.hero-slider img:nth-child(2) { animation: fadeImg2 15s infinite; }
.hero-slider img:nth-child(3) { animation: fadeImg3 15s infinite; }

@keyframes fadeImg1 { 0%, 28% { opacity: 1; } 33%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fadeImg2 { 0%, 28% { opacity: 0; } 33%, 61% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes fadeImg3 { 0%, 61% { opacity: 0; } 66%, 95% { opacity: 1; } 100% { opacity: 0; } }

/* 
   RESPONSIVE OVERRIDES (Hardened)
   Targeting everything from Tablet down to Phone.
*/
@media screen and (max-width: 980px) {
    
    #top-nav {
        height: 3.5em;
        line-height: 3.5em;
    }

    #top-nav .inner {
        padding: 0 1.5em;
        width: 100%;
    }

    #top-nav .brand { font-size: 0.95em; }

    /* Show Hamburger for all mobile/tablet */
    #nav-toggle {
        display: flex !important;
    }

    /* Hide menu by default */
    #top-nav .menu {
        display: none;
        position: absolute;
        top: 3.5em;
        left: 0;
        width: 100%;
        background: #fff;
        margin: 0;
        padding: 1em 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        z-index: 10001;
    }

    #top-nav .menu.is-visible {
        display: block;
    }

    #top-nav .menu nav {
        flex-direction: column;
        align-items: center;
    }

    #top-nav .nav-link {
        width: 100%;
        text-align: center;
        line-height: 3.5em;
        border: none;
        font-size: 0.85em;
        padding: 0;
    }

    /* Hero Management - SWITCHED TO LEFT-ALIGN */
    #header { 
        padding-top: 6em !important; 
        padding-bottom: 3em !important;
        flex-direction: column !important; 
        text-align: left !important;
        height: auto !important;
        min-height: auto !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
    
    #header .content { 
        text-align: left !important; 
        margin: 0 0 3em 0 !important; 
        max-width: 100%; 
        padding: 0 1.5em;
    }

    #header .image-container {
        width: 180px;
        flex: 0 0 180px;
        margin: 0 0 0 1.5em !important; /* Left aligned with text */
    }

    /* Button Spacing */
    .inner .app-button, .inner .button {
        width: 100% !important;
        margin: 0 0 1em 0 !important;
    }

    /* Spotlight (Apps Page) - SWITCHED TO LEFT-ALIGN */
    .spotlight { 
        flex-direction: column !important; 
        align-items: flex-start !important;
    }
    .spotlight .image { 
        width: 180px !important; 
        max-width: 180px !important; 
        margin: 0 0 2em 1.5em !important; 
    }
    .spotlight .content { 
        width: 100% !important; 
        padding: 0 1.5em !important; 
        text-align: left !important; 
    }
    
    /* Internal Page Spacing */
    body.is-not-home #main-content { padding-top: 8em !important; }
    
    /* Floating Screenshots (Internal Pages) */
    .inner img.image-right, .inner img.image-left { 
        float: none !important; 
        max-width: 200px !important; 
        margin: 1em 0 2em 0 !important; 
        display: block !important; 
    }

    /* Footer Layout - Sitemap Style */
    #footer .sitemap {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2em;
    }

    #footer .sitemap-col {
        width: 100%;
    }

    #footer .footer-links {
        flex-direction: column;
        gap: 0.8em;
    }
}

/* Footer Sitemap Styling */
#footer .sitemap {
    display: flex;
    justify-content: space-between;
    max-width: 60em;
    margin: 0 auto 3em auto;
    text-align: left;
    gap: 3em;
}

#footer .sitemap-col {
    flex: 1;
}

#footer .sitemap-col h4 {
    color: #222;
    font-size: 0.8em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5em;
    border-bottom: 2px solid rgba(70, 150, 229, 0.1);
    padding-bottom: 0.5em;
    display: inline-block;
}

#footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}

#footer .footer-links li {
    padding: 0;
}

#footer .footer-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85em;
    text-transform: none;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

#footer .footer-links a:hover {
    color: #4696e5;
}

