/* 1. Imports */
@import url("https://fonts.googleapis.com/css?family=Raleway:200,300,400,500&display=swap");

/* 2. CSS Variables */
:root {
    --primary-color: hsl(255, 40%, 73%);
    --primary-dark: hsl(254, 49%, 65%);
    --white: #ffffff;
    --border-light: rgba(218, 218, 218, 0.4);
    --black-overlay: rgba(0, 0, 0, 0.95);
    
    /* Spacing */
    --nav-height: 70px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* 3. Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Raleway", sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* 4. Navigation Styles */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    z-index: 1000;
    padding-top: env(safe-area-inset-top, 0);
}

.nav-container {
    height: var(--nav-height);
    padding: 0 var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-logo {
    color: var(--white);
    font-size: 32px;
    font-weight: 500;
    padding: 0 var(--spacing-sm);
    text-decoration: none;
}

.nav-divider {
    width: 1px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-tagline {
    color: var(--white);
    font-weight: 200;
    font-size: 20px;
    padding-left: var(--spacing-sm);
}

.nav-right {
    position: relative;
}

/* Update this section in your CSS */
.nav-right-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.nav-right-links a {
    color: var(--white);
    font-weight: 300;
    font-size: 16px;
    text-transform: lowercase;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.nav-right-links a:hover {
    opacity: 0.8;
}
/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: var(--spacing-sm);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background-color: var(--white);
    transition: transform 0.3s ease;
}
/* Artist Header Styles */
.artist-header {
    margin-top: calc(var(--nav-height) + 2rem);
    text-align: center;
    padding: 2rem 1rem;
}

.artist-name {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: #333;
}

.artist-title {
    font-size: 1.25rem;
    font-weight: 200;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
}
/* 5. Gallery Grid Styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2rem;  /* Removed top padding */
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Changed to 2 columns */
    gap: 3rem; /* Increased gap */
    padding: 2rem;
    max-width: 1800px; /* Increased max-width */
    margin: 0 auto;
}

.artwork-card {
    position: relative;
    cursor: pointer;
    background: white;
    border-radius: 12px; /* Slightly larger radius */
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1;
    padding: 1rem;
    min-height: 500px; /* Set minimum height */
}

.artwork-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.artwork-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.artwork-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.artwork-card:hover .artwork-info {
    opacity: 1;
}

.artwork-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.artwork-info p {
    margin: 0.25rem 0;
    text-align: center;
}

/* 6. Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--black-overlay);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 95%;
    height: 95vh;
    margin: 2.5vh auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-image-container {
    position: relative;
    width: 100%;
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.modal-image {
    max-height: calc(95vh - 150px);
    max-width: 95%;
    object-fit: contain;
}

.modal-image.portrait {
    height: 100%;
    width: auto;
}

.modal-image.landscape {
    width: 100%;
    height: auto;
}

.modal-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    transform: translateY(0);
    transition: transform 0.3s ease;
    z-index: 1002;
}

.modal-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.modal-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 1.5rem;
    cursor: pointer;
    font-size: 2rem;
    transition: background 0.3s ease;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-prev {
    left: 2rem;
}

.modal-next {
    right: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1003;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.purchase-btn {
    background: #8e7ad1;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.purchase-btn:hover {
    background: purple;
}

/* 7. Footer Styles */
.footer {
    width: 100%;
    padding: var(--spacing-lg) 0;
    background-color: var(--primary-color);
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: var(--spacing-xl);
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    text-transform: lowercase;
    font-weight: 300;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: purple;
}

.footer-copyright {
    color: var(--white);
    font-weight: 300;
    font-size: 0.9rem;
}

/* Keep existing mobile styles but update the breakpoint */
@media screen and (max-width: 1024px) { /* Changed from 768px */
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
        padding: 1rem;
    }

    .artwork-card {
        min-height: auto;
        padding: 0.5rem;
    }
}
/* 8. Media Queries */
@media screen and (max-width: 768px) {
    .artist-header {
        margin-top: calc(var(--nav-height) + 1rem);
        padding: 1rem;
    }

    .artist-name {
        font-size: 2rem;
    }

    .artist-title {
        font-size: 1rem;
    }
    .gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .nav-container {
        padding: 0 var(--spacing-md);
    }

    .nav-logo {
        font-size: 28px;
    }

    .nav-tagline {
        font-size: 18px;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-right-links {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        gap: var(--spacing-xl);
        transition: right 0.3s ease;
        display: none; /* Hide by default on mobile */
    }

    .nav-right-links.active {
        right: 0;
        display: flex; /* Show when active */
    }

    .nav-right-links a {
        font-size: 18px;
        padding: var(--spacing-sm);
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Modal Mobile Styles */
    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .modal-image-container {
        padding-top: 80px;
    }

    .modal-info {
        padding: 0.75rem;
    }

    .modal-info-header {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 0.5rem;
        align-items: center;
    }

    .modal-info-text h2 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .modal-info-text p {
        font-size: 0.85rem;
        line-height: 1.2;
    }

    .modal-info-action {
        text-align: right;
        padding-right: 2.5rem;
    }

    .purchase-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .modal-nav-button {
        padding: 1rem;
        width: 40px;
        height: 40px;
    }

    .modal-prev {
        left: 0.5rem;
    }

    .modal-next {
        right: 0.5rem;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.5);
    }

    /* Footer Mobile Styles */
    .footer-container {
        flex-direction: column;
        gap: var(--spacing-lg);
        padding: 0 var(--spacing-md);
        text-align: center;
    }

    .footer-links {
        gap: var(--spacing-lg);
    }
}

/* 9. iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    .nav-wrapper {
        padding-top: env(safe-area-inset-top);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .nav-right-links {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}