@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #8A2BE2; /* Roxo */
    --secondary-color: #7B1FA2; /* Roxo mais escuro */
    --accent-color: #bb86fc; /* Roxo claro para brilhos */
    --background-color-light: #f0f2f5;
    --background-color-dark: #121212;
    --text-color-light: #333;
    --text-color-dark: #fff;
    --card-background-light: #fff;
    --card-background-dark: #1e1e1e;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-hover-shadow: rgba(0,0,0,0.2);
    --overlay-color: rgba(130, 80, 160, 0.7);
    --header-bg-light: #fff;
    --header-bg-dark: #1e1e1e;
    --footer-bg-dark: #1a202c; /* Darker for footer */
}

/* Estilos Gerais */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color-light);
    color: var(--text-color-light);
    font-size: 16px; /* Base font size for accessibility */
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.dark-mode body {
    background-color: var(--background-color-dark);
    color: var(--text-color-dark);
}

/* TEMA ESCURO GERAL */
.dark-mode .glow-text {
    color: var(--accent-color);
}

.dark-mode .btn {
    background-color: var(--accent-color);
    color: var(--background-color-dark); /* Dark text on light accent */
}

.dark-mode .btn-acessibilidade {
    background-color: #4b5563; /* Darker gray */
    border-color: #6b7280;
}

.dark-mode .btn-acessibilidade:hover {
    background-color: #6b7280;
}

/* COMPONENTES */
.card {
    background-color: var(--card-background-light);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.dark-mode .card {
    background-color: var(--card-background-dark);
    border: 1px solid #444; /* Explicit border for dark mode cards */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 16px var(--card-hover-shadow);
}

.btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s ease-in-out;
    display: inline-block; /* Ensures padding and transforms work correctly */
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

.btn:active {
    transform: scale(0.95); /* Feedback de clique */
}

.btn-acessibilidade {
    background-color: #e5e7eb; /* Gray-200 */
    color: #111827; /* Dark text */
    border: 1px solid #d1d5db; /* Gray-300 */
    border-radius: 0.375rem; /* rounded */
    font-weight: bold;
    padding: 0.375rem 0.75rem; /* px-3 py-1 */
    transition: background-color 0.2s ease;
}
.btn-acessibilidade:hover {
    background-color: #d1d5db; /* Gray-300 on hover */
}

.glow-text {
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.5);
}

/* EFEITO BINÁRIO LOGIN */
.binary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* INPUT FIELDS */
.input-field {
    @apply w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-purple-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white;
    /* Custom Tailwind classes can be added here or managed by Tailwind config */
    border-radius: 8px; /* Explicitly set for consistency */
    border: 1px solid #ccc; /* Default border */
}

.dark-mode .input-field {
    border: 1px solid #4a5568; /* Darker border in dark mode */
}

.input-file {
    @apply w-full text-sm text-gray-500 file:mr-4 file:py-1 file:px-3 file:rounded file:border-0 file:text-sm file:font-semibold file:bg-purple-100 file:text-purple-700 hover:file:bg-purple-200 dark:text-gray-400 dark:file:bg-purple-800 dark:file:text-purple-300;
    border-radius: 8px; /* Explicitly set for consistency */
}

/* Navigation Links */
.nav-link {
    @apply text-gray-700 dark:text-gray-300 hover:text-primary-color dark:hover:text-accent-color transition font-semibold;
    color: var(--text-color-light); /* Default color */
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: var(--primary-color); /* Hover color */
}
.dark-mode .nav-link {
    color: var(--text-color-dark); /* Default dark mode color */
}
.dark-mode .nav-link:hover {
    color: var(--accent-color); /* Hover color for dark mode */
}

/* Section Specific Styles */
.hero-section-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1; /* Behind content */
}
.hero-overlay {
    background-color: var(--overlay-color);
    z-index: -1; /* Behind content */
}

.section { /* Generic section styling */
    padding: 60px 20px; /* Vertical and horizontal padding */
    position: relative; /* For absolute positioning of background elements if needed */
}

.section h2 { /* Section titles */
    margin-bottom: 40px; /* Space below titles */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        padding: 15px;
    }
    .section {
        padding: 40px 15px;
    }
    .btn {
        padding: 8px 16px;
        font-size: 0.95rem;
    }
}

/* Animations defined in index.html's style tag */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-body-bg {
    background: linear-gradient(-45deg, #8A2BE2, #9333ea, #f0f2f5, #ffffff); /* Login gradient */
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

.card-hover-effect:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.reminder-card-hover:hover {
     transform: scale(1.01);
     box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.button-click-effect:active {
    transform: scale(0.95);
}

.fade-in-animation {
    animation: fadeIn 0.5s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* MARQUEE ANIMATION */
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* Home redesign - polished responsive layout and local example images */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
}

a {
    text-decoration: none;
}

.hidden {
    display: none !important;
}

.relative {
    position: relative;
}

.site-header {
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 0;
    border: 1px solid rgba(138, 43, 226, 0.12);
    border-radius: 24px;
    backdrop-filter: blur(16px);
}

.site-header .logo-container img {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(138, 43, 226, 0.22);
}

.site-header nav {
    flex-wrap: wrap;
    justify-content: center;
}

.site-header .header-actions .btn,
#profileLink {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#profilePicNav {
    width: 32px;
    height: 32px;
    border-radius: 999px;
}

main section {
    padding-left: max(1.5rem, calc((100vw - 1180px) / 2));
    padding-right: max(1.5rem, calc((100vw - 1180px) / 2));
}

.hero-section {
    min-height: calc(100vh - 96px);
    height: auto;
    justify-content: space-between;
    gap: 3rem;
    text-align: left;
    padding-top: 5rem;
    padding-bottom: 5rem;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.28), transparent 26%),
        radial-gradient(circle at 82% 12%, rgba(236, 72, 153, 0.35), transparent 30%),
        linear-gradient(135deg, #5b21b6 0%, #8b5cf6 46%, #ec4899 100%);
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: auto -10% -35% 45%;
    height: 55%;
    background: rgba(255, 255, 255, 0.14);
    filter: blur(50px);
    transform: rotate(-8deg);
}

.hero-section .overlay {
    display: none;
}

.hero-section .content {
    max-width: 640px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(255,255,255,0.34);
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.1rem;
}

.hero-section .content h1 {
    color: #fff;
    font-size: clamp(2.45rem, 6vw, 5rem);
    text-shadow: 0 12px 35px rgba(34, 8, 58, 0.38);
}

.hero-section .content p {
    max-width: 560px;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.btn-primary-hero,
.btn-secondary-hero {
    border-radius: 999px;
    padding: 0.85rem 1.35rem;
}

.btn-primary-hero {
    background: #fff;
    color: #6d28d9;
}

.btn-primary-hero:hover {
    background: #fdf4ff;
}

.btn-secondary-hero {
    background: rgba(255,255,255,0.14);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.36);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 0.8rem;
}

.hero-stats div {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-stats strong,
.hero-stats span {
    display: block;
}

.hero-stats strong {
    font-size: 1.55rem;
}

.hero-stats span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.hero-visual {
    position: relative;
    z-index: 1;
    width: min(42vw, 480px);
    min-width: 320px;
}

.hero-visual img {
    width: 100%;
    border-radius: 34px;
    box-shadow: 0 28px 70px rgba(40, 8, 70, 0.4);
    transform: rotate(2deg);
}

.section-heading {
    max-width: 660px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.section-heading span {
    color: var(--secondary-color);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.section-heading h2 {
    margin: 0.35rem 0 0.75rem;
}

.section-heading p {
    color: #6b7280;
    margin: 0;
}

.course-section,
.examples-section {
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.12), transparent 34%),
        #fbf7ff;
}

.course-section .course-grid,
.examples-grid {
    max-width: 1180px;
    margin: 0 auto;
}

.course-card,
.example-card {
    border: 1px solid rgba(124, 58, 237, 0.12);
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(67, 20, 116, 0.1);
}

.course-card img,
.example-card img {
    height: 215px;
    background: #f5edff;
}

.course-card .card-content {
    padding: 1.35rem;
}

.course-card .btn {
    width: 100%;
    margin: auto 0 0;
    border-radius: 999px;
}

.mentorship-section .mentorship-content,
.history-section .history-content {
    max-width: 1180px;
    margin: 0 auto;
}

.mentorship-section,
.history-section {
    isolation: isolate;
}

.mentorship-section h3,
.history-section h3 {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
}

.mentorship-section .mentorship-image img,
.history-section .history-image img {
    border-radius: 32px;
    box-shadow: 0 22px 55px rgba(67, 20, 116, 0.18);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.example-card {
    background: #fff;
    padding: 1rem;
    transition: transform .25s ease, box-shadow .25s ease;
}

.example-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 55px rgba(67, 20, 116, 0.16);
}

.example-card img {
    width: 100%;
    object-fit: cover;
    border-radius: 22px;
    display: block;
}

.example-card h3 {
    color: #2d174d;
    margin: 1rem 0 0.4rem;
    font-size: 1.25rem;
}

.example-card p {
    color: #6b7280;
    margin: 0 0 0.5rem;
}

.site-footer > div:first-child {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
    gap: 2rem;
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
}

.dark-mode .section-heading p,
.dark-mode .example-card p {
    color: #c4b5fd;
}

.dark-mode .course-section,
.dark-mode .examples-section {
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.18), transparent 34%),
        #111827;
}

.dark-mode .example-card {
    background: #1f2937;
    border-color: rgba(196, 181, 253, 0.22);
}

.dark-mode .example-card h3 {
    color: #f5f3ff;
}

@media (max-width: 980px) {
    .site-header {
        justify-content: center;
        gap: 1rem;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        width: min(92vw, 520px);
    }

    .examples-grid,
    .site-footer > div:first-child {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .site-header {
        width: min(100% - 20px, 1180px);
        border-radius: 18px;
        padding: 0.85rem;
    }

    .site-header .header-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-stats,
    .examples-grid,
    .site-footer > div:first-child {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-width: 0;
    }
}

/* Footer icon sizing fixes for pages without Tailwind loaded */
.site-footer svg {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
}

.site-footer li.flex,
.site-footer .flex.items-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-footer .social-icons img {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}
