/* Modern CSS for PetraHomepage */
:root {
    --primary-red: #cc0000;
    --primary-purple: #310b56;
    --text-color: #000000;
    --bg-color: #ffffff;
    --font-stack: Verdana, Arial, Helvetica, sans-serif;
    --sidebar-width: 220px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-stack);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: var(--primary-red);
    transition: color 0.2s;
}

a:hover {
    color: #ff0000;
}

/* Layout Grid */
.page-wrapper {
    display: grid;
    grid-template-areas:
        "header"
        "divider"
        "sidebar"
        "content"
        "footer";
    grid-template-columns: 1fr;
    min-height: 100vh;
}

@media (min-width: 768px) {
    .page-wrapper {
        grid-template-areas:
            "header header"
            "divider divider"
            "sidebar content"
            "footer footer";
        grid-template-columns: var(--sidebar-width) 1fr;
        max-width: 1200px;
        margin: 0 auto;
    }

    header {
        padding: 10px 0;
        gap: 0;
    }

    .logo {
        width: var(--sidebar-width);
        padding-left: 20px;
    }

    .top-nav {
        padding-left: 10px;
    }
}

/* Header */
header {
    grid-area: header;
    display: flex;
    align-items: flex-end;
    padding: 10px;
    gap: 20px;
}

.logo img {
    width: 150px;
    height: auto;
}

.top-nav {
    margin-bottom: 20px;
}

.top-nav a {
    font-weight: bold;
    text-transform: uppercase;
    color: #333333;
    margin-right: 20px;
    font-size: 1rem;
}

.top-nav a:hover {
    color: var(--primary-red);
}

/* Divider */
.divider {
    grid-area: divider;
    height: 25px;
    background-image: url('assets/images/LightBlueGradientTop.png');
    background-repeat: no-repeat;
    background-size: cover;
    margin-bottom: 20px;
}

/* Sidebar Navigation */
nav.sidebar {
    grid-area: sidebar;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

nav.sidebar a {
    display: block;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--primary-red);
    padding: 10px 0;
    border-bottom: 1px solid transparent;
}

/* Custom separator for sidebar items to match original look */
.nav-separator {
    height: 25px;
    background-image: url('assets/images/LightBlueGradient.png');
    background-repeat: no-repeat;
    margin-bottom: 10px;
}

/* Main Content */
main {
    grid-area: content;
    padding: 20px 40px;
}

h1,
h2,
h3 {
    color: var(--primary-red);
}

ul {
    list-style-type: disc;
    padding-left: 20px;
}

/* Contact Box / Address */
.contact-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.contact-box img {
    width: 100px;
    height: auto;
}

address {
    font-style: normal;
    line-height: 1.6;
}

/* Footer */
footer {
    grid-area: footer;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

footer a {
    color: var(--primary-red);
}

/* Mobile Navigation Toggle (Checkbox Hack) */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    /* Hidden by default (desktop) */
    cursor: pointer;
    padding: 10px;
    align-items: center;
}

.nav-toggle-label::after {
    content: ' Menü';
    font-size: 1rem;
    font-weight: bold;
    margin-left: 10px;
    color: var(--primary-red);
    text-transform: uppercase;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--primary-red);
    height: 2px;
    width: 2rem;
    position: relative;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
}

.nav-toggle-label span::before {
    bottom: 7px;
}

.nav-toggle-label span::after {
    top: 7px;
}

/* Animation: Transform to X (Close) when checked */
#nav-toggle:checked+.nav-toggle-label span {
    background: transparent;
}

#nav-toggle:checked+.nav-toggle-label span::before {
    bottom: 0;
    transform: rotate(45deg);
}

#nav-toggle:checked+.nav-toggle-label span::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .top-nav {
        margin-bottom: 0;
        margin-top: 10px;
    }

    /* Show hamburger on mobile */
    .nav-toggle-label {
        display: flex;
        grid-area: sidebar;
        /* Place where sidebar usually is */
        justify-self: end;
        /* Move to right */
        padding-right: 20px;
        margin-bottom: 10px;
    }

    /* Hide sidebar by default on mobile */
    nav.sidebar {
        display: none;
        border-bottom: 1px solid #eee;
    }

    /* Show sidebar when checkbox is checked */
    #nav-toggle:checked~nav.sidebar {
        display: flex;
    }

    main {
        padding: 20px;
    }

    .contact-box {
        flex-direction: column;
        text-align: center;
    }
}