/* Global Font Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700&display=swap');

/* 1. Foundational Styles */
body {
    font-family: 'Montserrat', Arial, sans-serif;
    margin: 0;
    color: #333;
    background-color: #fff;
    line-height: 1.6;
}

.main-container { /* Unified main content container class */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

p {
    margin-bottom: 1em;
    font-size: 1rem;
    color: #555;
}

a {
    text-decoration: none;
    color: #333;
}
a:hover {
    color: #000;
}

h1, h2, h3, h4, h5, h6 {
    color: #000;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.page-title { /* For main headings on About/Portfolio */
    font-size: 2.8rem;
    margin-bottom: 25px;
    font-weight: 300;
    text-align: left;
    margin-top: 0; /* For titles at the start of a section */
}

/* 2. Header Styles (Standardized) */
header {
    padding: 25px 0;
    border-bottom: 1px solid #eaeaea;
    position: relative;
}

.header-container { /* Standardized header inner container */
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none; /* Remove underline if logo is wrapped in <a> */
}
.logo:hover {
    text-decoration: none;
}


.logo-icon-container {
    margin-right: 12px;
}
.logo-icon-container svg {
    display: block;
    width: 36px;
    height: 36px;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.logo-text-main,
.logo-text-sub {
    font-weight: 500;
    text-transform: uppercase;
    color: #000;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Navigation (Desktop) */
nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}
nav li {
    margin-left: 40px;
}
nav a {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    font-weight: 400;
}
nav a:hover,
nav a.active {
    color: #000;
    font-weight: 500;
}

/* Mobile Navigation Toggle Button (Only on contact.html) */
.mobile-nav-toggle {
    display: none; /* Hidden by default, shown via media query only if present */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}
.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* 3. Main Content Area */
main {
    padding: 50px 0;
}

/* 4. About Page Specific Styles */
.about-content {
    display: flex;
    gap: 40px;
    text-align: left;
}
.about-content h1.page-title { /* Ensure page-title style is applied */
    /* Styles from .page-title will apply */
}
.about-content h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
}
.about-image {
    flex: 1 1 40%;
    min-width: 280px;
}
.about-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.about-text {
    flex: 1 1 55%;
}
.about-text p {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
}
.about-text ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5em;
}
.about-text ul li {
    margin-bottom: 1em;
    font-size: 0.95rem;
    color: #555;
}
.about-text ul li strong {
    color: #333;
    font-weight: 500;
}

/* 5. Portfolio Page Specific Styles */
.portfolio-intro {
    margin-bottom: 40px;
    max-width: 800px;
}
.portfolio-intro p {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    text-align: left;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.gallery-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid #f0f0f0;
}

/* 6. Contact Page Specific Styles */
.contact-title {
    font-size: 2.8rem;
    margin-bottom: 25px;
    font-weight: 300;
    color: #000;
    text-align: center;
}
.intro-text {
    max-width: 650px;
    margin: 0 auto 40px auto;
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    text-align: center;
}
.social-links {
    margin-bottom: 50px;
    text-align: center;
}
.social-item {
    margin-bottom: 25px;
    display: inline-block;
    vertical-align: top; /* Align items nicely if they wrap */
    margin-right: 15px;
    margin-left: 15px;
}
.social-item a { /* Make the whole social item clickable */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
}
.social-item a:hover, .social-item a:hover p, .social-item a:hover svg.social-icon {
    color: #000;
}
.social-item svg.social-icon {
    margin-bottom: 8px;
    stroke: #000; /* Default to black as per original */
    fill: none;
    transition: color 0.2s;
}
.social-item p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: color 0.2s;
}
.form-section {
    max-width: 550px;
    margin: 0 auto;
    text-align: left;
}
.form-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 400;
    color: #333;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: 'Montserrat', Arial, sans-serif;
    border-radius: 3px;
}
.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form textarea::placeholder {
    color: #999;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: #888;
    outline: none;
}
.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}
.contact-form button {
    background-color: #000;
    color: #fff;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    float: right;
}
.contact-form button:hover {
    background-color: #333;
}
.contact-form::after {
    content: "";
    clear: both;
    display: table;
}

/* 7. Footer Styles */
footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
    font-size: 0.9rem;
    color: #555;
    border-top: 1px solid #eaeaea;
}
footer p {
    margin: 0;
    line-height: 1.5;
}
footer strong, footer a {
    font-weight: 500;
    color: #000;
}
footer a:hover {
    text-decoration: underline;
}

/* 8. Responsive Adjustments */
@media (max-width: 768px) {
    /* Default Nav for About/Portfolio on mobile (no toggle) */
    header:not(.contact-page header) nav ul { /* A bit of a trick, might need better targeting if contact-page class isn't on body */
        justify-content: center;
        flex-wrap: wrap;
    }
     header:not(.contact-page header) nav li {
        margin: 5px 10px; /* Slightly less margin */
    }

    /* Mobile Nav System for contact.html */
    body.contact-page header nav {
        display: none; /* Hide nav by default on contact page mobile */
    }
    body.contact-page header nav.active { /* When toggled open */
        display: block !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        border-top: 1px solid #eaeaea;
        border-bottom: 1px solid #eaeaea;
        z-index: 1000;
        padding: 10px 0;
    }
    body.contact-page header nav.active ul {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }
    body.contact-page header nav.active li {
        margin: 10px 0;
        margin-left: 0;
    }

    .mobile-nav-toggle { /* Show hamburger button */
        display: block;
    }
    /* Hamburger to X animation */
    .mobile-nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
    .mobile-nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Content Adjustments */
    .page-title,
    .contact-title { /* Unified title sizing */
        font-size: 2.2rem;
    }
    .intro-text, .about-text p, .portfolio-intro p {
        font-size: 0.95rem;
    }
    .about-content {
        flex-direction: column;
    }
    .about-image {
        margin-bottom: 30px;
    }
    .form-section {
        padding: 0 15px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 480px) {
    .header-container,
    .main-container {
        padding: 0 15px;
    }
    .page-title,
    .contact-title {
        font-size: 1.8rem;
    }
    .about-content h2 {
        font-size: 1.3rem;
    }
    .contact-form button {
        width: 100%;
        float: none;
        margin-top: 10px;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .social-item { /* Stack social items fully on very small screens */
        display: block;
        margin-right: 0;
        margin-left: 0;
    }
     /* Adjust nav li for About/Portfolio on very small screens if they were still horizontal */
    header:not(.contact-page header) nav ul {
        /* Could make them column here too if needed, or reduce font/margins */
    }
    header:not(.contact-page header) nav li {
        margin: 5px 8px;
    }
}