/* Page Settings */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: white;
    background-color: #181818;
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
}

h1 {font-size: 36px;}
h2 {font-size: 28px;}
h3 {font-size: 22px;}
p {font-size: 18px;}

/* Cover styles */
.cover {
    position: fixed;
    inset: 0;
    background-color: #181818;
    color: white;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;

    z-index: 1000;

    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cover > button {
    border: 2px solid red;
    box-shadow: 0 0 15px red;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    background-color: transparent;
    height: 40px;
    width: 130px;
}

.cover > button:hover {
    border: 2px solid green;
    box-shadow: 0 0 15px green;
    transition: 0.5s ease-in-out;
}

.cover.hide {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

#homeContent {
    opacity: 0;
    transition: opacity 0.6s ease;
}

#homeContent.show {
    opacity: 1;
}

.skip-cover .cover {
    display: none;
}

.skip-cover #homeContent {
    opacity: 1;
}



.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Section */
header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px 5px 20px;
    border-radius: 10px;
}

.right {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.notify-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.6rem;
  background: transparent;
  border: 2px solid green;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.notify-btn:hover {
  box-shadow: 0 0 12px green;
}


.socials {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
}

.socials p {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid red;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: 0.5s;
    padding-top: 4px;
    font-size: 22px;
}

.socials a {
    color: white;
}

.socials a:visited {
    color: white;
}

.socials p:hover {
    background-color: green;
    color: white;
    box-shadow: 0 0 15px green;
    border: 2px solid green;
}

.hamburger {
    padding-top: 7.5px;
    cursor: pointer;
    font-size: 23px;
}

header.italian-border {
  position: relative;
  background: #181818;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 0;
  border-radius: 0px 0px 12px 12px;
}

header.italian-border::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px; /* border thickness */
  background: linear-gradient(
    90deg,
    #008C45,
    #FFFFFF,
    #CD212A
  );
  background-size: 300% 300%;
  animation: italianFlow 10s ease infinite;
  border-radius: 0px 0px 12px 12px;
  z-index: -1;
}

/* Inner rounding */
header.italian-border {
  border-radius: 10px;
}

@keyframes italianFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  header.italian-border::before {
    animation: none;
  }
}


/* Sidebar Section */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background-color: #212121;
    transition: width 0.7s ease;
    overflow: hidden;
    z-index: 999;
}

.sidebar.active {
    width: 320px;
}

body.sidebar-open {
    overflow: hidden;
}

.sidebar-btn {
    display: block;
    width: 100%;
    text-align: left;
    font-weight: bold;
    background: none;
    cursor: pointer;
    text-decoration: none;
    color: white;
    padding: 10px;
    border: none;
    margin: 2px 0px 2px 0px;
}

.sidebar-btn:hover {
    background-color: red;
}

.sidebar-btn a {
    text-decoration: none;
    color: white;
}

.sidebar-btn a:visited {
    text-decoration: none;
    color: white;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 320px;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-weight: bold;
}

.sidebar-content h2 {
    margin: 40px 0px 10px 0px;
    text-align: center;
}

.sidebar-divider-top {
    border: 1px solid white;
    margin: 15px 0px 15px 0px;
    width: 100%;
}

.sidebar-divider-bottom {
    border: 1px solid white;
    margin: 15px 0px 15px 0px;
    width: 100%;
}

.sidebar-socials {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 40px;
}

.sidebar-btn-social-links {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.sidebar-btn-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid red;
    border-radius: 50%;
    height: 30px;
    width: 30px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.5s;
    color: white;
    font-size: 22px;
}

.sidebar-btn-social-links a:visited {
    color: white;
}

.sidebar-btn-social-links a:hover {
    background-color: green;
    color: white;
    box-shadow: 0 0 15px green;
    border: 1px solid green;
}

/* Introduction Section */
.introduction {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    margin: 30px 0px 30px 0px;
}

.introduction p {
    margin: 0px 180px 20px 180px;
}

/* Content Section */
.main-content {
    flex: 1;
    overflow-y: auto;
}

.content {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.actual-content {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.actual-buttons {
    background-color: #222;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 1.5rem;
    min-height: 120px;
    margin: 20px;

    display: flex;
    justify-content: center;
    align-items: center;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.space {
    margin-top: 40px;
}

.actual-buttons > a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    font-weight: 600;
    text-decoration: none;
    color: white;
    font-size: 22px;
}


/* CONTENT FOR TOPICS */
.topic-topic {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.topic-content {
    border: 1px solid white;
    border-radius: 12px;
    margin: 0px 20px 30px 20px;
    padding: 0px 10px 0px 10px;
}


/* TABLE OF CONTENTS */
.table-of-contents {
    margin-bottom: 50px;
}

.table-of-contents-btn {
    height: 40px;
    background-color: #333;
    color: white;
    border: 2px solid red;
    box-shadow: 0 0 15px red;
    border-radius: 8px;
    width: 200px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
}

.table-of-contents-btn:hover {
    border: 2px solid green;
    box-shadow: 0 0 15px green;
    transition: 0.5s ease-in-out;
}

.table-of-contents-content {
    display: none;
    padding: 10px;
    background: #333;
    border-radius: 8px;
    border: 2px solid black;
    width: fit-content;
    margin: 10px auto;
}

.toc-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid black;
}

.toc-btn:hover {
    color: red;
}

.toc-btn:visited {
    color: white;
}


@media (max-width: 380px) {

    /* TYPEOGRAPHY */
    h1 {font-size: 28px;}
    h2 {font-size: 22px;}
    h3 {font-size: 18px;}
    p {font-size: 16px;}

    /* NO SHOW */
    .socials {
        display: none;
    }

    /* FONT-SIZE CHANGES */
    .actual-buttons > a {font-size: 18px;}

    /* CONTENT */
    .actual-content {
        display: flex;
        flex-direction: column;
    }

    .introduction p {
        margin: 0px 10px 0px 10px;
    }

    .sidebar.active {
        width: 200px;
    }

    .sidebar-content {
        width: 200px;
    }

    .actual-buttons {
        margin: 0px 20px 0px 20px;
    }

    .topic-topic {
        display: flex;
        flex-direction: column;
        margin: 0px 20px 0px 20px;
    }

    .topic-content {
        margin: 10px 3px 10px 3px;
        padding: 0px 10px 0px 10px;
    }

    .topic-content p {
        text-align: left;
    }

}