/*mainstyle.css
Style for main pages of site
Created by: Duncan Standish
Created on: 31/12/2025
*/

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #83c3e9b6; 
    padding-left: 0;
}

header#toptitle {
    background-color: #2c3e50; 
    color: #ecf0f1;        
    height: 38.6vh;            
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
}

header#toptitle h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

header#toptitle h2 {
    font-size: 1.5rem;
    font-weight: 300;
    max-width: 800px;
    margin-top: 0.8rem;
}

.subtitle {
    margin-top: 1rem;
    font-style: italic;
    opacity: 0.8;
}

h2.central-subtitle {
    color: #000000;
    font-size: 1.25rem; 
    font-weight: 500;   
    margin-top: -0.3rem;  
    margin-bottom: 2rem; 
    
    /* maybe enable */
     border-bottom: 1px solid #eee; 
    padding-bottom: 1rem;
}

h3#githublink {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 0.5rem;
}

h3#githublink a {
    color: #7a8788;        
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none; 
    
    display: inline-block;   
    transition: transform 0.2s ease, color 0.2s ease;
}

h3#githublink a:hover {
    transform: scale(1.1);   
    color: #2c3e50;     
}

/*NAVBAR STYLE*/

nav#navigationbar {
    position: fixed;
    top: 0;
    
    /*navbar hide*/
    width: 250px;          
    left: -200px;          
    
    height: 100vh;
    background-color: #f8f9fa; 
    border-right: 1px solid #ccc; 
    
    /* slide animation */
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    z-index: 2000; 

    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

nav#navigationbar:hover {
    left: 0; 
    box-shadow: 10px 0 30px rgba(0,0,0,0.2); 
}

nav#navigationbar::after {
    content: "MENU";
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #fff;
    font-size: 15px;
    font-weight: bolder;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background-color: #2c3e50; 
    cursor: pointer;
    transition: opacity 0.3s;
}

nav#navigationbar:hover::after {
    opacity: 0; 
    pointer-events: none;
}

nav#navigationbar ul {
    list-style-type: none;
    width: 100%;
}

nav#navigationbar h3 {
    color: #95a5a6;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 0.5rem;
}

nav#navigationbar a {
    color: #2c3e50;   
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none; 
    display: block;       
    padding: 0.5rem 0;    
    margin-bottom: 1rem;
    
    transition: transform 0.2s ease, color 0.2s ease;
}

nav#navigationbar a:hover {
    color: #3498db;       
    transform: translateX(10px); 
}
.central-card, .media-container {
    background-color: #ffffff;
    width: 90%;
    max-width: 900px;        
    margin: 2rem auto; 
    padding: 3rem;           
    border-radius: 8px;      
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    text-align: center;
    position: relative;
}

/*SUBMENU STYLE*/

ul.submenu {
    padding-left: 0;    
    max-height: 0;
    opacity: 0;
    visibility: hidden; 
    overflow: hidden;  
    margin-bottom: 0;
    transition: 
        all 0.3s ease-in-out 2s,
        opacity 0.3s ease-in-out 2s; 
}

nav#navigationbar li:hover > ul.submenu {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
    margin-bottom: 1rem; 
    transition-delay: 0.1s;
}

nav#navigationbar ul.submenu a {
    color: #2c3e50;       
    font-size: 1.0rem;  
    font-weight: 500;  
    padding-left: 1.5rem; 
    margin-bottom: 0.5rem;
    border-left: 3px solid #e1e4e8; 
}

nav#navigationbar ul.submenu a:hover {
    color: #3498db;       
    border-left-color: #3498db; 
    transform: translateX(5px);
    background-color: rgba(52, 152, 219, 0.05);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

nav#navigationbar ul.submenu ul.submenu a {
    padding-left: 3.5rem; 
    border-left: none; 
    font-size: 0.9rem; 
}

nav#navigationbar ul.submenu li:hover > ul.submenu {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
    margin-bottom: 0.5rem;
    transition-delay: 0.1s; 
}

nav#navigationbar ul.submenu ul.submenu a:hover {
    border-left: none;
    background-color: transparent;
}

/* Mobile */
@media (max-width: 768px) {
    
    body {
        padding-left: 0;
    }

    nav#navigationbar {
        width: 100%;
        height: auto;
        bottom: 0;
        top: auto;
        left: 0;
        border-right: none;
        border-top: 1px solid #ddd;
        flex-direction: row; 
        background-color: #fff;
        padding: 1rem;
    }

    nav#navigationbar h3 {
        display: none;
    }
    
    nav#navigationbar ul {
        display: flex;
        width: 100%;
        justify-content: space-around;
    }

    nav#navigationbar a {
        margin-bottom: 0; 
        font-size: 0.9rem;
    }

    nav#navigationbar::after {
        display: none;
    }

    .central-card,
    .media-container {
        width: 95%; 
        margin: 1rem auto;
        padding: 1.5rem;
        margin-bottom: 100px; 
    }

    ul.submenu {
        max-height: 0 !important;
        opacity: 0 !important;
        margin: 0 !important;
        display: none !important;
    }
}
