/* Navbar container */
.nav-container {
    margin-top: 20px;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    border-radius: 10px;
    padding: 10px;
}

/* Remove bullets from lists */
.right-side, .left-side {
    list-style-type: none;
}

/* Inline list items */
.right-side li, .left-side li {
    display: inline-block;
}

.left-side {
    display: flex;
    align-items: center;
}

/* Theme icon colors */
.my-light-mode .mode-toggle-button svg {
    color: #ebebeb;
}
.my-dark-mode .mode-toggle-button svg {
    color: #000000;
}

/* LinkedIn icon colors */
.my-light-mode #Linkedin-icon { filter: brightness(0) invert(1); }
.my-dark-mode #Linkedin-icon { filter: brightness(0); }

/* Icon sizing */
.nav-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

/* ENHANCED: Zimbabwe flag with water ripple effect for navbar */
#Zimflag {
    width: 30px;
    height: auto;
    max-height: 24px;
    object-fit: contain;
    animation: waterRipple 3s ease-in-out infinite;
    transform-origin: left center;
}

/* Water-like ripple animation for navbar flag */
@keyframes waterRipple {
    0% { transform: scaleX(1) scaleY(1) skewX(0deg); filter: hue-rotate(0deg) brightness(1); }
    16% { transform: scaleX(0.98) scaleY(1.02) skewX(1deg); filter: hue-rotate(2deg) brightness(1.05); }
    33% { transform: scaleX(1.02) scaleY(0.98) skewX(-1deg); filter: hue-rotate(-2deg) brightness(0.95); }
    50% { transform: scaleX(0.99) scaleY(1.01) skewX(2deg); filter: hue-rotate(3deg) brightness(1.1); }
    66% { transform: scaleX(1.01) scaleY(0.99) skewX(-1deg); filter: hue-rotate(-1deg) brightness(0.9); }
    83% { transform: scaleX(0.98) scaleY(1.02) skewX(1deg); filter: hue-rotate(1deg) brightness(1.05); }
    100% { transform: scaleX(1) scaleY(1) skewX(0deg); filter: hue-rotate(0deg) brightness(1); }
}

/* Enhanced water ripple on hover for navbar flag */
#Zimflag:hover {
    animation: waterRippleIntense 2s ease-in-out infinite;
}

@keyframes waterRippleIntense {
    0% { transform: scaleX(1) scaleY(1) skewX(0deg); filter: brightness(1) saturate(1); }
    12% { transform: scaleX(0.95) scaleY(1.05) skewX(2deg); filter: brightness(1.15) saturate(1.1); }
    25% { transform: scaleX(1.05) scaleY(0.95) skewX(-2deg); filter: brightness(0.85) saturate(0.9); }
    37% { transform: scaleX(0.97) scaleY(1.03) skewX(3deg); filter: brightness(1.2) saturate(1.2); }
    50% { transform: scaleX(1.03) scaleY(0.97) skewX(-1deg); filter: brightness(0.8) saturate(0.8); }
    62% { transform: scaleX(0.98) scaleY(1.02) skewX(2deg); filter: brightness(1.1) saturate(1.1); }
    75% { transform: scaleX(1.02) scaleY(0.98) skewX(-3deg); filter: brightness(0.9) saturate(0.9); }
    87% { transform: scaleX(0.99) scaleY(1.01) skewX(1deg); filter: brightness(1.05) saturate(1.05); }
    100% { transform: scaleX(1) scaleY(1) skewX(0deg); filter: brightness(1) saturate(1); }
}

/* Mode toggle button */
.mode-toggle-button {
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.mode-toggle-button:hover {
    background-color: rgba(56, 161, 105, 0.1);
}

.mode-toggle-button a {
    color: transparent !important;
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Light and Dark mode */
.my-light-mode {
    color: #ebebeb;
    background-color: #292524;
}
.my-dark-mode {
    color: #000000;
    background-color: #e7e5e4;
}

body {
    font-family: 'Noto Serif', serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Headings */
h1 { font-weight: 700 !important; line-height: 72px !important; font-size: 57px !important; }
h2 { font-weight: 700 !important; line-height: 60px !important; font-size: 50px !important; }
h3 { font-weight: 700 !important; line-height: 64px !important; font-size: 40px !important; }
h4 { font-weight: 550 !important; line-height: 50px !important; font-size: 28px !important; }
h5 { font-weight: 400 !important; line-height: 32px !important; font-size: 24px !important; }
h6 { font-weight: 400 !important; line-height: 24px !important; font-size: 20px !important; }

p { font-weight: 400 !important; font-size: 16px !important; line-height: 24px !important; }

/* ENHANCED: Sections with better styling */
.intro-section { 
    display: flex; 
    flex-wrap: wrap; 
    margin-top: 40px;
    min-height: 70vh;
    align-items: center;
}

.content { 
    flex: 1; 
    max-width: 600px;
}

.empty-space { 
    flex: 1; 
}

.about-paragraph { 
    margin-top: 30px; 
    font-size: 18px !important;
    line-height: 28px !important;
    opacity: 0.9;
}

/* ENHANCED: Header styling */
.header h2 {
    margin-bottom: 20px;
}

.sub-header h4 {
    margin-bottom: 20px;
    opacity: 0.8;
}

/* ENHANCED: Quiz button with modern styling */
.Quiz {
    background: linear-gradient(135deg, #38A169, #2F855A);
    border-radius: 50px;
    padding: 15px 35px;
    margin-top: 40px;
    color: white;
    border: none;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.3);
    position: relative;
    overflow: hidden;
}

.Quiz:hover {
    background: linear-gradient(135deg, #2F855A, #276749);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.4);
}

.Quiz::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.Quiz:hover::before {
    left: 100%;
}

/* ENHANCED: Footer styling */
.footer { 
    margin-top: 80px; 
    color: #F6AD55;
    padding: 30px 0;
}

.footer-top { 
    background-color: #c7c5c5; 
    padding: 1px; 
    margin-bottom: 20px; 
}

.footer-item {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-item a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.footer-item a:hover {
    color: #38A169;
    background-color: rgba(56, 161, 105, 0.1);
}

/* ENHANCED: Zimbabwe flag with pole-fixed flutter effect for main content */
.flag {
    width: 400px;
    height: 250px;
    overflow: hidden;
    position: relative;
    margin: 50px auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transform-origin: left center;
    border-radius: 8px;
}

.flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: left center;
    animation: flutter 2.5s ease-in-out infinite;
}

/* Enhanced shimmer overlay for sunlight effect */
.flag::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(0,0,0,.15) 0%, 
        rgba(255,255,255,.25) 15%, 
        rgba(0,0,0,.15) 30%, 
        rgba(255,255,255,.25) 45%, 
        rgba(0,0,0,.15) 60%, 
        rgba(255,255,255,.25) 75%, 
        rgba(0,0,0,.15) 90%);
    pointer-events: none;
    border-radius: 8px;
}

/* Enhanced keyframes for realistic flutter */
@keyframes flutter {
    0%   { transform: rotateY(0deg) translateX(0px) scaleY(1); filter: brightness(1); }
    10%  { transform: rotateY(2deg) translateX(3px) scaleY(0.98); filter: brightness(1.05); }
    20%  { transform: rotateY(-3deg) translateX(6px) scaleY(1.02); filter: brightness(0.95); }
    30%  { transform: rotateY(3deg) translateX(9px) scaleY(0.97); filter: brightness(1.1); }
    40%  { transform: rotateY(-2deg) translateX(12px) scaleY(1.03); filter: brightness(0.9); }
    50%  { transform: rotateY(2deg) translateX(9px) scaleY(0.98); filter: brightness(1.05); }
    60%  { transform: rotateY(-3deg) translateX(6px) scaleY(1.02); filter: brightness(0.95); }
    70%  { transform: rotateY(3deg) translateX(3px) scaleY(0.97); filter: brightness(1.1); }
    80%  { transform: rotateY(-2deg) translateX(1px) scaleY(1.01); filter: brightness(0.95); }
    90%  { transform: rotateY(1deg) translateX(0px) scaleY(0.99); filter: brightness(1.02); }
    100% { transform: rotateY(0deg) translateX(0px) scaleY(1); filter: brightness(1); }
}

/* ENHANCED: Mobile responsiveness */
@media (max-width: 768px) {
    .content { 
        flex: 0 0 100%; 
        text-align: center;
        padding: 0 20px;
    }
    .empty-space { display: none; }
    
    .nav-icon { width: 20px; height: 20px; }
    #Zimflag { width: 26px; max-height: 20px; }
    #Linkedin-icon { width: 20px; height: 20px; }
    .nav-container { padding: 8px; }
    
    .flag { width: 300px; height: 187px; margin: 30px auto; }
    
    .Quiz {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .footer-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-icon { width: 18px; height: 18px; }
    #Zimflag { width: 24px; max-height: 18px; }
    #Linkedin-icon { width: 18px; height: 18px; }
    .mode-toggle-button { padding: 3px; margin-left: 3px; }
    
    .flag { width: 250px; height: 156px; }
    
    .intro-section {
        margin-top: 20px;
        min-height: 60vh;
    }
    
    h2 {
        font-size: 36px !important;
        line-height: 42px !important;
    }
    
    h4 {
        font-size: 22px !important;
        line-height: 28px !important;
    }
    
    .about-paragraph {
        font-size: 16px !important;
        line-height: 24px !important;
    }
    
    .Quiz {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* Theme transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ENHANCED: Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* ENHANCED: Focus states for accessibility */
.Quiz:focus,
.mode-toggle-button:focus {
    outline: 2px solid #38A169;
    outline-offset: 2px;
}

/* ENHANCED: Loading animation for flag */
.flag {
    opacity: 0;
    animation: fadeInFlag 1s ease-in-out 0.5s forwards, flutter 2.5s ease-in-out 1.5s infinite;
}

@keyframes fadeInFlag {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}