/* 
   greyflower GmbH - Main Stylesheet
   Color scheme:
   - White: #ffffff
   - Gray: #a4a6ad
   - Steelgreen/Grey: #3a4a57
*/

/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #3a4a57;
    background-color: #ffffff;
}

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

h1, h2, h3 {
    margin-bottom: 20px;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #a4a6ad;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 15px;
}

a {
    color: #3a4a57;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #a4a6ad;
}

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

section {
    padding: 80px 0;
}

/* Header */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

@media (max-height: 800px), (max-width: 1200px) {
    header {
        transform: translateY(-100%); /* Hide header initially */
    }
    
    header.visible {
        transform: translateY(0); /* Show header after scrolling */
    }
}

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

.logo-small {
    display: flex;
    align-items: center;
}

.logo-small img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #a4a6ad;
    transition: width 0.3s ease;
}

nav ul li a:hover:after {
    width: 100%;
}

/* Hero section with large logo */
.hero {
    background-color: #3a4a57;
    color: #ffffff;
    text-align: center;
    padding: 60px 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (max-height: 800px), (max-width: 1200px) {
    .hero {
        padding-top: 40px; /* Less padding when header is initially hidden */
    }
}

.hero .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.logo-large {
    width: 80%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto 40px;
    animation: fadeIn 1.5s ease-out;
}

.logo-large img,
.logo-large object {
    width: 100%;
    height: auto;
    /* Preserve aspect ratio and prevent cropping */
    object-fit: contain;
    /* IE11 and Edge (pre-Chromium) fix */
    max-width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    margin-bottom: 20px;
    font-size: 3rem;
    animation: fadeIn 1.5s ease-out 0.3s forwards;
    opacity: 0;
}

.hero p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Typewriter paragraph specific overrides */
.hero p.typewriter {
    /* Override default animations */
    animation: none;
    opacity: 1;
    /* Ensure content doesn't get cut off */
    max-width: 100%;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* About section */
.about {
    background-color: #f9f9f9;
}

/* Family branches visual */
.family-branches-visual {
    margin: 20px auto 10px; /* Reduced top and bottom margin */
    max-width: 800px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px; /* Fixed height for alignment */
}

.family-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.family-icon img {
    width: 211px;
    height: auto;
}

.arrow-left, .arrow-right {
    position: absolute;
    width: 180px;
}

.arrow-left {
    left: 16%;
    top: 10px;
}

.arrow-right {
    right: 16%;
    top: 10px;
}

.arrow-left img, .arrow-right img {
    width: 100%;
    height: auto;
}

/* Services section */
.services-subsection {
    margin-bottom: 50px;
}

.services-subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    font-size: 1.8rem;
    color: #3a4a57;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #a4a6ad;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 15px; /* Reduced from 40px */
}

.service-card h3 a,
.service-card h4 a {
    color: #3a4a57;
    text-decoration: none;
    transition: color 0.3s ease;
}

.service-card h3 a:hover,
.service-card h4 a:hover {
    color: #a4a6ad;
}

.service-card p a {
    color: #3a4a57;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.service-card p a:hover {
    color: #a4a6ad;
    transform: translateX(3px);
}

/* Portfolio link button */
.portfolio-link {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background-color: #3a4a57;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.portfolio-link:hover {
    background-color: #4e5e6b;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.service-card {
    background-color: #ffffff;
    border-radius: 5px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(58, 74, 87, 0.25); /* #3a4a5740 - rgba format for proper opacity */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
    opacity: 0.15;
    transform: rotate(5deg) scale(1.05);
    transition: opacity 0.3s ease, transform 0.5s ease;
}

/* Service card background icons */
.service-card::before {
    content: '';
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 140px;
    height: 140px;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.09;
    z-index: -1;
    transform: rotate(10deg);
    transition: opacity 0.3s ease, transform 0.5s ease;
}

/* Service card specific icons */
.service-software-dev::before {
    /* Software Development - Code icon */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath fill='%23a4a6ad' d='M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z'/%3E%3C/svg%3E");
}

.service-cto::before {
    /* CTO as a Service - Chess King icon */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23a4a6ad' d='M224 0c17.7 0 32 14.3 32 32V48h16c17.7 0 32 14.3 32 32s-14.3 32-32 32H256v48h76.8c19.4 0 36.8 11.9 43.7 30l13.9 36.9c9.3 24.6 9.9 51.6 1.6 76.6L368.7 376h47.1c21.7 0 39.1 17.4 39.1 39.1c0 12.9-6.3 24.9-17 32.2l-48.2 33c-18.4 12.6-40.4 19.3-62.9 19.3c-28.6 0-56.2-10.8-77-30.4l-39.3-36.9c-11.2-10.5-17.6-25.2-17.6-40.7V288H145.1v74.5c0 15.5-6.3 30.2-17.6 40.7l-39.3 36.9c-20.9 19.6-48.5 30.4-77 30.4c-22.4 0-44.4-6.7-62.9-19.3L0 418.2c-10.7-7.4-17-19.3-17-32.2C-17 364.3.4 346.9 22.1 346.9H69.3L46 273.2c-8.3-25-7.6-51.9 1.6-76.6l13.9-36.9c6.9-18.1 24.4-30 43.7-30H192V80H176c-17.7 0-32-14.3-32-32s14.3-32 32-32h16V32c0-17.7 14.3-32 32-32z'/%3E%3C/svg%3E");
}

.service-interior::before {
    /* Interior Design - Chair icon */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23a4a6ad' d='M248 48V256h48V58.7c23.9 13.8 40 39.7 40 69.3V256h48V128C384 57.3 326.7 0 256 0H192C121.3 0 64 57.3 64 128V256h48V128c0-29.6 16.1-55.5 40-69.3V256h48V48h48zM48 288c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16H400c8.8 0 16-7.2 16-16V304c0-8.8-7.2-16-16-16H48zM432 352H16c-8.8 0-16 7.2-16 16s7.2 16 16 16H29.6L60.4 488.8C65.6 505 80.7 516 97.6 516c25 0 44.5-21.1 42.5-45.9L126.7 384H321.3l-13.4 86.1c-2 24.8 17.5 45.9 42.5 45.9c16.9 0 32-11 37.2-27.2L418.4 384H432c8.8 0 16-7.2 16-16s-7.2-16-16-16z'/%3E%3C/svg%3E");
}

.service-architecture::before {
    /* Architectural Planning - Building icon */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23a4a6ad' d='M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80zM64 96v64h64V96H64zM0 336c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336zm64 16v64h64V352H64zM304 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H304c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48zm80 64H320v64h64V96zM256 304c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16v48h48c8.8 0 16 7.2 16 16v64c0 8.8-7.2 16-16 16H304c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16h64V320H272c-8.8 0-16-7.2-16-16z'/%3E%3C/svg%3E");
}

/* Contact section */
.contact {
    background-color: #f9f9f9;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 40px;
}

.contact-info {
    padding-right: 30px;
}

.contact-form form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #a4a6ad;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3a4a57;
}

button {
    background-color: #3a4a57;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #4e5e6b;
}

/* CAPTCHA container styling */
.captcha-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* Footer */
footer {
    background-color: #3a4a57;
    color: #ffffff;
    padding: 50px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.footer-section h4:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #a4a6ad;
}

.footer-section p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-section p a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.footer-section p a:hover {
    color: #a4a6ad;
}

.footer-section p a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #a4a6ad;
    transition: width 0.3s ease;
}

.footer-section p a:hover::after {
    width: 100%;
}

.at-symbol {
    opacity: 0.8;
    font-style: italic;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    nav ul li {
        margin: 0 15px;
    }
    
    .logo-large {
        width: 90%;
        height: auto;
        margin-bottom: 30px; /* Reduced space below logo */
    }
    
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 80px 0 60px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    /* Family branches visual responsive adjustments */
    .family-branches-visual {
        height: 80px;
    }
    
    .family-icon img {
        width: 80px;
    }
    
    .arrow-left, .arrow-right {
        width: 150px;
    }
    
    .arrow-left {
        left: 5%;
    }
    
    .arrow-right {
        right: 5%;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        padding-right: 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }
}

/* Special handling for 1024x768 screens */
@media (min-width: 1024px) and (max-width: 1200px) and (max-height: 800px) {
    .logo-large {
        width: 80%;
        height: auto;
        margin-bottom: 20px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .logo-large {
        width: 95%;
        height: auto;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    section {
        padding: 60px 0;
    }
    
    /* Hide family branches visual on mobile */
    .family-branches-visual {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h4:after {
        left: 50%;
        transform: translateX(-50%);
    }
}
