:root {
    /* Premium Palette */
    --primary-pink: #fce4ec;
    /* Lighter, more elegant pink */
    --accent-pink: #c2185b;
    /* Deeper, more sophisticated pink */
    --gold: #d4af37;
    /* Metallic gold for accents */
    --deep-brown: #3e2723;
    /* Rich coffee brown */
    --cream: #fff9f5;
    /* Warm off-white */
    --white: #ffffff;
    --border-color: #e0c3bc;
    --shadow-soft: 0 10px 30px rgba(62, 39, 35, 0.08);
    --shadow-hover: 0 15px 35px rgba(62, 39, 35, 0.12);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--cream);
    color: var(--deep-brown);
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    /* Texture retained */
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Header & Navigation --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 8%;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

header.sticky {
    background: rgba(255, 255, 255, 0.98);
    padding: 15px 8%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--accent-pink);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 35px;
}

.nav-links a {
    text-decoration: none;
    color: var(--deep-brown);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-pink);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--accent-pink);
}

.mobile-menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--deep-brown);
}

.close-menu {
    display: none;
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--accent-pink);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 8% 80px;
    gap: 60px;
    background: linear-gradient(135deg, rgba(252, 228, 236, 0.4) 0%, rgba(255, 249, 245, 0.1) 100%);
}

.hero-text {
    flex: 1;
    z-index: 2;
}

.hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--deep-brown);
}

.hero-text h1 span {
    color: var(--accent-pink);
    font-family: 'Great Vibes', cursive;
    font-size: 1.3em;
    display: block;
    margin-top: -10px;
    font-weight: 400;
}

.hero-text p {
    font-size: 1.15rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 500px;
}

.hero-img-horizontal {
    flex: 1.1;
    position: relative;
    /* padding: 15px; Removed box padding for cleaner look */
    border-radius: 12px;
    /* box-shadow: var(--shadow-soft); */
}

.hero-img-horizontal img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: var(--shadow-soft);
}

.hero-img-horizontal::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    bottom: -20px;
    left: -20px;
    border: 2px solid var(--gold);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.6;
}

/* --- Buttons --- */
.btn-atelier-card {
    background: var(--white);
    color: var(--accent-pink);
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    /* More subtle border */
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    letter-spacing: 1px;
    cursor: pointer;
}

.btn-atelier-card:hover {
    background: var(--accent-pink);
    color: var(--white);
    border-color: var(--accent-pink);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(194, 24, 91, 0.2);
}

.hero-text .btn-atelier-card {
    background-color: var(--accent-pink);
    color: var(--white);
    padding: 16px 45px !important;
    font-size: 0.95rem !important;
    border: none;
}

.hero-text .btn-atelier-card:hover {
    background-color: #ad1457;
}

/* --- Categorias --- */
.categories-section {
    padding: 100px 8% 60px;
    text-align: center;
    background-color: var(--white);
}

.categories-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.category-item {
    text-align: center;
    width: 130px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.category-item:hover {
    transform: translateY(-10px);
}

/* Ícone Categoria */
.circle-box {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: var(--cream);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 2px dashed var(--accent-pink);
}

.category-item:hover .circle-box {
    background: var(--primary-pink);
    border-style: solid;
}

.circle-box i {
    font-size: 2.8rem;
    color: var(--accent-pink);
    pointer-events: none;
}

.category-item span {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
    font-family: 'Playfair Display', serif;
}

/* --- Especialidades --- */
.section {
    padding: 120px 8%;
    text-align: center;
}

.title-group h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--deep-brown);
}

.title-group p {
    font-family: 'Great Vibes', cursive;
    font-size: 2.2rem;
    color: var(--gold);
    /* Gold check */
    margin-top: 5px;
    margin-bottom: 20px;
}

.specialties-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 120px;
}

@media (max-width: 1200px) {
    .specialties-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 80px 30px;
    }
}

@media (max-width: 600px) {
    .specialties-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

.specialty-card {
    background: var(--white);
    border-radius: 12px;
    padding: 110px 30px 40px;
    position: relative;
    box-shadow: var(--shadow-soft);
    border: none;
    transition: var(--transition);
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.specialty-img-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 5px solid var(--white);
    /* White border around image */
    overflow: hidden;
    position: absolute;
    top: -90px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: var(--white);
    transition: var(--transition);
}

.specialty-img-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.specialty-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--accent-pink);
}

.specialty-content p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 25px;
}

/* --- Galeria --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 60px;
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
    border: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover img {
    transform: scale(1.15);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
    /* Let clicks pass through to image or edit */
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.is-editing .gallery-caption {
    transform: translateY(0);
    /* Always show when editing */
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.6);
    border: 1px dashed white;
}

/* --- Depoimentos --- */
.comments-section {
    padding: 100px 8%;
    background: var(--cream);
    margin: 80px 0;
    text-align: center;
}

.comments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    justify-content: center;
}

.comment-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.comment-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(62, 39, 35, 0.15);
    border-bottom: 3px solid var(--accent-pink);
}

.comment-inner {
    border: none;
    padding: 0;
    text-align: center;
}

.comment-text {
    font-style: italic;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

.client-name {
    font-weight: 700;
    color: var(--accent-pink);
    font-family: 'Playfair Display', serif;
}

/* --- Contato & Social --- */
.contact-social-section {
    background: var(--white);
    margin: 0 8%;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: none;
}

.contact-form-side {
    padding: 60px;
}

.social-side {
    background-color: var(--primary-pink);
    padding: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.social-icons-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-icons-wrapper .btn-atelier-card {
    padding: 15px 35px !important;
    border-color: var(--accent-pink);
    background: rgba(255, 255, 255, 0.8);
    color: var(--accent-pink);
    /* Default color explicit */
}

.social-icons-wrapper .btn-atelier-card:hover {
    background: var(--white) !important;
    color: var(--accent-pink) !important;
    border-color: var(--accent-pink);
}

.input-line {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 2px solid #ddd;
    background: none;
    margin-bottom: 30px;
    font-family: inherit;
    outline: none;
    font-size: 1rem;
    transition: var(--transition);
}

.input-line:focus {
    border-bottom-color: var(--accent-pink);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 50px;
    font-size: 0.9rem;
    color: #888;
    background: var(--cream);
}

/* --- ESTILOS DO EDITOR --- */
.is-editing [contenteditable="true"] {
    outline: 2px dashed var(--accent-pink);
    background: rgba(255, 255, 255, 0.95);
    /* Increased opacity */
    color: var(--deep-brown) !important;
    /* Force visibility against any background */
    cursor: text;
    min-width: 20px;
}

.is-editing .editable-img-wrapper {
    cursor: pointer;
    outline: 3px dashed var(--deep-brown);
    position: relative;
    opacity: 0.9;
}

.is-editing .editable-img-wrapper::after {
    content: '📷 Alterar';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 10;
}

.is-editing .circle-box,
.is-editing .icon-wrapper {
    cursor: pointer;
    outline: 2px dashed var(--deep-brown);
    position: relative;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.is-editing .btn-delete {
    display: flex;
}

.btn-delete {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.social-item {
    position: relative;
    padding-bottom: 20px;
    /* Extend hover area for the badge */
}

.is-editing .social-item:hover .btn-edit-link {
    display: flex;
}

.btn-edit-link {
    position: absolute;
    bottom: -5px;
    /* Overlap slightly with the padding area */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    padding: 6px 14px;
    background: #007bff;
    color: white;
    border-radius: 20px;
    border: 2px solid white;
    /* Border for visibility */
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 100;
    /* High Z-index */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.btn-edit-link::after {
    content: '🔗 Alterar Link';
    margin-left: 5px;
    font-weight: 600;
}

.btn-edit-link:hover {
    background: #0056b3;
    transform: translateX(-50%) scale(1.05);
}


.btn-add-wrapper {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    display: none;
}

.is-editing .btn-add-wrapper {
    display: block;
}

.btn-add {
    background: var(--accent-pink);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

/* Painel Flutuante */
#control-panel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--white);
    padding: 12px;
    border-radius: 50px;
    display: flex;
    gap: 10px;
    z-index: 9999;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
}

.btn-control {
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-toggle {
    background: var(--cream);
    color: var(--deep-brown);
    border: 1px solid #ddd;
}

.btn-export {
    background: var(--accent-pink);
    color: white;
}

/* MODAL DE SELEÇÃO DE ÍCONES, CONFIGURAÇÕES E SUCESSO */
#icon-picker-modal,
#settings-modal,
#success-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 650px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 1px solid var(--accent-pink);
}

.modal-content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-pink);
    font-size: 2rem;
    margin-bottom: 25px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.icon-option {
    font-size: 2rem;
    color: var(--deep-brown);
    cursor: pointer;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    transition: 0.3s;
}

.icon-option:hover {
    background: var(--primary-pink);
    color: var(--accent-pink);
    transform: scale(1.1);
}

.icon-section-title {
    grid-column: 1 / -1;
    font-weight: 700;
    margin-top: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    text-align: left;
    color: var(--accent-pink);
}

/* SETTINGS FORM STYLES */
.settings-group {
    text-align: left;
    margin-bottom: 20px;
}

.settings-group label {
    font-weight: 600;
    color: var(--deep-brown);
    display: block;
    margin-bottom: 8px;
}

.settings-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.settings-preview-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-top: 10px;
    display: none;
    border: 1px solid #ddd;
}

/* SUCCESS POPUP SPECIAL STYLES */
#success-popup .modal-content {
    max-width: 400px;
}

.success-icon-anim {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}


/* RESPONSIVIDADE & MENU MOBILE APPRIMORADO */
@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 100%;
        /* Glassmorphism Mobile Menu */
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 2000;
        gap: 30px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    /* Staggered Animation for Menu Items */
    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-links.active li:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-links a {
        font-size: 1.5rem;
        /* Larger font size */
        font-family: 'Playfair Display', serif;
        font-weight: 700;
    }

    .mobile-menu-icon,
    .close-menu {
        display: block;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
        gap: 40px;
    }

    .hero-img-horizontal {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .contact-social-section {
        grid-template-columns: 1fr;
        margin: 0 5%;
    }

    .social-side {
        padding: 40px 20px;
    }

    .contact-form-side {
        padding: 40px 20px;
    }

    .categories-container {
        gap: 30px;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}