/* ==========================================================================
   Pages — Page-specific styles
   ========================================================================== */

/* --- Home: Hero Section --- */
.hero-section {
    position: relative;
    background-image: url("/assets/backgrounds/background-home2-1485606b.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-section {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
        border-radius: 70px;
        text-align: left;
    }
}

/* Dark mode overlay for hero */
@media (prefers-color-scheme: dark) {
    :root:not(.light) .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.7);
        border-radius: inherit;
        z-index: 1;
    }

    :root:not(.light) .hero-section>* {
        position: relative;
        z-index: 2;
    }
}

.dark .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: inherit;
    z-index: 1;
}

.dark .hero-section>* {
    position: relative;
    z-index: 2;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.hero-content {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    border-radius: var(--radius);
}

@media (min-width: 768px) {
    .hero-content {
        flex-direction: row;
    }
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hero-text {
        width: 50%;
    }
}

.hero-image {
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .hero-image {
        width: 50%;
        margin-top: 0;
    }

    .hero-image img {
        margin-left: 0.75rem;
    }
}

/* --- Home: Crowd/Stats Overlay --- */
.crowd-section {
    position: relative;
    width: 100%;
    min-height: 350px;
    overflow: hidden;
    margin-top: 2.5rem;
}

@media (min-width: 768px) {
    .crowd-section {
        border-radius: 70px;
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }
}

.crowd-section img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.crowd-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.55);
}

@media (min-width: 768px) {
    .crowd-overlay {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 2rem 10rem 2rem 4rem;
    }
}

.crowd-title {
    width: 100%;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .crowd-title {
        width: 50%;
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
}

.crowd-counter {
    display: flex;
    flex-direction: column;
    text-align: left;
}

@media (min-width: 768px) {
    .crowd-counter {
        text-align: right;
        margin-bottom: 1rem;
    }
}

.crowd-counter .counter-number {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .crowd-counter .counter-number {
        font-size: 3.5rem;
    }
}

.crowd-counter .counter-label {
    color: #fff;
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* --- Home: Marquee Section --- */
.marquee-section {
    overflow: hidden;
    padding: 3rem 0;
}

.marquee-track {
    gap: 1rem;
    padding: 1rem 0;
}

.marquee-track .service-card {
    margin-right: 1rem;
}

/* --- Home: Stats Section --- */
.stats-section {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: hsl(var(--secondary));
    padding: 2.5rem;
    border-radius: 1.5rem;
    gap: 2rem;
}

@media (min-width: 768px) {
    .stats-section {
        flex-direction: row;
        align-items: center;
    }
}

.stats-image {
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .stats-image {
        width: 45%;
    }
}

.stats-image img {
    border-radius: 1rem;
    width: 100%;
    height: auto;
    display: block;
}

.stats-content {
    width: 100%;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .stats-content {
        width: 50%;
        margin-top: 0;
        margin-left: 1.5rem;
    }
}

.stats-grid {
    display: flex;
    text-align: center;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.stats-grid .stat-item {
    width: 40%;
    margin: 0.5rem;
}

.stats-grid .stat-number {
    font-weight: 700;
    font-size: 2.25rem;
}

/* --- Home: Tech Section --- */
.tech-section {
    width: 100%;
    max-width: 72rem;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 5rem;
    gap: 2rem;
}

@media (min-width: 768px) {
    .tech-section {
        flex-direction: row;
    }
}

.tech-text {
    width: 100%;
}

.tech-section img {
    max-width: 30rem;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .tech-text {
        width: 55%;
    }
}

.tech-text h2 {
    font-weight: 700;
    font-size: 2.25rem;
    color: hsl(var(--foreground));
}

.tech-text p {
    margin-top: 1.5rem;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
    line-height: 1.75;
}

/* --- About: Essence Cards --- */
.essence-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .essence-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.essence-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: border-color 150ms ease;
}

.essence-card:hover {
    border-color: hsl(var(--primary) / 0.5);
}

.essence-card .icon-wrapper {
    height: 3rem;
    width: 3rem;
    border-radius: 50%;
    background-color: hsl(var(--primary) / 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.essence-card .icon-wrapper svg {
    width: 1.5rem;
    height: 1.5rem;
    color: hsl(var(--primary));
    stroke: currentColor;
    fill: none;
}

.essence-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.75rem;
    color: hsl(var(--card-foreground));
}

.essence-card p {
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
}

/* --- About: Map Section --- */
.map-embed {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border) / 0.6);
    padding-top: 56.25%;
}

.map-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Contact: Info Card --- */
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-info-item.align-top {
    align-items: flex-start;
}

.contact-info-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

.contact-info-item .icon-primary {
    color: hsl(var(--primary));
}

.contact-info-item .icon-green {
    color: #16a34a;
}

.contact-info-item a:hover {
    text-decoration: underline;
}

/* --- Legal Pages (Privacidade & Termos) --- */
.legal-page {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .legal-page {
        grid-template-columns: 3fr 9fr;
    }
}

.legal-sidebar {
    display: none;
}

@media (min-width: 768px) {
    .legal-sidebar {
        display: block;
    }
}

.legal-sidebar .sidebar-card {
    position: sticky;
    top: 6rem;
}

.legal-sidebar nav a {
    display: block;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    padding: 0.25rem 0;
    transition: color 150ms ease;
}

.legal-sidebar nav a:hover {
    color: hsl(var(--foreground));
}

.legal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- Login Page --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: hsl(var(--background));
}

.login-card {
    background-color: hsl(var(--card));
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    width: 100%;
    max-width: 24rem;
    border: 1px solid hsl(var(--border));
}

.login-card .logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-card .logo-container img {
    width: 5rem;
    height: 6rem;
}

.login-card .form-group {
    margin-bottom: 1rem;
}

.login-card .form-group label {
    display: block;
    color: hsl(var(--card-foreground));
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-card .form-group input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    background-color: hsl(var(--background));
    color: hsl(var(--card-foreground));
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
    font-family: inherit;
}

.login-card .form-group input:focus {
    outline: none;
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.3);
}

.login-card .forgot-password {
    font-weight: 700;
    font-size: 0.875rem;
    color: #3b82f6;
}

.login-card .forgot-password:hover {
    color: #1e40af;
}

@media (min-width: 640px) {
    .login-card {
        margin-top: 7rem;
        margin-bottom: 7rem;
    }
}