/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary-color: #A0522D; /* Sienna - tom terroso elegante */
    --secondary-color: #6C7A89; /* Azul acinzentado */
    --accent-color: #FFD700; /* Ouro */
    --text-dark: #2c3e50; /* Azul escuro */
    --text-light: #ecf0f1; /* Cinza claro */
    --bg-light: #f8f9fa; /* Branco leve */
    --bg-dark: #34495e; /* Azul escuro */
    --border-color: #ddd;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    scroll-behavior: smooth;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* --- Login Page --- */
#login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    -webkit-filter: blur(8px);
    z-index: -1;
    transition: background-image 0.5s ease-in-out;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.login-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-medium);
    text-align: center;
    max-width: 450px;
    width: 100%;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.login-box h1 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 2.2rem;
}

.login-box p {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.login-box input[type="email"],
.login-box input[type="password"] {
    width: calc(100% - 30px);
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-box input[type="email"]:focus,
.login-box input[type="password"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(160, 82, 45, 0.2);
    outline: none;
}

.login-box button {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.login-box button:hover {
    background-color: #8B4513; /* Mais escuro */
    transform: translateY(-2px);
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    font-weight: bold;
}

.success-message {
    color: #27ae60;
    margin-top: 15px;
    font-weight: bold;
}

/* --- Gallery Page (Client Portal) --- */
.client-header {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 100;
}

.client-header h1 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
}

.selection-status {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.client-header nav button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.client-header nav button:hover {
    background-color: #8B4513;
}

.client-main {
    padding: 2rem;
    max-width: 1200px;
    margin: 20px auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px var(--shadow-light);
}

section {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

section h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    display: inline-block;
}

#generalMessageContent {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    background-color: #f0f4f7;
    padding: 15px;
    border-left: 5px solid var(--secondary-color);
    border-radius: 5px;
}

.masonry-grid {
    /* O Masonry JS irá gerenciar o layout de colunas */
    margin: -10px; /* Compensa o padding/margin das fotos */
}

.photo-card {
    width: calc(33.33% - 20px); /* Padrão para 3 colunas, ajustado pelo JS */
    margin: 10px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    cursor: pointer;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.photo-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-card:hover img {
    transform: scale(1.03);
}

.photo-card.selected {
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 0 5px rgba(160, 82, 45, 0.3);
}

.photo-card.liked {
    border: 3px solid var(--accent-color);
}


.photo-actions {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-actions .action-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.photo-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--secondary-color);
    transition: color 0.2s ease, transform 0.2s ease;
}

.photo-actions button.like-btn.active {
    color: #e74c3c; /* Vermelho para curtido */
}

.photo-actions button.select-btn.active {
    color: var(--primary-color);
}

.photo-actions button:hover {
    transform: scale(1.1);
}

.photo-actions textarea {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.9rem;
    resize: vertical;
}

.social-preview-btn {
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    align-self: flex-end; /* Alinha o botão para a direita dentro do flex column */
}

.social-preview-btn:hover {
    background-color: #5b6775;
}

#selectionSummary {
    text-align: center;
    background-color: var(--bg-light);
}

#selectedPhotosSummary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    min-height: 50px; /* Garante que a área apareça mesmo sem fotos */
}

#selectedPhotosSummary img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid var(--primary-color);
}

#upsellInfo {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd; /* Amarelo claro para alerta */
    border: 1px solid #ffeeba;
    border-radius: 8px;
    color: #856404;
    font-weight: bold;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 30px;
}

.cta-button:hover {
    background-color: #8B4513;
    transform: translateY(-2px);
}

.secondary-button {
    background-color: #ccc;
    color: #333;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.secondary-button:hover {
    background-color: #bbb;
    transform: translateY(-2px);
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-medium);
    width: 90%;
    max-width: 600px;
    position: relative;
    text-align: center;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.modal-content p {
    margin-bottom: 20px;
}

.modal-content button {
    margin: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .client-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    .client-header h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    .selection-status {
        margin-bottom: 15px;
    }
    .client-header nav {
        width: 100%;
    }
    .client-header nav button {
        width: 100%;
    }

    .client-main {
        padding: 1rem;
        margin: 10px auto;
    }

    section {
        padding: 1.5rem;
    }

    .photo-card {
        width: calc(50% - 20px); /* 2 colunas em telas menores */
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 20px;
    }
    .login-box h1 {
        font-size: 1.8rem;
    }

    .photo-card {
        width: calc(100% - 20px); /* 1 coluna em telas muito pequenas */
    }
}