/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

/* Brand color variables */
:root {
    --brand-logo-color: #053664;
    --brand-accent: #3498db;
}

/* Heading hierarchy: ensure h1 > h2 > h3 by default. More specific selectors below can override. */
h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

h2 {
    font-size: 1.6rem; /* intentionally larger than h3 */
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-weight: 700; /* use 700 which is broadly supported */
}

h3 {
    font-size: 1.25rem;
    color: #34495e; /* slightly lighter color so it doesn't read as heavy */
    margin-bottom: 0.5rem;
    font-weight: 400; /* standard regular weight */
}

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

/* Header styles */
.header {
    background-color: #fff;
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    flex-wrap: wrap; /* allow wrapping on small screens to avoid excessive shrink */
}

.logo h1 {
    color: var(--brand-logo-color); /* match logo blue via variable */
    font-size: 2.2rem; /* increased for better visibility */
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0 0 4px 0; /* add spacing above tagline */
    line-height: 1.05; /* keep compact but not squashed */
}
/* Logo image style */
.logo-img {
    /* enlarge for stronger brand presence */
    height: 80px; /* increased to compensate for internal padding and match text block */
    min-height: 70px; /* do not let it collapse below text+tagline visual height */
    flex-shrink: 0; /* prevent shrinking when space is tight */
    align-self: center; /* ensure image centers in the flex row */
    width: auto;
    margin-right: 10px;
    /* make the logo colors more radiant (boost saturation and contrast) */
    filter: saturate(1.35) contrast(1.08) brightness(1.02);
    transition: filter 200ms ease;
}

/* Slightly stronger effect on hover/focus to emphasize vibrancy */
.logo-img:hover,
.logo-link:focus .logo-img {
    filter: saturate(1.6) contrast(1.12) brightness(1.04) drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}

.navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navigation a {
    color: #34495e;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    text-transform: lowercase;
}

.navigation a:hover,
.navigation a.active {
    color: #3498db;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center; /* vertically center text with image */
    gap: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* left-align text within the text column */
    justify-content: center; /* center the text column vertically alongside the image */
}

/* Tagline styling now enforced inline per page for absolute consistency across environments. */

/* Accent the site name with Swedish-flag inspired blue */
/* (Merged into the main .logo h1 rule above) */

.separator {
    color: #bdc3c7;
    font-weight: 300;
}

/* Main content styles */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.hero-section {
    width: 100%;
}

.profile-section {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-image {
    position: relative;
}

/* Nudge the profile image down slightly and pull the text up to visually align
   the photo with the headings. Adjust value if you want more/less offset. */
.profile-image {
    margin-top: 10px; /* small downward nudge */
}

.profile-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background-color: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
}

/* Placeholder styling when image is not available */
.profile-image img[src*="jonas-bylund.jpg"] {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image img[src*="jonas-bylund.jpg"]::after {
    content: "Professional Photo\AJonas Bylund";
    white-space: pre;
    text-align: center;
    font-weight: 500;
}

.profile-content h1 {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

/* Raise the headings/text to better line up with the image */
.profile-content {
    transform: translateY(-18px); /* pulls content up to align with photo */
}

.profile-content h2 {
    font-size: 1.6rem; /* increased so h2 stays larger than h3 */
    color: #2c3e50; /* match global h2 color */
    font-weight: 500; /* lighter for a slimmer, more elegant look */
    margin-bottom: 30px;
    line-height: 1.35;
}

/* Typographic refinements for the combined subhead */
.profile-content .subhead {
    font-weight: 500; /* ensure consistent lighter weight on the subhead */
    letter-spacing: 0.1px;
    color: #243447; /* a touch deeper for contrast */
    text-wrap: balance;
}

.intro-text {
    margin-bottom: 30px;
}

.intro-text p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
}

/* vision-text removed */

.social-links {
    margin-top: 30px;
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #0077b5;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.linkedin-link:hover {
    background-color: #005582;
    transform: translateY(-2px);
}

.linkedin-link i {
    font-size: 1.2rem;
}

/* Footer styles */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 18px 0;
    margin-top: 60px;
    border-top: 2px solid rgba(255,255,255,0.03);
}

.footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.footer p {
    font-size: 0.95rem;
    color: #ecf0f1;
    margin: 0;
    opacity: 0.95;
    line-height: 1;
}

.footer a {
    color: #ecf0f1;
    text-decoration: underline;
}

.footer a:hover {
    color: #d1e9ff;
    text-decoration: none;
}

/* Optional small screens: slightly smaller footer text and stacked content */ 
@media (max-width: 420px) {
    .footer {
        padding: 14px 0;
    }
    .footer p {
        font-size: 0.85rem;
        text-align: center;
    }
}

/* On narrow screens, remove the vertical offsets so stacked layout remains natural */
@media (max-width: 700px) {
    .profile-image {
        margin-top: 0;
    }
    .profile-content {
        transform: none;
    }
}

/* Additional page styles */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.2rem;
    color: #555;
}

/* Cases page styles */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.case-item {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.case-item:hover {
    transform: translateY(-5px);
}

.case-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.case-item p {
    color: #555;
    line-height: 1.6;
}

/* Services page styles */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 20px;
}

.service-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-item p {
    color: #555;
    line-height: 1.6;
}

/* Contact page styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.contact-info h3,
.contact-form h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    color: #3498db;
    font-size: 1.2rem;
    width: 20px;
}

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

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

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.contact-form button {
    background-color: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #2980b9;
}

/* Contact form status message */
.form-status {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
}
.form-status.success {
    color: #1e7e34; /* green */
    background: #e6f4ea;
    border: 1px solid #b7e1c0;
    padding: 10px 12px;
    border-radius: 6px;
}
.form-status.error {
    color: #b00020; /* red */
    background: #fde8ea;
    border: 1px solid #f5b7bf;
    padding: 10px 12px;
    border-radius: 6px;
}

/* Responsive design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .navigation {
        gap: 10px;
    }

    .navigation a {
        font-size: 0.9rem;
    }

    /* cap logo size on smaller screens */
    .logo-img {
        /* slightly smaller for small screens */
        height: 48px;
    }

    /* reduce the upward nudge on small screens */
    .logo-text {
    transform: translateY(-2px);
    }

    .main-content {
        margin-top: 120px;
        padding: 20px 0;
    }

    .profile-section {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .profile-image {
        max-width: 250px;
        margin: 0 auto;
    }

    .profile-image img {
        height: 280px;
    }

    .profile-content h1 {
        font-size: 2.2rem;
    }

    .profile-content h2 {
        font-size: 1.3rem; /* keep h2 larger than many h3s on smaller screens */
    }

    .intro-text p {
        font-size: 1rem;
    }

    .vision-text blockquote {
        font-size: 1.1rem;
    }

    @media (max-width: 480px) {
        .container {
            padding: 0 15px;
        }

        .profile-content h1 {
            font-size: 1.8rem;
        }

        .vision-text {
            padding: 20px;
        }

        .vision-text blockquote {
            font-size: 0.9rem;
        }
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .cases-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}