/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fefefe;
    min-width: 320px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Logo */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    min-width: 320px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    /* width: 60px; */
    height: 60px;
}
.logo-image img {
    /* width: 60px; */
    height: 100%;
    max-height: 70px;
}

.placeholder-logo {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #004293 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    border-radius: 8px;
}


.Heinz-Huber-Logo-Letters {
    letter-spacing: -6px;
    font-size: 37px;
    text-indent: -6px;
    font-stretch: extra-condensed;
}

.logo-text h1 {
    font-size: 2rem;
    font-weight: 300;
    color: #2c3e50;
    letter-spacing: 1px;
    margin: 0;
}

.logo-text .subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 300;
    letter-spacing: 1px;
    margin: 0;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

#firstMenuitem {
    opacity: 0;
    visibility: hidden;
}

.main-nav a:hover {
    background-color: #3498db;
    color: white;
}

/* Sections */
section {
    padding: 4rem 0;
}

/* Adjust first section for fixed header */
section:first-of-type {
    margin-top: 100px;
}

section:nth-child(odd) {
    background-color: #f8f9fa;
}

section#leistungen {
    background-color: #f8f9fa;
    background-image: url(images/hintergrund-skizze.jpg);
    background-blend-mode: overlay;
    background-size: contain;
}

h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 1px;
}

/* Services Section */
.services-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.services-list li {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-size: 1.5rem;
    font-weight: 500;
    color: #2c3e50;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 120px;
    border-top: 4px solid #004293;
    cursor: default;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    text-align: justify;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #555;
}

.about-image {
    display: flex;
    justify-content: center;
}

.architect-portrait {
    width: 250px;
    height: 366px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.portrait-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.architect-portrait:hover .portrait-image {
    transform: scale(1.05);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item.separatorTile {
    font-size: 22px;
}
.gallery-item.separatorTile.lightblue {
    background-color: #3498db
}
.gallery-item.separatorTile.green {
    background-color: green;
}
.gallery-item.separatorTile.yellow {
    background-color: yellow
}
.gallery-item.separatorTile.blue {
    background-color: #004293;
    color: white;
}
.gallery-item.separatorTile.orange {
    background-color: orange;
}

/* Ensure images scale down to fit their gallery-item while keeping aspect ratio */
.gallery-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.placeholder-image {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #2c3e50 0%, #004293 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 0%,
        rgba(255,255,255,0.1) 45%,
        transparent 100%
    );
    pointer-events: none;
}

/* Impressum Section */
.impressum-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-details {
    margin-top: 0rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}

.contact-text {
    line-height: 1.6;
}

.contact-text p {
    margin-bottom: 1rem;
}

.contact-text a {
    color: #3498db;
    text-decoration: none;
}

.contact-text a:hover {
    text-decoration: underline;
}

.contact-logo {
    max-width: 100%;
    margin-top: 1rem;
}

.contact-logo img {
    max-width: 100%;
    height: auto;
    display: block;
    
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 14px;
}

.impressum-content h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 500;
}

.impressum-content #impressum h3 {
    margin-top: 3rem;
}

.impressum-content p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

.legal-info {
    font-size: 0.95rem;
}

.legal-list {
    list-style: disc;
    margin-left: 1.2rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.legal-list li {
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Responsive Design */
@media (max-width: 1000px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-text {
        text-align: center;
    }
    
    .architect-portrait {
        width: 200px;
        height: 240px;
    }
}


@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header {
        padding: 0.8rem 0;
    }
    
    .header-content {
        flex-direction: row;
        gap: 1rem;
        text-align: center;
    }
    
    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo-image {
        width: 100%;
        height: auto;
    }
    
    .logo-text h1 {
        font-size: 1.6rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .main-nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    section:first-of-type {
        margin-top: 140px;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* On small portrait viewports, show the portrait under the H2 and before the text.
       Switch the content container to a column flex layout and order the image first. */
    .about-content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }

    .about-text {
        text-align: center;
        order: 1;
    }

    .about-image {
        display: flex;
        justify-content: center;
        order: 0; /* place before the text inside the column */
        margin: 0; /* reset any inherited spacing */
    }

    /* Ensure portrait scales down nicely on small screens */
    .architect-portrait {
        width: 220px;
        height: auto;
        max-width: 90%;
    }
    
    .services-list li {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    
    .contact-logo img {
        max-width: 100%;
        width: auto;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 14px;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 15px;
    }
}


@media (max-width: 830px)  {
    .logo-image img {
        height: 100%;
        max-height: 37px;        
    }
    
    .main-nav a {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
}


@media (max-width: 768px)  {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    
    .impressum-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .gallery-item.separatorTile {
        font-size: 11px;
    }
}



@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.4rem;
    }
    
    .logo-text .subtitle {
        font-size: 0.9rem;
    }
    
    .logo-image {
        width: 40px;
        height: 40px;
    }
    
    .placeholder-logo {
        font-size: 1rem;
    }
    
    /*
    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    */
    
    .main-nav a {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    section:first-of-type {
        margin-top: 160px;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .gallery-grid {
        gap: 15px;
    }
    
    .placeholder-image {
        font-size: 0.8rem;
    }
}



@media (max-width: 830px) and (orientation: portrait)   {
    
    .main-nav a:not(:first-child):not(:last-child) {
        display: none;
    }
}


/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Downloads section styling to match site look */
.downloads {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.downloads-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding: 0;
}

.download-item {
    background-color: #fff;
    border-top: 4px solid #004293;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    padding: 1rem 1.25rem;
    border-radius: 6px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.download-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.09);
}

.download-link {
    color: #2c3e50;
    text-decoration: none;
    display: block;
    position: relative;
    padding-left: 32px;
}

.download-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background: url('images/pdf-icon.svg') no-repeat center center;
    background-size: contain;
}

.download-link strong {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: #004293;
}

.download-meta {
    display: block;
    color: #6b7780;
    font-size: 0.95rem;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .downloads-list {
        grid-template-columns: 1fr;
    }
}

/* Additional Enhancements */
body {
    overflow-x: hidden;
}

/* Content notes */
.gallery-note,
.content-note {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    border: 1px dashed #bdc3c7;
}

.gallery-note {
    grid-column: 1 / -1;
    margin: 1rem 0;
}

/* Focus states for accessibility */
.services-list li:focus,
.gallery-item:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.downloads p {
    margin-bottom: 24px;
}