/* 1. Configurações Globais e Variáveis de Tema */
:root {
    --bg-color: #FFFFFF;
    --bg-secondary-color: #f5f5f7;
    --text-color: #1a1a1a;
    --text-secondary-color: #555555;
    --card-bg: #FFFFFF;
    --card-border: #EAEAEA;
    --input-bg: #EEEEEE;
    --primary-color: #007BFF;
    --primary-hover: #0056b3;
    --primary-glow: rgba(0, 123, 255, 0.4);
    --shadow-color: rgba(0, 0, 0, 0.05);
    --font-family: 'Poppins', sans-serif;
}

/* TEMA DARK PREMIUM */
body.dark-mode {
    --bg-color: #0D1117;
    --bg-secondary-color: #161B22;
    --text-color: #E6EDF3;
    --text-secondary-color: #8B949E;
    --card-bg: #161B22;
    --card-border: #30363D;
    --input-bg: #0D1117;
    --primary-color: #58A6FF;
    --primary-hover: #388BFD;
    --primary-glow: rgba(88, 166, 255, 0.25);
    --shadow-color: rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 2. Header e Navegação */
header {
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--card-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: background-color 0.4s ease, border-bottom 0.4s ease;
}
body.dark-mode header { background-color: rgba(13, 17, 23, 0.7); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.4s ease;
    z-index: 1001;
}
.logo span { color: var(--primary-color); }
.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}
.nav-links { display: flex; list-style: none; gap: 25px; align-items: center; }
.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}
.nav-links li:not(.login-button) a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.nav-links li:not(.login-button) a:hover { color: var(--primary-color); }
.nav-links li:not(.login-button) a:hover::after { width: 100%; }
.login-button a {
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}
body.dark-mode .login-button a {
    color: #0D1117 !important;
    font-weight: 600;
}
.login-button a:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}
.login-button a i { font-size: 1.2rem; }
.login-button a::after { display: none; }
.nav-right { display: flex; align-items: center; gap: 20px; }

/* 3. Theme Switcher */
.theme-switcher { display: flex; align-items: center; gap: 10px; }
.theme-switcher i { font-size: 1.3rem; color: var(--text-secondary-color); transition: color 0.4s ease; }
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { display: none; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(24px); }

/* 4. Seções Principais (Hero, Planos, etc.) */
.hero { text-align: center; padding: 120px 0; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; line-height: 1.2; margin-bottom: 20px; background: -webkit-linear-gradient(45deg, var(--primary-color), var(--text-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.2rem; color: var(--text-secondary-color); margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-button { background-color: var(--primary-color); color: #fff; padding: 15px 35px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: transform 0.2s ease, box-shadow 0.2s ease; display: inline-block; }
body.dark-mode .cta-button { color: #0D1117; font-weight: 600; }
.cta-button:hover { transform: translateY(-4px); box-shadow: 0 10px 25px var(--primary-glow); }

.plans-section { padding: 80px 0; background-color: var(--bg-secondary-color); transition: background-color 0.4s ease; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.8rem; margin-bottom: 10px; }
.section-header p { font-size: 1.1rem; color: var(--text-secondary-color); max-width: 500px; margin: 0 auto; }

.plans-grid {
    display: flex;
    overflow-x: auto;
    padding: 20px 0 40px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}
.plans-grid.active { cursor: grabbing; }
.plans-grid::-webkit-scrollbar { display: none; }
.plans-grid { -ms-overflow-style: none;  scrollbar-width: none; }

.card {
    flex: 0 0 90%;
    max-width: 340px;
    margin: 0 15px;
    scroll-snap-align: center;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow-color);
}
.card:first-child { margin-left: auto; }
.card:last-child { margin-right: auto; }
.card:hover { transform: translateY(-12px) scale(1.02); border-color: var(--primary-color); box-shadow: 0 0 40px var(--primary-glow); }
.card h3 { font-size: 1.8rem; font-weight: 600; margin-bottom: 15px; }
.card .price { font-size: 3rem; font-weight: 700; margin-bottom: 25px; color: var(--primary-color); }
.card .price span { font-size: 1rem; font-weight: 400; color: var(--text-secondary-color); }
.card ul { list-style: none; margin-bottom: 30px; flex-grow: 1; }
.card ul li { margin-bottom: 15px; display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.card ul li i { font-size: 1.4rem; color: var(--primary-color); }
.card .button { background: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); padding: 14px 20px; border-radius: 8px; text-align: center; text-decoration: none; font-weight: 600; transition: background-color 0.3s ease, color 0.3s ease; cursor: pointer; }
.card:hover .button { background-color: var(--primary-color); color: #fff; }
body.dark-mode .card:hover .button { color: #0D1117; }

/* Estilo do card em destaque antigo (mantido para referência ou uso futuro) */
.card.featured { transform: scale(1.05); border: 2px solid var(--primary-color); box-shadow: 0 0 50px var(--primary-glow); }
.card.featured:hover { transform: translateY(-12px) scale(1.07); }
.card .badge { position: absolute; top: 18px; right: -45px; background-color: var(--primary-color); color: #fff; padding: 6px 50px; transform: rotate(45deg); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px; }
body.dark-mode .card .badge { color: #0D1117; }

/* 5. Seção de Recursos e Rodapé */
.intuitive-features-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}
.intuitive-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}
.intuitive-card {
    background: var(--bg-secondary-color);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 35px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}
.intuitive-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px var(--shadow-color);
}
.intuitive-card h3,.intuitive-card p {
    position: relative;
    z-index: 1;
}
.intuitive-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-color);
}
.intuitive-card p {
    color: var(--text-secondary-color);
    line-height: 1.7;
}

footer {
    background-color: var(--bg-secondary-color);
    padding: 60px 0 20px 0;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary-color);
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-column h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column ul a {
    text-decoration: none;
    color: var(--text-secondary-color);
    transition: color 0.3s ease;
}
.footer-column ul a:hover { color: var(--primary-color); }
.social-icons { display: flex; gap: 15px; }
.social-icons a {
    font-size: 1.5rem;
    color: var(--text-secondary-color);
    transition: color 0.3s ease;
}
.social-icons a:hover { color: var(--primary-color); }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
    font-size: 0.9rem;
}

/* 6. Modal e Responsividade */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1001;
}
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background-color: var(--card-bg); padding: 40px; border-radius: 16px; width: 90%; max-width: 500px; text-align: center; transform: scale(0.9); transition: transform 0.3s ease; position: relative; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-content h2 { font-size: 2rem; margin-bottom: 15px; }
.modal-content p { font-size: 1.1rem; color: var(--text-secondary-color); margin-bottom: 30px; }
.modal-close { position: absolute; top: 15px; right: 20px; font-size: 2rem; color: var(--text-secondary-color); background: none; border: none; cursor: pointer; }
.modal-content .plan-info { font-size: 1.2rem; font-weight: 600; color: var(--primary-color); margin-bottom: 30px; }

.login-form { display: flex; flex-direction: column; gap: 20px; text-align: left; }
.form-group { display: flex; flex-direction: column; }
.form-group label { margin-bottom: 5px; font-weight: 500; font-size: 0.9rem; }
.form-group input { padding: 12px 15px; border-radius: 8px; border: 1px solid var(--card-border); background-color: var(--input-bg); color: var(--text-color); font-size: 1rem; transition: border-color 0.3s ease; }
.form-group input:focus { outline: none; border-color: var(--primary-color); }
.login-options { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; margin: -10px 0 10px 0; }
.login-options a { color: var(--primary-color); text-decoration: none; }
.login-form .cta-button { width: 100%; border: none; cursor: pointer; }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu {
        position: fixed; top: 0; left: -100%; width: 100%; height: 100vh;
        background-color: var(--bg-color); z-index: 1000;
        display: flex; flex-direction: column; justify-content: center; align-items: center;
        transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        gap: 0;
    }
    .nav-menu.active { left: 0; }
    .nav-links { flex-direction: column; gap: 0; text-align: center; padding: 0; width: 100%; }
    .nav-links li { width: 80%; border-bottom: 1px solid var(--card-border); }
    .nav-links li:last-child { border-bottom: none; }
    .nav-links a { font-size: 1.8rem; font-weight: 600; display: block; padding: 20px 0; }
    .login-button a { padding: 12px 30px; font-size: 1.5rem; }
    .hero { padding: 80px 0 60px; }
    .plans-section, .intuitive-features-section { padding: 60px 0; }
    .section-header { margin-bottom: 40px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; max-width: 90%; }
    .section-header h2 { font-size: 2rem; }
    .card { padding: 30px; transform: scale(1) !important; }
    .card:hover { transform: translateY(-8px) !important; }
    .card h3 { font-size: 1.5rem; }
    .card .price { font-size: 2.5rem; margin-bottom: 20px; }
    .card ul li { font-size: 0.9rem; gap: 10px; }
    .card ul li i { font-size: 1.2rem; }
    .intuitive-card { padding: 25px; }
    .intuitive-card h3 { font-size: 1.2rem; }
}

@media (min-width: 1024px) {
    .plans-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        overflow-x: visible;
        scroll-snap-type: none;
        cursor: default;
    }
    .card { flex: 1; max-width: none; margin: 0; padding-top: 30px; padding-bottom: 30px; }
    .plans-grid .card:nth-child(n+5) { display: none; }
    .plans-grid:last-child { justify-content: center; }
    .plans-section .section-header p { display: none; }
    .card .price { font-size: 2.4rem; margin-bottom: 20px; display: flex; justify-content: center; align-items: flex-start; gap: 4px; line-height: 1; }
    .card .price .currency { font-size: 1.2rem; font-weight: 500; margin-top: 2px; }
    .card .price span { font-size: 0.9rem; align-self: flex-end; margin-bottom: 4px; }
    .card ul { margin-bottom: 25px; }
    .card ul li { margin-bottom: 12px; font-size: 0.9rem; }

    /* ===== NOVA ESTILIZAÇÃO PARA A FITA DE DESTAQUE (PÍLULA) ===== */
    .card h3.plan-name { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
    .card .badge {
        position: static; transform: none; background-color: transparent; padding: 0; width: auto; letter-spacing: normal;
        display: inline-block; padding: 4px 10px; font-size: 0.7rem; font-weight: 700; border-radius: 20px; background-color: var(--primary-color); color: #fff;
    }
    body.dark-mode .card .badge { color: #0D1117; }
}

/* =======================================================
   7. Animação de Raio para Card em Destaque (Cloud Pro)
   ======================================================= */

/* Prepara o card para receber a animação */
.card.featured-pro {
  border: 2px solid var(--primary-color);
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 10px 40px var(--primary-glow);
}

.card.featured-pro:hover {
    transform: translateY(-15px) scale(1.05);
}

/* Cria o pseudo-elemento ::after que será a animação do raio */
.card.featured-pro::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(
    115deg, 
    transparent 40%, 
    var(--primary-glow) 48%, 
    var(--primary-glow) 52%, 
    transparent 60%
  );
  background-size: 250% 250%;
  animation: lightning-sweep 3s infinite linear;
  pointer-events: none;
}

@keyframes lightning-sweep {
  0% {
    background-position: 150% 50%;
  }
  100% {
    background-position: -50% 50%;
  }
}

/* =======================================================
   8. Animação de Raio para Cards de Recursos (:hover)
   ======================================================= */

/* O .intuitive-card já tem position: relative e overflow: hidden.
   Usaremos o pseudo-elemento ::before para não conflitar com futuras adições. */
.intuitive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0; /* Coloca a animação atrás do texto */

    /* O mesmo gradiente de raio, usando a cor do tema */
    background: linear-gradient(
        115deg,
        transparent 40%,
        var(--primary-glow) 48%,
        var(--primary-glow) 52%,
        transparent 60%
    );
    background-size: 250% 250%;

    /* Aplica a mesma animação de keyframe */
    animation: lightning-sweep 3s infinite linear;

    /* A animação começa invisível */
    opacity: 0;

    /* Transição suave para o efeito de fade-in */
    transition: opacity 0.4s ease-in-out;
}

/* Quando o mouse passa sobre o card, a animação se torna visível */
.intuitive-card:hover::before {
    opacity: 1;
}
