:root {
    --navy: #244582;
    --black: #000000;
    --brand-green: #3BDE83;
    --dark-text: #1a1a1a;
    --light-bg: #f9f9f9;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

/* Self-hosted Plus Jakarta Display family */
@font-face {
    font-family: 'Plus Jakarta Display';
    src: url('fonts/plus-jakarta-sans/PlusJakartaDisplay-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Display';
    src: url('fonts/plus-jakarta-sans/PlusJakartaDisplay-LightItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Display';
    src: url('fonts/plus-jakarta-sans/PlusJakartaDisplay-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Display';
    src: url('fonts/plus-jakarta-sans/PlusJakartaDisplay-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Display';
    src: url('fonts/plus-jakarta-sans/PlusJakartaDisplay-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Display';
    src: url('fonts/plus-jakarta-sans/PlusJakartaDisplay-MediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Display';
    src: url('fonts/plus-jakarta-sans/PlusJakartaDisplay-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Display';
    src: url('fonts/plus-jakarta-sans/PlusJakartaDisplay-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Display', 'Inter', sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    padding: 1rem 5%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 80px;
    width: auto;
    transition: height 0.3s ease;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--navy);
    color: var(--black);
    font-weight: 700;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--brand-green);
}

.nav-btn {
    background-color: var(--brand-green);
    padding: 10px 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--black);
    font-weight: bold;
    transition: 0.3s;
    margin-left: 2rem;
}

.nav-btn:hover {
    background-color: var(--black);
    color: var(--brand-green);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
}

.bar {
    display: block;
    height: 3px;
    width: 25px;
    background-color: var(--black);
    margin: 3px 0;
    border-radius: 3px;
    transition: 0.3s;
}

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Sections General */
section {
    padding: 80px 10%;
}

h2 {
    color: var(--navy);
    color: var(--black);
    font-size: 2.5rem;
    text-align: left;
    margin-bottom: 3rem;
}

/* Hero */
.hero {
    background: var(--white) url('images/background/Cloudrise_HeroBG.svg') no-repeat center center;
    background-size: cover;
    /*background-attachment: fixed;*/
    color: var(--black);
    text-align: left;
    padding: 120px 10%;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 1rem;
}

.hero-logo {
    height: 120px;
    width: auto;
}

.hero h1 {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-align: left;
    line-height: 1.4;
}

.hero h1 span {
    display: block;
}

.text-highlight {
    color: var(--brand-green);
}

.hero h2 {
    text-align: left;
}

.hero h3 {
    text-align: left;
}

.hero p {
    margin: 0.2em 0;
}

.hero-subtitle {
    font-size: 22px;
}

.btn {
    background: var(--brand-green);
    color: var(--navy);
    color: var(--black);
    padding: 16px 30px;
    border-radius: 7px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin: 10px;
    transition: 0.3s;
}

.btn:hover {
    background: var(--black);
    color: var(--brand-green);
}

/* About Me */
.about {
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.about-content {
    flex: 1;
}

.certifications-content {
    flex: 1;
}

.cert-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.cert-header h3 {
    margin: 0;
}

.certifications-content ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
}

.certifications-content li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.certifications-content li::before {
    content: '/';
    position: absolute;
    left: 0;
    color: var(--brand-green);
    font-weight: 700;
}

.cert-icon {
    height: 60px;
    width: 80px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Services Grid */
.services {
    background: var(--black);
    color: var(--brand-green);
}

.services h2 {
    color: var(--brand-green);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    border-bottom: 5px solid var(--brand-green);
    transition: 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card h3 {
    color: var(--navy);
    color: var(--black);
    margin-top: 0;
}

.projects {
    background: var(--light-bg);
}

.project-icon {
    height: 60px;
    width: 80px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.project-icon:hover {
    transform: scale(1.1);
}

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

.project-images {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: center;
}

.project-detail-img {
    height: 60px;
    width: 80px;
    object-fit: contain;
    border-radius: 5px;
}

.project-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.project-location, .project-duration {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--black);
}

.project-meta img {
    height: 20px;
    width: auto;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.service-section {
    background: var(--black);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 10px;
    border: 1px solid var(--brand-green);
    color: var(--brand-green);
    scroll-margin-top: 120px; /* Offsets the sticky nav height when scrolling to anchor */
    margin-top: 40px; /* Spacing between grid and details */
}

.service-section h3 {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--brand-green);
}

.service-section h3::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.service-section.active h3::after {
    transform: rotate(45deg);
}

.service-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.service-section.active .service-content {
    opacity: 1;
}

.service-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--brand-green);
    font-size: 1.2rem;
}

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

.service-section li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.service-section li::before {
    content: '/';
    position: absolute;
    left: 0;
    color: var(--brand-green);
    font-weight: 700;
}

/* Footer */
footer {
    background: black;
    color: var(--brand-green);
    padding: 40px 10%;
    text-align: center;
}

.footer-links a {
    color: var(--brand-green);
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9rem;
}

/* Impressum Modal Logic (Simple CSS Toggle) */
#impressum:target {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
}

.modal-content {
    background: black;
    color: var(--brand-green);
    margin: 10% auto;
    padding: 40px;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
}

.modal-content h2 {
    color:var(--brand-green);
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    text-decoration: none;
    color: var(--brand-green);
}

@media (max-width: 1024px) {
    .about {
        flex-direction: column;
        text-align: center;
    }
    .certifications-content ul {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .project-card {
        flex-direction: column;
        text-align: center;
    }
    .hero-content {
        flex-direction: column;
    }
    .hero {
        text-align: left;
        background-image: url('images/background/Cloudrise_HeroBG_2.svg');
    }

    .logo img {
        height: 40px;
    }
    
    /* Mobile Nav */
    nav {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: flex;
        margin-left: 15px;
        order: 2;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        gap: 1.5rem;
        background-color: var(--light-bg);
        order: 3;
    }

    .nav-links.active {
        display: flex;
    }
    .nav-btn {
        margin-left: auto;
        order: 1;
    }
}

@media (max-width: 400px) {
    .nav-btn-text {
        display: none;
    }
    .nav-btn {
        padding: 10px;
    }
}

/* Flip Card Styles */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    height: 400px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s, box-shadow 0.8s;
    transform-style: preserve-3d;
    border-radius: 10px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    top: 0;
    left: 0;
    border-radius: 10px;
    overflow: hidden;
}

.flip-card .project-card {
    height: 100%;
    justify-content: center;
}

.flip-card-back {
    transform: rotateY(180deg);
    z-index: 1;
}

.flip-card-front {
    z-index: 2;
}

.flip-card .flip-card-front:hover {
    transform: none;
}

.flip-card .flip-card-back:hover {
    transform: rotateY(180deg);
}

.flip-card-back ul {
    text-align: left;
    padding: 0 30px;
    margin: 0;
    width: 100%;
    list-style: none;
}

.flip-card-back li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
}

.flip-card-back li::before {
    content: '/';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand-green);
    font-weight: 700;
}

/* Index / Coming Soon Page Styles */
.container {
    max-width: 600px;
    margin: 10vh auto;
    text-align: center;
    padding: 2rem;
}

.container h1 {
    color: var(--navy);
    color: var(--black);
    margin-bottom: 0.5rem;
}

.logo-placeholder img {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

.progress-container {
    background-color: #eee;
    border-radius: 10px;
    height: 10px;
    width: 100%;
    margin: 2rem 0;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--brand-green);
    height: 100%;
    width: 40%;
    border-radius: 10px;
}

.contact-link a {
    color: var(--navy);
    color: var(--black);
    font-weight: 700;
    text-decoration: none;
}

/* Back to Top Button */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-size: 24px;
    border: none;
    outline: none;
    background-color: var(--brand-green);
    color: var(--black);
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.3s;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#backToTop:hover {
    background-color: var(--black);
    color: var(--white);
    transform: translateY(-5px);
}

/* Cookie Banner */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--black);
    color: var(--white);
    padding: 20px;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    flex-wrap: wrap;
    text-align: center;
}

#cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
}

#accept-cookies {
    background-color: var(--brand-green);
    color: var(--black);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

#accept-cookies:hover {
    background-color: var(--white);
}

#decline-cookies {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

#decline-cookies:hover {
    background-color: var(--white);
    color: var(--black);
}