:root {
    --BoarderOfIsland: 10%;

    --SubContainerPadding: 1%;
    --SubContainer-Sub-Margin-Sides: 5%;

    --DropShadownInsetSettings: inset 0px 0px 20px;
    --DropShadownPopOutSettings: 0px 0px 20px;
    --DropShadowColor: 0, 0, 0; /* rgb values */
    --DropShadowOpacity: 0; /* alpha channel value between 0 to 1 */

    --BackgroundColor: #ffffff;
    --PrimaryColour: #ffffff;
    --SecondaryColour: rgba(216, 216, 216, 0);
    --AccentColour: rgba(216, 216, 216, 0);
    --TextColour: #000000;

    --BaseColor: #007cae; /* Base blue color */
    --InteractedColor: #005ea3; /* Interacted blue color */

    --SelectColour: var(--BaseColor);
    --HeaderFooterBorderRadius: 1vh;
    --HeaderBackgroundColor: var(--BaseColor);
    --ButtonColor: var(--BaseColor);
    --ButtonHoverColor: var(--InteractedColor);
    --ButtonActiveColor: #004080; /* Even darker blue on active */
    --ShadowOpacity: 0.4; /* Default shadow opacity */
    --ShadowHoverOpacity: 0.6; /* Shadow opacity on hover */

    --LinkPadding: 8px 12px;
    --LinkMargin: 0 2vh;
    --BorderRadius: 5px;

    --ShowAdsOnMobile: block; /* Change to 'none' to hide ads on mobile */
    --AdColumnHeightMobile: 5vh; /* Set to '0' to hide ads on mobile */
    --AdColumnMarginBottomMobile: 1rem; /* Set to '0' to hide ads on mobile */
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
}

/* Header Styles */
.header {
    width: 100%;
    height: 60px;
    padding: 1vh;
    background-color: var(--HeaderBackgroundColor);
    border-radius: 0 0 var(--HeaderFooterBorderRadius) var(--HeaderFooterBorderRadius);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(var(--DropShadowColor), var(--ShadowOpacity));
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 10px;
}

.menu-item {
    position: relative;
    display: inline-block;
}

.submenu {
    position: relative;
    display: inline-block;
    color: black;
    background-color: white;
}

.submenu:hover {
    background-color: var(--ButtonColor);
    color: white; /* Text color on hover */
}

.invertedColours{
    background-color: var(--ButtonColor) !important;
    color: white !important; /* Text color on hover */
}

.invertedColours:hover{
    color: var(--ButtonColor) !important;
    background-color: white !important;
}

.dropdown-btn {
    background-color: white; /* Match the submenu background color */
    color: black; /* Match the submenu text color */
    border: none;
    cursor: pointer;
    width: 15vh;
    height: 4vh;
    font-family: 'Roboto', sans-serif;
}

.dropdown-btn:hover {
    background-color: var(--ButtonColor); /* Match the submenu hover background color */
    color: white; /* Match the submenu hover text color */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    box-shadow: 0 8px 16px rgba(var(--DropShadowColor), 0.2);
    z-index: 1;
    min-width: 10vh;
}

.dropdown-content a {
    color: black; /* Keep non-hover state the same */
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: center;
}

.dropdown-content a:hover {
    background-color: var(--ButtonColor); /* Blue background on hover */
    color: white; /* White text on hover */
}

.menu-item:hover > .dropdown-content,
.submenu:hover > .dropdown-content {
    display: block;
}

.submenu .dropdown-content {
    left: 100%;
    top: 0;
}

.right .dropdown-content {
    right: 0;
}

.right .submenu .dropdown-content {
    right: 100%;
    left: auto;
    top: 0;
}

/* Title in header */
.title {
    flex-grow: 1;
    text-align: center;
    font-size: 2.5vw; /* Responsive font size */
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;

    text-decoration: none;
}

.title img {
    margin-right: 10px;
    height: auto;
    max-height: 40px;
    filter: invert(1); /* Invert colors */
}

/* Content Styles */
.content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    padding: 1rem; /* Add padding to ensure content is not flush against the edge */
    position: relative;
}

.content::before {
    content: '';
    background: url('../Images/bg.webp') repeat;
    background-size: 20vh;
    opacity: 0.15;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: -1;
}

.AdColumn {
    width: 15%;
}

.HorizontalAdSpace {
    min-height: 5vh;
    width: 100%;
    flex-grow: 1;
}

.ContentColumn {
    flex: 1;
    width: 70%;
    display: flex;
    flex-direction: column;
}

/* SubContainer and related elements */
.SubContainer {
    background-color: var(--PrimaryColour);
    border-radius: .5vh;
    padding: .5vh;
    box-shadow: var(--DropShadownPopOutSettings) rgba(var(--DropShadowColor), 1);
    height: auto;
    width: 100%;
}

.SubContainer .Main {
    text-align: center;
    background-color: var(--AccentColour);
    padding: var(--SubContainerPadding);
    border-radius: 1.25vh;
    box-shadow: var(--DropShadownPopOutSettings) rgba(var(--DropShadowColor), var(--DropShadowOpacity));
}

.SubContainer .Main h3, .SubContainer .Main h4 {
    margin: 0;
    text-align: center;
    color: var(--TextColour);
    font-family: 'Roboto', sans-serif;
}

.SubContainer .Main h3 {
    font-size: 2vh;
}

.SubContainer .Main h4 {
    font-size: 1.5vh;
}

.SubContainer .Sub {
    background-color: var(--SecondaryColour);
    margin-left: var(--SubContainer-Sub-Margin-Sides);
    margin-right: var(--SubContainer-Sub-Margin-Sides);
    border-radius: 10px;
    padding: 0.5%;
    box-shadow: var(--DropShadownInsetSettings) rgba(var(--DropShadowColor), var(--DropShadowOpacity));
}

.SubContainer .Sub p {
    margin: 0;
    text-align: center;
    font-size: 1vh;
}

.Divider {
    margin: 1% 0;
    height: .25%;
    background-color: rgba(255, 0, 0, 0);
    width: 100%;
    border-radius: 10%;
}

/* Button styles */
#ConvertButton {
    background-color: var(--ButtonColor);
    color: var(--TextColour);
    padding: 15px 30px;
    font-size: 1em;
    border: none;
    border-radius: var(--BorderRadius);
    box-shadow: 0 4px 10px rgba(var(--DropShadowColor), var(--ShadowOpacity));
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: block;
    margin: 0 auto;
}

#ConvertButton:hover {
    background-color: var(--ButtonHoverColor);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(var(--DropShadowColor), var(--ShadowHoverOpacity));
}

#ConvertButton:active {
    background-color: var(--ButtonActiveColor);
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(var(--DropShadowColor), var(--ShadowOpacity));
}

/* Footer styles */
.footer {
    background-color: var(--BaseColor);
    padding: 20px;
    text-align: center;
    box-shadow: 0 -4px 10px rgba(var(--DropShadowColor), var(--ShadowOpacity));
    color: var(--PrimaryColour);
    border-radius: var(--HeaderFooterBorderRadius) var(--HeaderFooterBorderRadius) 0 0;
    width: 100%;
}

.footer-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding-bottom: 20px;
}

.footer-section {
    margin: 10px;
    min-width: 180px;
}

.footer-section h3 {
    margin-bottom: 10px;
    border-bottom: 2px solid var(--PrimaryColour);
    padding-bottom: 5px;
    font-size: 1.6em;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin: 5px 0;
}

.footer-section li a {
    color: var(--PrimaryColour);
    background-color: var(--ButtonColor);
    text-decoration: none;
    padding: var(--LinkPadding);
    margin: var(--LinkMargin);
    border-radius: var(--BorderRadius);
    display: block;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.9em;
    box-shadow: 0 4px 10px rgba(var(--DropShadowColor), var(--ShadowOpacity));
}

.footer-section li a:hover {
    background-color: var(--ButtonHoverColor);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(var(--DropShadowColor), var(--ShadowHoverOpacity));
}

.footer-section li a:active {
    background-color: var(--ButtonActiveColor);
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(var(--DropShadowColor), var(--ShadowOpacity));
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #cccccc;
    gap: 10px;
}

.footer-row a {
    color: var(--PrimaryColour);
    background-color: var(--ButtonColor);
    text-decoration: none;
    padding: var(--LinkPadding);
    border-radius: var(--BorderRadius);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.9em;
    box-shadow: 0 4px 10px rgba(var(--DropShadowColor), var(--ShadowOpacity));
}

.footer-row a:hover {
    background-color: var(--ButtonHoverColor);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(var(--DropShadowColor), var(--ShadowHoverOpacity));
}

.footer-row a:active {
    background-color: var(--ButtonActiveColor);
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(var(--DropShadowColor), var(--ShadowOpacity));
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .header {
        height: 50px;
    }

    .title {
        font-size: 4vw; /* Increase font size for smaller screens */
    }

    .navbar .dropdown-btn {
        width: 12vh;
        height: 3vh;
    }

    .content {
        flex-direction: column;
    }

    .ContentColumn {
        width: 90%;
        max-width: none;
        margin: 0 auto;
    }

    .AdColumn {
        width: 100%;
        max-width: none;
        display: var(--ShowAdsOnMobile);
        min-height: var(--AdColumnHeightMobile);
        margin-bottom: var(--AdColumnMarginBottomMobile);
    }

    .footer-section {
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .header {
        height: 40px;
    }

    .title {
        font-size: 5vw; /* Further increase font size for very small screens */
    }

    .navbar .dropdown-btn {
        width: 10vh;
        height: 3vh;
    }

    .footer-sections {
        flex-direction: column;
        align-items: center;
    }

    .footer-section {
        margin: 5px;
        min-width: 80px;
    }

    .footer-row {
        flex-direction: column;
    }

    .footer-row a {
        margin-bottom: 10px;
    }

    .AdColumn {
        width: 100%;
        max-width: none;
        display: var(--ShowAdsOnMobile);
        min-height: var(--AdColumnHeightMobile);
        margin-bottom: var(--AdColumnMarginBottomMobile);
    }
}


/* Article Styles */
article {
    background-color: var(--PrimaryColour);
    border-radius: var(--BorderRadius);
    padding: 1rem;
    margin: 1.5rem auto;
    color: var(--TextColour);
    width: 80%;
    max-width: 800px;
}

article h2 {
    font-size: 1.8vh;
    color: var(--BaseColor);
    margin-bottom: 0.5rem;
    font-family: 'Roboto', sans-serif;
    text-align: center;
}

article h3 {
    font-size: 1.5vh;
    color: var(--InteractedColor);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-family: 'Roboto', sans-serif;
    text-align: center;
}

article p {
    font-size: 1.2vh;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-family: 'Roboto', sans-serif;
    text-align: justify;
}

article ul {
    margin: 1rem auto;
    padding-left: 1rem;
    list-style-type: disc;
    width: 90%;
}

article ul li {
    font-size: 1.2vh;
    margin-bottom: 0.5rem;
    font-family: 'Roboto', sans-serif;
}

article ul li strong {
    color: var(--BaseColor);
}

article a {
    color: var(--BaseColor);
    text-decoration: none;
    transition: color 0.3s ease;
}

article a:hover {
    color: var(--InteractedColor);
}

article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

article table th, article table td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: center;
    font-size: 1.2vh;
}

article table th {
    background-color: var(--BaseColor);
    color: white;
}

article table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

article table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

article blockquote {
    border-left: 4px solid var(--BaseColor);
    padding-left: 1rem;
    margin: 1rem 0;
    font-size: 1.2vh;
    color: #555;
    background-color: #f9f9f9;
}

article blockquote p {
    margin: 0.5rem 0;
}

article p, article ul, article li {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
