@font-face {
    font-family: 'Lato-Light';
    src: url('../fonts/Lato-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Lato-Regular';
    src: url('../fonts/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

body {
    font-family: 'Lato-Light', sans-serif;
    font-size: 16px;
    margin: 0;
    padding: 0;
    text-align: center;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato-Regular', sans-serif;
    font-weight: bold;
}

.main {
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 180px 20px 60px;
    text-align: center;
    max-width: none;
    gap: 20px;
}

.main p {
    font-size: 1.25rem;
    font-style: italic;
    margin-top: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.horizontal-logo,
.vertical-logo {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    height: 500px;
    padding-bottom: 50px;
}

.vertical-logo {
    display: none;
}

header {
    background-color: #333;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    width: 100%;
}

header.hidden {
    transform: translateY(-100%);
}

header.hidden .nav-menu.show {
    transform: translateY(-100%);
}

.logo img {
    height: 40px;
}

.menu-toggle img {
    height: 40px;
}

nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    z-index: 999;
    transition: transform 0.3s ease-in-out;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
}

#main {
    background-color: #fff;
    padding: 80px 20px 40px;
    text-align: center;
}

#main img {
    max-width: 100%;
    height: auto;
}

section:not(.main):not(#ram):not(#cards) {
    padding: 40px 20px;
    text-align: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

#ram,
#cards {
    padding: 0 20px;
    text-align: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

#cards {
    padding: 0;
    text-align: center;
}

.cards-wrapper {
    width: 95%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 1s ease;
    display: flex;
    align-items: center;
}

.card-front {
    background-color: #333;
    color: white;
    padding: 20px;
    transform: translateX(0);
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-front-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.card-front p {
    font-family: 'Lato-Regular', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
    width: auto;
}

.card-back {
    background-color: #f8f8f8;
    transform: translateX(100%);
}

.card-back-content {
    padding: 40px 15px 40px;
    color: #333;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-back-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    text-align: center !important;
    text-justify: none;
    width: 100%;
}

.card.active .card-front {
    transform: translateX(-100%);
}

.card.active .card-back {
    transform: translateX(0);
}

.footer {
    position: relative;
    width: 100%;
    background: #333;
    min-height: 100px;
    padding: 20px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    box-sizing: border-box;
}

.logo-footer {
    margin-top: 16px;
    margin-bottom: 20px;
}

.logo-footer img {
    height: 100px;
    filter: brightness(0) invert(1);
}

.social-icon,
.menu {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    flex-wrap: wrap;
    padding: 0;
}

.social-icon__item,
.menu__item {
    list-style: none;
}

.social-icon__link {
    margin: 0 10px;
    display: inline-block;
}

.social-icon__link img {
    height: 30px;
    filter: brightness(0) invert(1);
}

.menu__link {
    font-size: 1.2rem;
    color: #fff;
    margin: 0 10px;
    display: inline-block;
    text-decoration: none;
    opacity: 0.75;
    font-weight: 300;
}

.menu__link:hover {
    opacity: 1;
}

.copyright {
    color: #fff;
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.75;
    text-align: center !important;
    width: 100%;
    padding: 0;
    margin: 0;
}

h2 {
    font-size: 3rem;
    font-weight: 300;
    color: #333;
    margin: 2rem 0 3rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: left;
    padding-left: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    transform: none;
    width: 60px;
    height: 2px;
    background-color: #333;
}

.ram-container {
    width: calc(100% - 40px);
    max-width: 1200px;
    margin: 0 auto;
}

.ram-paragraph {
    display: flex;
    min-height: 150px;
    margin: 40px 0;
    padding-left: 20px;
    padding-right: 20px;
}

.ram-paragraph:first-child {
    margin-top: 0;
}

.ram-paragraph:last-child {
    margin-bottom: 0;
}

.ram-letter-box {
    width: 150px;
    min-width: 150px;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ram-letter {
    font-family: 'Lato-Regular', sans-serif;
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
}

.ram-text-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    padding: 30px;
}

.ram-text-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(250, 250, 250, 0.85);
}

.ram-text-box p {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: normal;
    line-height: 1.6;
    text-align: justify;
    color: #111;
    padding: 0 20px;
}

.no-vertical-padding {
    padding: 20px 20px;
}

p {
    font-family: 'Lato-Light', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    text-justify: inter-word;
    margin-bottom: 1rem;
    width: 100%;
}

section > p {
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 2rem;
}

.ram-paragraph p {
    flex: 1;
    margin: 0;
    padding: 0;
}

.card-front img {
    width: 85px;
    height: 85px;
}

#plan {
    text-align: center;
    padding: 40px;
}

.plan-description {
    max-width: 800px;
    margin: 0 20px;
    line-height: 1.6;
    color: #444;
    text-align: justify;
}

#plan,
#pillars,
#architecs {
    text-align: center;
    padding: 60px 20px;
}

.quote {
    font-family: 'Lato-Light', sans-serif;
    font-size: 1.8rem;
    color: #333;
    margin: 60px auto 40px;
    max-width: 800px;
    line-height: 1.3;
    font-style: italic;
    font-weight: 300;
    text-align: center;
}

#plan h2,
#pillars h2,
#architecs h2 {
    font-size: 3.5rem;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 40px;
    letter-spacing: 0.1em;
    position: relative;
}

#plan h2::after,
#pillars h2::after,
#architecs h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: #333;
    margin: 20px auto 0;
}

.logo a,
.logo-footer a {
    display: inline-block;
    text-decoration: none;
}

.logo a:hover,
.logo-footer a:hover {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

#plan .quote {
    margin-bottom: 60px;
}

.contact-menu {
    margin: 15px 0;
    opacity: 0.9;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.contact-menu .menu__link {
    font-size: 1rem;
    margin: 0;
}

@keyframes highlightContact {
    0% {
        background-color: transparent;
        color: white;
    }
    20% {
        background-color: white;
        color: black;
    }
    80% {
        background-color: white;
        color: black;
    }
    100% {
        background-color: transparent;
        color: white;
    }
}

.contact-highlight {
    animation: highlightContact 2s ease-in-out;
    border-radius: 4px;
    padding: 5px 10px;
    margin: -5px -10px;
}

.contact-highlight .menu__link {
    color: black !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    font-family: 'Lato-Regular', sans-serif;
}

.contact-highlight .contact-icon {
    filter: brightness(0) !important;
}

@media (max-width: 1400px) {
    .horizontal-logo {
        display: none;
    }

    .vertical-logo {
        display: block;
        height: 300px;
        max-width: 90%;
        transform: none;
        padding-bottom: 0;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .card:hover .card-front {
        transform: translateX(-100%);
        transition: transform 1.8s ease;
    }

    .card:hover .card-back {
        transform: translateX(0);
        transition: transform 1.8s ease;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
    }

    .nav-menu {
        display: none;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #333;
        padding: 10px;
        flex-direction: column;
        box-sizing: border-box;
        transition: transform 0.3s ease-in-out;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .menu-separator {
        display: none;
    }

    .main {
        padding: 150px 20px 50px;
    }

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

    .cards-wrapper {
        width: 100%;
        padding: 0px 45px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }

    .card {
        height: 300px;
    }

    .card-front img {
        height: 100px;
        width: auto;
    }

    .card-front {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

    .contact-menu {
        align-items: center;
        margin: 10px 0;
        gap: 10px;
    }
    
    .menu__item {
        margin: 5px 0;
    }

    .ram-paragraph {
        margin: 0 20px;
        padding: 0;
        display: flex;
        flex-direction: row;
        min-height: 100px;
        position: relative;
    }

    .ram-paragraph + .ram-paragraph {
        margin-top: 20px;
    }

    .ram-letter-box {
        width: 80px;
        min-width: 80px;
        margin: 0;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100%;
    }

    .ram-text-box {
        flex: 1;
        padding: 15px;
        margin: 0;
        margin-left: 80px;
    }

    .ram-text-box::before {
        left: 0;
    }

    .ram-text-box p {
        padding: 0 10px;
        font-size: 1rem;
        text-align: justify;
        margin: 0;
    }
    
    .main p,
    .card-front p {
        text-align: center;
        hyphens: none;
    }

    p {
        font-size: 1rem;
        padding: 0 20px;
        text-align: center;
    }

    .ram-letter {
        font-size: 3.5rem;
        display: inline;
    }

    .ram-paragraph p {
        padding: 0;
        margin: 0;
        text-align: center;
    }

    .quote {
        font-size: 1.5rem;
        padding: 0 20px;
    }

    .quote-author {
        font-size: 0.9rem;
    }

    #plan h2,
    #pillars h2,
    #architecs h2 {
        font-size: 2.5rem;
    }

    #pillars,
    #architecs {
        margin-top: 0;
    }

    #plan .quote {
        margin-bottom: 30px;
    }
}
