/* Basic Reset & Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333; /* Default text color */
    background-color: #fff; /* Default background */
}

.container {
    width: 90%;
    max-width: 1200px; /* Standard max-width */
    margin: 0 auto;
    display: flex; /* Used in header */
    justify-content: space-between; /* Used in header */
    align-items: center; /* Used in header */
}

.container-team { /* Specific for team section if different width/padding needed */
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}


a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Styles (Homepage) */
header {
    background-color: #111;
    color: #f4f4f4;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

header .logo a {
    font-weight: bold;
    font-size: 1.1rem;
}

header nav ul {
    display: flex;
    align-items: center;
}

header nav ul li {
    margin-left: 15px;
}
header nav ul li:first-child {
    margin-left: 0;
}

header nav ul li a {
    padding: 0.5rem;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

header nav ul li a:hover,
header nav ul li a.active { /* Added active state for nav links */
    color: #fff; /* Or a brighter accent color */
    font-weight: bold;
}


header nav ul li .separator {
    color: #555;
    margin: 0 5px;
    font-size: 1.2rem;
    line-height: 1;
}

header .cart-icon a {
    font-size: 1.2rem;
}

/* Hero Section Styles */
#hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/hero-background.jpg');
    background-size: cover;
    background-position: center center;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    padding-top: 80px;
}

.hero-content {
    max-width: 900px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-content h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
}

.mission-points {
    display: inline-block;
    text-align: left;
    margin-top: 1rem;
}

.mission-points li {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    padding-left: 25px;
    position: relative;
    line-height: 1.4;
}

.mission-points li::before {
    content: '•';
    position: absolute;
    left: 5px;
    top: 0px;
    color: #fff;
    font-size: 1.4em;
    line-height: 1;
}

/* Team Section Styles */
#team {
    background-color: #0d0d0d;
    color: #e0e0e0;
    padding: 80px 0;
    text-align: center;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #fff;
}

.section-title p {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 60px;
}

.team-members {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

.team-member-card {
    padding: 25px;
    max-width: 300px;
    width: 100%;
    text-align: left;
    margin-bottom: 20px;
}

.team-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 25px auto;
    display: block;
    border: 4px solid #282828;
}

.team-member-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
}

.member-description {
    font-size: 0.95rem;
    color: #bbb;
    margin-bottom: 25px;
    line-height: 1.6;
    text-align: center;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ccc;
    color: #111;
    border: 2px solid transparent;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    font-size: 0.95rem;
}

.btn:hover {
    opacity: 0.9;
}

.btn-outline {
    background-color: transparent;
    color: #ccc;
    border-color: #555;
    display: block;
    margin: 0 auto;
    width: fit-content;
}

.btn-outline:hover {
    background-color: #333;
    color: #fff;
    border-color: #444;
}


/* Footer Styles (Common) */
footer {
    background-color: #0d0d0d;
    color: #a0a0a0;
    padding: 50px 0 30px 0;
    text-align: center;
}

.footer-divider {
    border: 0;
    height: 1px;
    background-color: #333;
    margin: 0 auto 40px auto;
    width: 90%;
    max-width: 1000px;
}

.footer-content h4 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-content .contact-name {
    font-size: 1.05rem;
    color: #ccc;
    margin-bottom: 8px;
    font-weight: bold;
}

.footer-content .contact-email a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-content .contact-email a:hover {
    text-decoration: underline;
    color: #fff;
}

.social-icons {
    margin: 25px 0;
}

.social-icons a {
    color: #ccc;
    font-size: 1.4rem;
    margin: 0 12px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.85rem;
    color: #777;
    margin-top: 25px;
}


/* ============================ */
/* Portfolio Page Specific Styles */
/* ============================ */

body.dark-theme {
    background-color: #0d0d0d;
    color: #e0e0e0;
}

header.portfolio-header {
    background-color: #0d0d0d;
    color: #f4f4f4;
    padding-top: 1rem; /* Reduced top padding */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

header.portfolio-header .nav-container { /* Targets container within portfolio header */
    justify-content: center;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem; /* Space for the border */
    width: 100%; /* Make border full width */
    max-width: none; /* Override .container max-width for this specific border */
}
header.portfolio-header .nav-container nav { /* Inner nav still respects a max-width */
    width: 90%;
    max-width: 1200px; /* Or your preferred max width for nav items */
    margin: 0 auto; /* Center the actual nav items */
    display: flex; /* Ensure nav ul behaves as expected */
    justify-content: center;
}

header.portfolio-header nav ul li a.active { /* Specific active style for portfolio nav if needed */
    color: #fff;
    font-weight: bold;
}

.page-main-title {
    padding: 15px 0; /* Adjusted padding */
    text-align: center;
    border-bottom: 1px solid #333; /* Line below main title */
}

.page-main-title h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.portfolio-page-content {
    padding-top: 150px; /* Approximate header height. Adjust as needed! */
    min-height: calc(100vh - 200px); /* Ensure footer is pushed down */
}

#portfolio-gallery-section {
    padding: 30px 0 60px 0;
}

.container-portfolio {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

.portfolio-title-style {
    text-align: center;
    margin-bottom: 30px; /* Adjusted margin */
}

.portfolio-title-style h2 {
    font-size: 2rem;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 5px; /* Reduced margin */
    font-weight: bold;
}

.portfolio-title-style p {
    font-size: 1rem;
    color: #aaa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    line-height: 0; /* Remove potential gaps under images */
    /* aspect-ratio property removed to allow natural image aspect ratio */
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: auto; /* Crucial for maintaining aspect ratio */
    display: block;
    border-radius: 4px;
    transition: transform 0.3s ease-out, filter 0.3s ease-out;
    /* object-fit: cover removed */
}

.gallery-item:hover img {
    transform: scale(1.03);
    filter: brightness(0.85);
}


/* Responsive Adjustments (General and Portfolio) */
@media (max-width: 992px) {
    /* Hero on Homepage */
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content h2 { font-size: 1.6rem; }
    .hero-content h3 { font-size: 1.3rem; }
    .mission-points li { font-size: 0.9rem; }

    /* Gallery on Portfolio Page */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .portfolio-page-content {
        padding-top: 140px; /* Adjust */
    }
}

@media (max-width: 768px) {
    /* Homepage Header */
    header .container {
        flex-direction: column;
        padding-bottom: 0.5rem;
    }
    header nav { margin-top: 0.5rem; margin-bottom: 0.5rem; }
    header nav ul { flex-wrap: wrap; justify-content: center; }
    header nav ul li { margin: 5px 10px; }
    header nav ul li .separator { display: none; }
    .cart-icon { position: absolute; top: 1rem; right: 1rem; }
    .logo { margin-bottom: 0.5rem; }

    /* Homepage Hero */
    #hero { padding-top: 120px; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content h2 { font-size: 1.4rem; }
    .hero-content h3 { font-size: 1.1rem; }
    .mission-points li { font-size: 0.85rem; padding-left: 20px; }
    .mission-points li::before { left: 0; }

    /* Homepage Team Section */
    .team-members { flex-direction: column; align-items: center; }
    .team-member-card { max-width: 85%; margin-bottom: 30px; }
    .section-title h2 { font-size: 1.8rem; } /* General section title */
    .section-title p { font-size: 0.9rem; margin-bottom: 40px; } /* General section title p */

    /* Portfolio Page Header */
    header.portfolio-header .nav-container nav ul { /* Stack nav items */
        flex-direction: column;
        align-items: center;
    }
    header.portfolio-header .nav-container nav ul li {
        margin: 8px 0;
    }
     header.portfolio-header .nav-container nav ul li .separator {
        display: none; /* Ensure separator is hidden here too */
    }

    .portfolio-page-content {
        /* Adjust carefully based on how tall the stacked nav + main title is */
        padding-top: 220px; /* Example, may need adjustment */
    }
    .page-main-title h1 { font-size: 1.4rem; }
    .portfolio-title-style h2 { font-size: 1.6rem; } /* Portfolio specific title */

    /* Portfolio Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    .container-portfolio { width: 95%; }

    /* Footer (General) */
    .footer-content.container { width: 95%; }
}

@media (max-width: 480px) {
    /* Homepage Hero */
    .hero-content h1 { font-size: 1.8rem; }
    .hero-content h2 { font-size: 1.2rem; }

    /* Homepage Team */
    .team-photo { width: 100px; height: 100px; }
    .team-member-card h3 { font-size: 1.2rem; }
    .member-description { font-size: 0.9rem; }

    /* Buttons (General) */
    .btn { padding: 10px 20px; font-size: 0.9rem; }

    /* Social Icons (General) */
    .social-icons a { font-size: 1.2rem; margin: 0 8px; }

    /* Portfolio Page */
     .portfolio-page-content {
        padding-top: 200px; /* Adjust based on nav height */
    }
    .page-main-title h1 { font-size: 1.3rem; }
    .gallery-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }

/* ============================ */
/* Journal Page Specific Styles */
/* ============================ */

/* Using Lora for body text in journal for a more "book-like" feel */
.journal-page-content, .journal-page-content p, .journal-page-content li {
    font-family: 'Lora', serif;
}

.journal-page-content {
    padding-top: 150px; /* Adjust based on portfolio-header height */
    padding-bottom: 40px;
}

.journal-container {
    width: 90%;
    max-width: 800px; /* Good width for readability */
    margin: 0 auto;
    color: #ccc; /* Lighter text on dark background */
}

.journal-intro-text {
    font-style: italic;
    color: #aaa;
    margin-bottom: 40px;
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 20px;
}
.journal-intro-text p {
    font-family: 'Montserrat', sans-serif; /* Keep intro text in main font */
}


article.journal-page {
    background-color: #1a1a1a; /* Slightly lighter than page background for page feel */
    padding: 30px 40px;
    margin-bottom: 30px;
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.journal-page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
    text-align: center;
}

.journal-page-header h2 { /* Chapter */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 5px;
    font-weight: 700;
}

.journal-page-header h3 { /* Main Title */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: #ddd;
    margin-bottom: 10px;
    font-weight: 700;
}

.journal-page-header h4 { /* Volume/Subtitle */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: #bbb;
    margin-bottom: 8px;
    font-weight: 400;
}
.journal-page-header h5 { /* Sub-subtitle (Inledning) */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: #ccc;
    font-weight: bold;
    margin-top: 10px;
}


.journal-page p {
    font-size: 1rem; /* 16px default */
    line-height: 1.7;
    margin-bottom: 1.2em;
    color: #d0d0d0; /* Slightly off-white for readability */
}

.journal-page strong {
    font-weight: 700;
    color: #e0e0e0;
}

.journal-page em {
    font-style: italic;
}

.journal-page ul {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 1.2em;
}

.journal-page ul li {
    margin-bottom: 0.5em;
    line-height: 1.7;
    color: #d0d0d0;
}

.page-number {
    text-align: right;
    font-style: italic;
    color: #888;
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px dashed #444;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
}

.section-divider { /* For separating sections within a "page" if needed */
    border: 0;
    height: 1px;
    background-color: #555;
    margin: 30px 0;
}

/* Responsive Adjustments for Journal */
@media (max-width: 768px) {
    .journal-page-content {
        padding-top: 220px; /* Adjust if portfolio header height changes on mobile */
    }
    .journal-container {
        width: 95%;
    }
    article.journal-page {
        padding: 20px 25px;
    }
    .journal-page-header h2 { font-size: 1.6rem; }
    .journal-page-header h3 { font-size: 1.3rem; }
    .journal-page-header h4 { font-size: 1rem; }
    .journal-page p { font-size: 0.95rem; }
}

@media (max-width: 480px) {
     .journal-page-content {
        padding-top: 200px; /* Adjust */
    }
    article.journal-page {
        padding: 15px 20px;
    }
    .journal-page-header h2 { font-size: 1.4rem; }
    .journal-page-header h3 { font-size: 1.2rem; }
    .journal-page p { font-size: 0.9rem; }
    .page-number { font-size: 0.8rem; }
}
