/* ==============================
   CSS RESET & VARIABLES
   ============================== */
:root {
    /* Light Mode Variables */
    --bg-gradient-start: #FFFFFF;
    --bg-gradient-end: #F7F7F7;
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --nav-shadow: rgba(0, 0, 0, 0.05);

    --accent-color: #FF007F;
    --accent-hover: #E60073;

    --card-bg: rgba(255, 255, 255, 0.5);
    --input-bg: #FFFFFF;
    --input-border: #E0E0E0;

    --bg-pattern: url("img/logo/pattern_light_mode.png");
    --bg-alt: #f5f5f5;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --bg-gradient-start: #121212;
    --bg-gradient-end: #1E1E1E;
    --text-primary: #F0F0F0;
    --text-secondary: #A0A0A0;
    --nav-bg: rgba(18, 18, 18, 0.95);
    --nav-shadow: rgba(0, 0, 0, 0.5);

    --accent-color: #00B7EB;
    --accent-hover: #0096C7;

    --card-bg: rgba(255, 255, 255, 0.05);
    --input-bg: #2C2C2C;
    --input-border: #444444;

    --bg-pattern: url("img/logo/pattern_dark_mode_2.png");
    --bg-alt: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-gradient-start);
    background-image: var(--bg-pattern), linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    background-repeat: repeat, no-repeat;
    background-size: 100px 100px, cover;
    background-attachment: fixed;
    color: var(--text-primary);
    transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==============================
   NAVIGATION BAR
   ============================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--nav-shadow);
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    z-index: 1000;
    transition: background var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.nav-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    justify-content: center;
}

.logo-container .logo {
    height: 100px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform var(--transition-speed) ease;
}

.logo-container .logo:hover {
    transform: scale(1.05);
}

[data-theme="dark"] .logo-container .logo {
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.1));
}

.theme-switch-wrapper {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.theme-switch {
    display: inline-block;
    height: 30px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #333;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 5px;
}

.slider i {
    font-size: 14px;
    z-index: 1;
}

.slider .icon-sun {
    color: #FFD43B;
}

.slider .icon-moon {
    color: #74C0FC;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 22px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 22px;
    z-index: 2;
    /* Ball on top of icons */
}

input:checked+.slider {
    background-color: #555;
}

input:checked+.slider:before {
    transform: translateX(30px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: color var(--transition-speed) ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width var(--transition-speed) ease;
}

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

/* ==============================
   SECTIONS
   ============================== */
section {
    min-height: 100vh;
    padding: 160px 0 60px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100vw;
}

.section-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.section-content h2,
.section-content .section-desc,
.section-content .news-container,
.main-title {
    padding-left: 5%;
    padding-right: 5%;
    max-width: 1200px;
}

.section-content .order-form {
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
}


h1,
h2 {
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}

.text-center {
    text-align: center;
}

/* Home */
.hero-section {
    position: relative;
}

.main-title {
    font-size: 4rem;
    background: linear-gradient(90deg, var(--accent-color), #FF4D94);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .main-title {
    background: linear-gradient(90deg, var(--accent-color), #4DD2FF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.decorator-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
}

.news-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    display: inline-block;
}

.news-placeholder {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==============================
   CAROUSEL GALLERIES
   ============================== */
.carousel-container {
    width: 100vw;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.carousel-container::before,
.carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-gradient-start), transparent);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-gradient-end), transparent);
}

.alt-bg .carousel-container::before {
    background: linear-gradient(to right, transparent, transparent);
    /* Simplify for now */
}

.alt-bg .carousel-container::after {
    background: linear-gradient(to left, transparent, transparent);
}

.image-grid {
    display: flex;
    gap: 20px;
    width: max-content;
}

/* Animações Alternando Direita e Esquerda */
.image-grid[data-direction="left"] {
    animation: scrollLeft 35s linear infinite;
}

.image-grid[data-direction="right"] {
    animation: scrollRight 35s linear infinite;
}

.image-grid:hover {
    animation-play-state: paused;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.image-grid img,
.static-grid img {
    height: 400px;
    width: auto;
    object-fit: cover;
    border-radius: 15px;
    flex-shrink: 0;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.image-grid img:hover,
.static-grid img:hover {
    transform: translateY(-5px) scale(1.03);
    z-index: 2;
}

/* ==============================
   CENTERED FOCUS CAROUSEL (News)
   ============================== */
/* Cleaned & Consolidated */
.news-carousel-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    margin: 2rem auto;
}

.glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
    animation: pulseGlow 4s ease-in-out infinite;
}

.glow-bg img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 60px var(--accent-color));
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

.news-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.news-item {
    position: absolute;
    width: 320px;
    height: 450px;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.5) translateX(0);
    pointer-events: none;
    /* Only allow interaction on active items */
    z-index: 5;
    cursor: pointer;
    background: transparent;
    border-radius: 20px;
    overflow: hidden;
}

.news-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.news-item img.loaded {
    opacity: 1;
}

/* Specific item states */
.news-item.active {
    opacity: 1;
    transform: scale(1.1) translateX(0);
    z-index: 100;
    /* Always on top */
    pointer-events: auto;
    filter: drop-shadow(0 0 30px rgba(255, 0, 127, 0.3));
}

[data-theme="dark"] .news-item.active {
    filter: drop-shadow(0 0 30px rgba(0, 183, 235, 0.3));
}

.news-item.prev,
.news-item.next {
    opacity: 0.4;
    filter: grayscale(0.5);
    pointer-events: auto;
    /* Allow clicking to rotate */
    z-index: 50;
}

.news-item.prev {
    transform: scale(0.85) translateX(-220px);
}

.news-item.next {
    transform: scale(0.85) translateX(220px);
}

/* Shimmer Loading state */
.news-item.loading {
    background: rgba(255, 255, 255, 0.05);
}

.news-item.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
    }
}

/* Subtitle Styling */
.news-subtitle {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    top: 40px;
}

.news-subtitle span {
    display: block;
    font-size: 3.5rem;
    background: linear-gradient(90deg, var(--accent-color), #FF4D94);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.1;
    margin-top: 0.5rem;
}

[data-theme="dark"] .news-subtitle span {
    background: linear-gradient(90deg, var(--accent-color), #4DD2FF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .news-subtitle {
        font-size: 1rem;
        position: relative;
        top: -40px;
    }

    .news-subtitle span {
        font-size: 2.2rem;
    }

    .news-carousel-container {
        height: 450px;
        margin-top: 1rem;
    }

    .news-item {
        width: 260px;
        height: 380px;
    }
}

/* ==============================
   ADAPTIVE CAROUSEL (Mobile Only)
   ============================== */
.mobile-carousel-only {
    animation: none !important;
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    transform: none !important;
}

.mobile-carousel-only .clone {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-carousel-only {
        width: max-content !important;
        flex-wrap: nowrap !important;
    }

    .mobile-carousel-only[data-direction="left"] {
        animation: scrollLeft 35s linear infinite !important;
    }

    .mobile-carousel-only[data-direction="right"] {
        animation: scrollRight 35s linear infinite !important;
    }

    .mobile-carousel-only .clone {
        display: block !important;
    }
}

/* ==============================
   STATIC GRID (Legacy/General)
   ============================== */
.static-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px 5%;
}

.bg-alt {
    background-color: var(--bg-alt) !important;
}

/* ==============================
   FORM SECTION
   ============================== */
.form-section {
    display: flex;
    align-items: center;
}

@media (min-width: 769px) {
    #pedidos .section-content {
        padding-top: 40px;
    }
}

.order-form {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 127, 0.2);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 183, 235, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background var(--transition-speed) ease, transform 0.2s ease;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ==============================
   INSTAGRAM LINK
   ============================== */
.instagram-link {
    margin-top: 3rem;
}

.insta-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    padding: 10px 20px;
    background: var(--card-bg);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.insta-box:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .insta-box:hover {
    background: rgba(255, 255, 255, 0.1);
}

.insta-box img {
    width: 24px;
    height: 24px;
}

/* ==============================
   FOOTER
   ============================== */
footer {
    background: var(--nav-bg);
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem 1rem;
    border-top: 1px solid var(--input-border);
    font-size: 0.9rem;
}

/* ==============================
   BACK TO TOP BUTTON
   ============================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
}

.back-to-top:hover {
    transform: scale(1.1);
    background-color: var(--accent-hover);
}

/* ==============================
   MOBILE
   ============================== */
@media (max-width: 768px) {
    .navbar {
        padding: 5px 0;
    }

    .nav-top {
        padding: 0 15px;
    }

    .logo-container .logo {
        height: 80px;
    }

    .theme-switch-wrapper {
        right: 15px;
    }

    .nav-links {
        display: flex;
        position: static;
        width: 100%;
        margin-top: 0px;
        background: transparent;
        justify-content: flex-start;
        padding: 10px 15px;
        box-shadow: none;
        backdrop-filter: none;
        gap: 15px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 5px 8px;
        white-space: nowrap;
        flex-shrink: 0;
        scroll-snap-align: center;
    }

    section {
        padding: 180px 0 60px 0;
    }

    h2 {
        font-size: 2rem;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .image-grid img,
    .static-grid img {
        height: 300px;
        width: auto;
    }

    .back-to-top {
        bottom: 30px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ==============================
   LIGHTBOX MODAL
   ============================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.lightbox.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

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

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}