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

:root {
    --primary-color: #b58b8b;
    --secondary-color: #d4a5a5;
    --text-color: #5a4a4a;
    --light-bg: #faf5f5;
    --white: #ffffff;
    --off-white: rgb(249, 248, 247);
    --gray: #9e8a8a;
    --border-color: #e8d9d9;
    --accent-pink: #e6b8b8;
    --dark-pink: #8b6b6b;
    --dark-gray: rgb(76, 74, 74);
    --secondary-font: 'Source Sans Pro', sans-serif;
    --heading_1_small_font_size: min(3.75rem, 1rem + 3.06vh);
    --heading-2_font-size-large: 2.25rem;
    --heading_padding-top-and-bottom-wide: calc( 4vmax * 1 );
    --btn-padding: 13.8px 34.5px;
    --btn-font-size: 1.15rem;
    --btn-border-width: 2px;
    --large-paragraph-font-size: 1.25rem;
}

body {
    font-family: 'Gupter', serif;
    line-height: 1.6;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--off-white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

p {
    letter-spacing: -0.3px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: rgb(76, 74, 74);
}

main {
    padding-top: 80px;
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Gupter', serif;
    font-weight: 400;
    letter-spacing: -0.05em;
    line-height: 0.95em;
}

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

/* Header and Navigation */
header {
    background: var(--off-white);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

header.scrolled {
    background: var(--off-white);
}

.navbar {
    padding: 1.5rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.logo-name {
    font-family: 'Gupter', serif;
    font-size: 1.68rem;
    font-weight: 400;
    color: var(--dark-gray);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: rgb(76, 74, 74);
    transition: all 0.3s;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    font-family: var(--secondary-font);
}

header.scrolled .nav-menu a {
    color: rgb(76, 74, 74);
}

.nav-menu a:hover {
    border-bottom-color: rgb(76, 74, 74);
}

header.scrolled .nav-menu a:hover {
    border-bottom-color: rgb(76, 74, 74);
}

.nav-menu a.active {
    border-bottom-color: var(--primary-color);
}

header.scrolled .nav-menu a.active {
    border-bottom-color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    width: 25px;
    height: 20px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

header.scrolled .hamburger span {
    background: var(--primary-color);
}

.hamburger.active span {
    background: var(--primary-color);
    position: absolute;
    margin: 0;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* Footer */
footer {
    background: var(--off-white);
    color: var(--dark-gray);
    padding: 2rem 0;
    margin-top: 4rem;
}

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

footer .social-links {
    display: flex;
    gap: 1.5rem;
}

footer .social-links a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: opacity 0.3s;
}

footer .social-links a:hover {
    opacity: 0.6;
}

/* Buttons */
.btn, .btn-secondary {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    padding: var(--btn-padding);
    font-size: var(--btn-font-size);
    border-radius: 0;
    border: var(--btn-border-width) solid var(--dark-gray);
}

.btn {
    background: var(--secondary-color);
    color: var(--white);
}

.btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark-gray);
    margin-top: 2rem;
}

.btn-secondary:hover {
    background: var(--dark-gray);
    color: var(--white);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('/images/family-portraits/whitney-family-behind.jpg') center/cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--white);
}

@media (orientation: portrait) {
    .hero {
        background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('/images/family-portraits/family-lying.jpg') center/cover;
        background-attachment: fixed;
        min-height: auto;
        height: 60vh;
    }
}

.hero-content {
    max-width: 500px;
    padding: 2rem;
    margin-left: 5%;
    text-align: left;
}

.hero-content h1 {
    font-size: 6rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    color: var(--white);
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--white);
    display: inline-block;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    color: var(--white);
    font-family: var(--secondary-font);
    letter-spacing: 0.2em;
    font-weight: 600;
}

/* Intro Text Section */
.intro-text {
    padding: var(--heading_padding-top-and-bottom-wide) 0 0;
    text-align: center;
    background: var(--off-white);
}

.intro-text h2 {
    font-size: var(--heading-2_font-size-large);
    font-weight: 400;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.intro-divider {
    width: 45%;
    height: 1px;
    background: var(--primary-color);
    margin: 2rem auto var(--heading_padding-top-and-bottom-wide);
    opacity: 0.4;
    border: none;
}

/* Featured Work Section */
.featured-work {
    padding: calc(var(--heading_padding-top-and-bottom-wide) / 2) 0 var(--heading_padding-top-and-bottom-wide);
}

.featured-work h2 {
    text-align: center;
    font-size: 1.71875rem;
    margin-bottom: 3rem;
    color: var(--dark-gray);
    font-family: var(--secondary-font);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(375px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    text-decoration: none;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay span {
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.placeholder-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-box {
    width: 100%;
    height: 100%;
    background: #fde8e8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.placeholder-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center -75px;
    border-radius: 8px;
}

.placeholder-item:hover .placeholder-box {
    background: #fdd8d8;
}

.featured-work {
    text-align: center;
}

/* Services Section */
.services {
    background: var(--light-bg);
    padding: 4rem 0;
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.service-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* About Page */
.about-hero, .portfolio-hero, .contact-hero {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 0 1.5rem;
    text-align: center;
}

.about-hero h1, .portfolio-hero h1, .contact-hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.about-hero p, .portfolio-hero p, .contact-hero p {
    margin: 0;
}

.about-content, .about-why-choose, .portfolio-gallery, .contact-content {
    padding: 4rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    align-items: start;
}

.about-grid .about-heading {
    grid-column: 2;
    grid-row: 1;
}

.about-grid .about-image {
    grid-column: 1;
    grid-row: 1 / 3;
}

.about-grid .about-text {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.about-grid-reverse {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: start;
}

.about-grid-reverse .about-why-heading {
    grid-column: 1;
    grid-row: 1;
}

.about-grid-reverse .about-image {
    grid-column: 2;
    grid-row: 1 / 3;
}

.about-grid-reverse .about-why-text {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.about-image img {
    width: 100%;
}

.about-heading h2, .about-why-heading h2 {
    color: var(--dark-gray);
    font-size: var(--heading-2_font-size-large);
    margin-bottom: 1rem;
}

.about-text h3, .about-why-text h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1rem;
    font-family: var(--secondary-font);
    font-size: var(--large-paragraph-font-size);
}

.about-text ul {
    margin-left: 2rem;
}

.about-text li {
    margin-bottom: 0.5rem;
}

.about-why-text p {
    font-family: var(--secondary-font);
    font-size: var(--large-paragraph-font-size);
    line-height: 1.8;
}

.credentials {
    background: var(--light-bg);
    padding: 4rem 0;
}

.credentials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.credential-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.credential-item h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Portfolio Page */
.portfolio-intro-heading {
    font-size: var(--heading_1_small_font_size);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark-gray);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-intro-heading::after {
    content: '';
    display: block;
    width: 1px;
    height: 60px;
    background: var(--dark-gray);
    margin: 2rem auto 3rem;
}

.portfolio-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.selector-btn {
    padding: 12px 30px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-family: 'Gupter', serif;
    font-weight: 500;
    color: var(--text-color);
    min-height: 44px;
    white-space: nowrap;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.selector-btn:hover {
    background: var(--light-bg);
    border-color: var(--secondary-color);
}

.selector-btn.active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    background: var(--light-bg);
}

.portfolio-item.tall {
    grid-row: span 2;
}

.portfolio-item.wide {
    grid-column: span 2;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.portfolio-overlay .category {
    color: var(--accent-pink);
    font-size: 0.9rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.cta-section {
    background: var(--light-bg);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info .info-item {
    margin-bottom: 2rem;
}

.contact-info h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--text-color);
    text-decoration: none;
}

.contact-info a:hover {
    color: var(--secondary-color);
}

.contact-form-wrapper h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.error-message ul {
    margin-left: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .logo-name {
        font-size: 1.3rem;
    }

    .logo-subtitle {
        font-size: 0.6rem;
    }

    .logo-ornament {
        font-size: 0.8rem;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 2rem;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        color: rgb(76, 74, 74);
        text-shadow: none;
        font-size: 1.2rem;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        color: var(--primary-color);
    }

    .hero-content h1 {
        font-size: 4.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .about-grid,
    .about-grid-reverse,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-grid .about-heading {
        grid-column: 1;
        grid-row: auto;
        order: 1;
    }

    .about-grid .about-image {
        grid-column: 1;
        grid-row: auto;
        order: 2;
    }

    .about-grid .about-text {
        grid-column: 1;
        grid-row: auto;
        order: 3;
    }

    .about-intro-heading {
        font-size: var(--heading-2_font-size-large);
        text-align: center;
        margin-bottom: 2rem;
    }

    .about-grid-reverse .about-why-heading {
        grid-column: 1;
        grid-row: auto;
        order: 1;
    }

    .about-grid-reverse .about-image {
        grid-column: 1;
        grid-row: auto;
        order: 2;
    }

    .about-grid-reverse .about-why-text {
        grid-column: 1;
        grid-row: auto;
        order: 3;
    }

    .gallery-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .about-hero h1,
    .portfolio-hero h1,
    .contact-hero h1 {
        font-size: 2rem;
    }

    .about-hero,
    .portfolio-hero,
    .contact-hero {
        padding-top: 5rem;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        width: 80%;
    }

    .logo-name {
        font-size: 1.1rem;
    }

    .logo-subtitle {
        font-size: 0.55rem;
        letter-spacing: 1.5px;
    }

    .logo-ornament {
        font-size: 0.7rem;
    }

    .filter-buttons,
    .portfolio-selector {
        gap: 0.5rem;
    }

    .filter-btn,
    .selector-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        flex: 1 1 auto;
        min-width: fit-content;
    }

    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .portfolio-item {
        aspect-ratio: 1 / 1;
    }

    .portfolio-item.wide {
        grid-column: span 1;
    }

    .portfolio-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .hero-content p {
        font-size: 1rem;
    }
}
