/* Importação de fontes para aproximar a identidade visual da imagem */
@import url('https://fonts.googleapis.com/css2?family=Lobster&family=Poppins:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #080808; 
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* Container centralizado estilo Linktree/Mobile */
.app-container {
background-color: #640010; 
    width: 95%;
    max-width: 1300px;
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.2); 
}

.hero {
    position: relative;
    width: 100%;
}

.hero-img {
    width: 100%;
    max-height: 50vh; /* Limita a altura em telas grandes para não esconder o resto do site */
    object-fit: cover; /* Corta as sobras proporcionalmente */
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    display: block;
}

.content {
    width: 100%;
    max-width: 600px; /* Você pode aumentar este valor se quiser o grid mais largo */
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 40px;
}

.brand h1 {
    font-family: 'Lobster', cursive; /* Aproximação da fonte do título */
    font-size: 3.5rem;
    line-height: 1;
    letter-spacing: 1px;
}

.brand h2 {
    font-size: 1.2rem;
    font-weight: 400;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    margin-bottom: 50px;
}

.portfolio-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.portfolio-card img {
    width: 100%;
    height: auto; 
    display: block;
    image-rendering: auto; 
    image-rendering: high-quality;
    transform: translateZ(0); 
    backface-visibility: hidden;
    will-change: transform;
}

.card-title {
    position: absolute;
    bottom: 12px;
    left: 12px;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: center;
}

.btn {
    background-color: #e5c9b9; /* Cor baseada na imagem de referência */
    color: #000000;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 30px;
    font-weight: 700;
    width: 80%;
    text-align: center;
    transition: transform 0.2s, background-color 0.2s;
}

.btn:hover {
    background-color: #d6b7a5;
    transform: scale(1.02);
}

@media (min-width: 768px) {
    .app-container {
        width: 80%;
    }
}

.admin-link {
    position: fixed; 
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    color: #e0e0e0; /* Use uma cor que se misture com o fundo do seu rodapé */
    text-decoration: none;
    opacity: 0.3;
    transition: opacity 0.3s;
    z-index: 9999;
}

.admin-link:hover {
    opacity: 1;
    color: #666;
}

.admin-logo {
    max-width: 250px !important; /* Força o limite de largura */
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* Navegação Principal */
.main-nav {
    display: flex;
    justify-content: flex-start;
    gap: 35px;
    padding: 25px 40px;
    background: transparent; 
    position: absolute; 
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.main-nav a {
    color: #ffffff; 
    text-decoration: none;
    font-weight: 400; 
    font-size: 15px;
    opacity: 0.65; 
    transition: opacity 0.3s ease;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    opacity: 1;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #ffffff;
    transition: width 0.3s ease;
    opacity: 0.8;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Responsividade mobile */
@media (max-width: 768px) {
    .main-nav {
        gap: 20px;
        padding: 15px;
        position: relative; 
        background:#111;
    }
    
    .main-nav a {
        font-size: 14px;
    }
}

/* Título da Página de Portfólio */
.page-title {
    text-align: center;
    color: #ffffff;
    font-size: 2.8rem;
    margin: 20px 0 40px 0;
    /* Substitua 'SuaFonte' pelo nome da fonte cursiva/decorativa usada no design original */
    font-family: 'SuaFonte', cursive, sans-serif; 
}

/* Ajustes para os cards de Categoria (Texto sobreposto) */
.category-grid .portfolio-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.category-grid .portfolio-card img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

/* Texto posicionado sobre a imagem */
.overlay-title {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 500;
    /* Sombra para garantir a legibilidade sobre áreas claras da fotografia */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    background: transparent; /* Sobrescreve fundos se houver na classe original */
}

/* Grelha de Visualização de Fotos (galeria_view.php) */
.gallery-view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-photo {
    border-radius: 8px;
    overflow: hidden;
}

.gallery-photo img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    image-rendering: auto; 
    image-rendering: high-quality;
    transform: translateZ(0); 
    backface-visibility: hidden;
    will-change: transform;
}

.gallery-photo img:hover {
    transform: scale(1.03);
}

/* Ajuste mobile para as fotos */
@media (max-width: 768px) {
    .gallery-view-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-photo img {
        height: auto;
        aspect-ratio: 4/5; /* Mantém uma proporção agradável no telemóvel */
    }
}

/* Estrutura do Lightbox Público */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

#lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-nav {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: color 0.3s ease;
    user-select: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:hover, .lightbox-close:hover {
    color: #a8a8a8;
}


.about-content {
    max-width: 800px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #fff; /* Ajuste conforme o tema do seu site */
    margin-bottom: 1.5rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}