/* Ensure the page takes up the full height of the viewport */
html {
    height: 100%;
}
body {
    font-family: 'Marianne', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to right, #f0f0f0, #e0e0e0);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header styling */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 30px;
    background-color: white;
    color: whitesmoke;
}

.logo-container img, .sesar-logo img {
    height: 80px;
}

/* Navigation styling */
nav ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    background-color: #005599;
    padding: 10px;
    margin: auto;
}

nav ul li {
    margin: 0 15px;
}

.nav-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: whitesmoke;
    transition: transform 0.3s ease;
}

.nav-link img {
    height: 30px;
    margin-right: 5px;
}

.nav-link:hover {
    transform: translateY(-5px);
}

/* Main content styling */
main {
    flex: 1; /* Takes up remaining space, pushing footer to bottom */
    position: relative;
    overflow: hidden;
    text-align: center;
    align-items: center;    
}

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('./images/backdrop.jpg') no-repeat center center;
    background-size: cover;
    filter: blur(5px);
    z-index: -1;
}

.welcome {
    position: relative;
    z-index: 1;
    color: whitesmoke;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.welcome h1 {
    margin-bottom: 10px;
}

.welcome p {
    font-weight: thin;
    font-size: 1.0em;
}

/* Cards section styling */
.cards {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    opacity: 0.8;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card-home {
    flex: 1;
    max-width: 200px;
    min-height: 250px;
    min-width: 180px;
    background: linear-gradient(to bottom, whitesmoke 30%, rgba(245, 245, 245, 0.5) 30%); /* Upper half whitesmoke, lower half 50% transparent */
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin: 0 15px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.card-home:hover {
    transform: translateY(-5px);
}

.card-home img {
    height: 50px;
    margin-bottom: 10px;
}

.card-home h2 {
    font-size: 1.6em;
    margin-top: 40px;
    margin-bottom: 10px;
    color: #1f1e1e;
    text-align: center; /* Ensure text is centered */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Add text shadow for contrast */
}
.card-status {
    width: 200px; /* Fixed width */
    min-height: 240px;
    background: linear-gradient(to bottom, whitesmoke 30%, rgba(245, 245, 245, 0.5) 30%);
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin: 0 15px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.card-status img {
    height: 55px;
    margin-bottom: 10px;
}

.card-status h2 {
    font-size: 2.0em;
    margin-top: 40px;
    margin-bottom: 10px;
    color: #1f1e1e;
    text-align: center; /* Ensure text is centered */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Add text shadow for contrast */
}

.card-status.green {
    border-top: 4px solid #4CAF50; /* Green border for OK */
}
.card-status.yellow {
    border-top: 4px solid #FF9800; /* Yellow-orange border for Degraded */
}
.card-status.red {
    border-top: 4px solid red;
}
.card-status.grey {
    border-top: 4px solid grey;
}
.card-status.green h2 {
    color: #4CAF50; /* Green text for OK */
}
.card-status.yellow h2 {
    color: #FF9800; /* Yellow-orange text for Degraded */
}
.card-status.red h2 {
    color: red;
}
.card-status.grey h2 {
    color: grey;
}

.card-home p {
    font-size: 1em;
    color: #1f1e1e;
}

/* Service Status Toolbar Links */
.disabled-link {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
    color: #999 !important;
}

.disabled-link img {
    filter: grayscale(100%);
    opacity: 0.5;
}



/* Compliance section styling */
.compliance {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    opacity: 0.8;
    position: relative; /* Ensure the pseudo-element is positioned correctly */
    padding-top: 30px; /* Optional: Adds space between the line and the content */
}

.compliance::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 500px; /* Match the width of .compliance-cards */
    border-top: 1px solid rgba(54, 54, 54, 0.5); /* 50% transparent whitesmoke line */
}

.compliance-card {
    flex: 1;
    max-width: 150px;
    max-height: 170px;
    background: linear-gradient(to bottom, whitesmoke 30%, rgba(68, 68, 68, 0.5) 50%); /* Upper half whitesmoke, lower half 50% transparent */
    background-color: transparent; /* Remove background color */
    border: 1px solid whitesmoke; /* Whitesmoke stroke */
    border-radius: 5px;
    padding: 10px;
    margin: 0 15px;
    box-shadow: none; /* Remove box shadow if present */
    text-align: center;
    overflow: hidden;
}

.compliance-card img {
    height: 50px;
    margin-bottom: 10px;
}

.compliance-card h3 {
    font-size: 1.0em;
    color: whitesmoke; /* Whitesmoke text color */
    font-weight: bold;
    margin-bottom: 10px;
}

.compliance-card p {
    font-size: 1em;
    font-weight: thin;
    color: whitesmoke; /* Whitesmoke text color */
}



/* Footer styling */
footer {
    background-color: #003366;
    color: whitesmoke;
    text-align: center;
    padding: 10px 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 50px;
}

.footer-links a {
    color: whitesmoke;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.footer-links a img {
    height: 20px;
    margin-right: 5px;
    margin-left: 15px;
}

.footer-brand a img {
    height: 40px;
}

/* Error page */
#page_error {
    text-align: center;
    padding: 100px 0;
}
#page_error .error_img {
    margin-bottom: 30px;
    font-size: 0;
}
#page_error .error_img img {
    width: 300px;
}
#page_error p.error_message {
    background: rgba(255,255,255,0.5);
    padding: 10px;
    margin-bottom: 30px;
}
#page_error p.error_message span {
    display: block;
    width: 700px;
    max-width: 100%;
    margin: auto;
    font-size: 30px;
    line-height: 40px;
}
#page_error a.back_link {
    display: inline-block;
    height: 40px;
    line-height: 40px;
    background: #145e9a;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    border-radius: 20px;
}
#page_error a.back_link:hover {
    background: #003366;
}


/* Marianne font definitions */
@font-face {
    font-family: 'Marianne';
    src: url('static/fonts/Marianne-Thin.otf') format('otf');
    font-weight: thin;
    font-style: normal;
}
@font-face {
    font-family: 'Marianne';
    src: url('static/fonts/Marianne-Regular.otf') format('otf');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Marianne';
    src: url('static/fonts/Marianne-Medium.otf') format('otf');
    font-weight: medium;
    font-style: normal;
}
@font-face {
    font-family: 'Marianne';
    src: url('static/fonts/Marianne-Light.otf') format('otf');
    font-weight: light;
    font-style: normal;
}
@font-face {
    font-family: 'Marianne';
    src: url('static/fonts/Marianne-ExtraBold.otf') format('otf');
    font-weight: bolder;
    font-style: normal;
}
@font-face {
    font-family: 'Marianne';
    src: url('static/fonts/Marianne-Bold.otf') format('otf');
    font-weight: bold;
    font-style: normal;
}
