/* =============================================
   DOUGLINHA GESSO — STYLE
   Clean, white, modern design
   ============================================= */

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #ffffff;
    --bg: #fafafa;
    --light: #f2f2f2;
    --border: #e8e8e8;
    --text: #333333;
    --text-light: #777777;
    --gold: #c9a227;
    --gold-light: #f5e6a3;
    --gold-dark: #a07e1c;
    --black: #1a1a1a;
    --whatsapp: #25D366;
    --instagram-gradient: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    --danger: #e74c3c;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.gold {
    color: var(--gold);
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gold);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.35);
}

.btn-primary:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(201, 162, 39, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

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

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* ---------- HEADER ---------- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

#header.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-weight: 400;
    color: var(--text);
}

.logo-text strong {
    font-weight: 700;
    color: var(--gold);
}

#nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

#nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
    position: relative;
}

#nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: var(--transition);
}

#nav a:hover {
    color: var(--gold);
}

#nav a:hover::after {
    width: 100%;
}

.btn-admin-nav {
    background: var(--light);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-admin-nav:hover {
    background: var(--gold-light);
    transform: rotate(90deg);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
    border-radius: 2px;
}

.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(5px, -5px);
}

/* ---------- HERO ---------- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

/* Video Background */
.hero-video-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.55) 0%,
            rgba(0, 0, 0, 0.45) 50%,
            rgba(0, 0, 0, 0.65) 100%);
}

.hero-content {
    max-width: 720px;
    position: relative;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(201, 162, 39, 0.25);
    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 24px;
    border: 1px solid rgba(201, 162, 39, 0.35);
    backdrop-filter: blur(8px);
    animation: fadeInDown 0.8s ease;
}

#hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

#hero h1 .gold {
    color: var(--gold-light);
}

.hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    margin: 0 auto 36px;
    animation: fadeInUp 0.8s ease 0.4s both;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
}

/* ---------- SECTION COMMON ---------- */
.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--gold-light);
    color: var(--gold-dark);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: var(--black);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 540px;
    margin: 0 auto;
}

#servicos,
#galeria,
#contato {
    padding: 100px 0;
    text-align: center;
}

#servicos {
    background: var(--white);
}

#galeria {
    background: var(--bg);
}

#contato {
    background: var(--white);
}

/* ---------- SERVICES ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 28px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--black);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ---------- GALLERY ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 48px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    aspect-ratio: 3 / 4;
    background: var(--light);
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

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

.gallery-overlay p {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
}

.gallery-overlay .gallery-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

/* Gallery item animations */
.gallery-item {
    opacity: 0;
    transform: translateY(40px);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-empty {
    padding: 80px 20px;
    text-align: center;
    color: var(--text-light);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ---------- CONTACT ---------- */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 28px;
    text-align: center;
    transition: var(--transition);
    display: block;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.contact-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.whatsapp-icon {
    background: #e6f9ed;
    color: var(--whatsapp);
}

.instagram-icon {
    background: #fde8ef;
    color: #e1306c;
}

.contact-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--black);
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.contact-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    transition: var(--transition);
}

.contact-card:hover .contact-cta {
    letter-spacing: 1px;
}

/* ---------- FOOTER ---------- */
footer {
    background: var(--black);
    color: rgba(255, 255, 255, 0.6);
    padding: 48px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.footer-brand .logo-icon {
    font-size: 1.8rem;
}

.footer-brand .logo-text {
    color: var(--white);
    font-size: 1.1rem;
}

.footer-brand p {
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-top: 4px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-copy {
    font-size: 0.78rem;
}

/* ---------- FAB WHATSAPP ---------- */
.fab-whatsapp {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--whatsapp);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 900;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.fab-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

/* ---------- ADMIN MODAL ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px 32px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 28px;
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
}

.modal-header p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 16px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg);
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.login-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 12px;
    min-height: 20px;
}

/* Upload area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
    background: var(--bg);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--gold);
    background: rgba(201, 162, 39, 0.04);
}

.upload-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.upload-area p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.upload-link {
    color: var(--gold);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.upload-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.upload-preview .preview-item {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.upload-preview .preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview .preview-item .remove-preview {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

.admin-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 16px;
}

.admin-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.admin-gallery .admin-photo {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.admin-gallery .admin-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-gallery .admin-photo .delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.admin-gallery .admin-photo:hover .delete-btn {
    display: flex;
}

.admin-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

#lightboxImg {
    max-width: 90%;
    max-height: 80vh;
    border-radius: var(--radius);
    object-fit: contain;
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 16px;
    text-align: center;
}

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- KEYFRAMES ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .nav-wrapper {
        height: 64px;
    }

    #nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        transition: var(--transition);
        box-shadow: var(--shadow-md);
    }

    #nav.open {
        transform: translateY(0);
    }

    #nav a {
        padding: 16px 24px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border);
    }

    #nav a::after {
        display: none;
    }

    .btn-admin-nav {
        margin: 12px 24px;
        align-self: flex-start;
    }

    .hamburger {
        display: flex;
    }

    #hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .gallery-item {
        aspect-ratio: 3 / 4;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 28px 20px;
        margin: 12px;
    }

    .admin-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    #servicos,
    #galeria,
    #contato {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}