/* =============================================
   Portal Asset - Tiradentes Inesquecível
   Main Stylesheet
   ============================================= */

/* ---------- CSS Variables / Design Tokens ---------- */
:root {
    /* Primary Palette - Blues */
    --primary-50: #e8f4fd;
    --primary-100: #b9dff8;
    --primary-200: #8acaf3;
    --primary-300: #5bb5ee;
    --primary-400: #2ca0e9;
    --primary-500: #0d8bd4;
    --primary-600: #0a6da7;
    --primary-700: #074f7a;
    --primary-800: #04314d;
    --primary-900: #011320;

    /* Secondary Palette - Greens */
    --secondary-50: #e6f7ed;
    --secondary-100: #b3e6c7;
    --secondary-200: #80d5a1;
    --secondary-300: #4dc47b;
    --secondary-400: #26b85f;
    --secondary-500: #1a9e4a;
    --secondary-600: #157d3b;
    --secondary-700: #105c2c;
    --secondary-800: #0a3b1d;
    --secondary-900: #051a0e;

    /* Neutrals */
    --neutral-50: #f8f9fa;
    --neutral-100: #f1f3f5;
    --neutral-200: #e9ecef;
    --neutral-300: #dee2e6;
    --neutral-400: #ced4da;
    --neutral-500: #adb5bd;
    --neutral-600: #868e96;
    --neutral-700: #495057;
    --neutral-800: #343a40;
    --neutral-900: #212529;

    /* Status Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    --gradient-hero: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-500) 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    --gradient-dark: linear-gradient(135deg, var(--neutral-800) 0%, var(--neutral-900) 100%);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 20px rgba(13, 139, 212, 0.3);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container-max: 1200px;
    --header-height: 80px;
}

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

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

body {
    font-family: var(--font-primary);
    color: var(--neutral-800);
    background: var(--neutral-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--neutral-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* ---------- Container ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ---------- Header / Navigation ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    height: var(--header-height);
    transition: all var(--transition-base);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-600);
}

.logo img {
    height: 48px;
    width: auto;
}

.logo-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--neutral-700);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-600);
    background: var(--primary-50);
}

.nav-link.active {
    color: var(--primary-600);
    background: var(--primary-50);
}

.nav-link.cta {
    background: var(--gradient-hero);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-link.cta:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--neutral-700);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ---------- Hero / Banner ---------- */
.hero {
    margin-top: var(--header-height);
    background: var(--gradient-hero);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: patternSlide 60s linear infinite;
}

@keyframes patternSlide {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-2xl);
    background: white;
    color: var(--primary-600);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Floating shapes decoration */
.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    animation: float 20s ease-in-out infinite;
}

.hero-shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -50px;
    right: -80px;
    animation-delay: 0s;
}

.hero-shape:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -30px;
    left: -60px;
    animation-delay: -5s;
}

.hero-shape:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 15%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -30px) rotate(5deg); }
    50% { transform: translate(-10px, 20px) rotate(-3deg); }
    75% { transform: translate(15px, 10px) rotate(2deg); }
}

/* ---------- Section Styles ---------- */
.section {
    padding: var(--space-3xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: var(--space-sm);
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-hero);
    border-radius: var(--radius-full);
}

.section-title p {
    color: var(--neutral-600);
    margin-top: var(--space-sm);
    font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--neutral-200);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--neutral-200);
}

.card-body {
    padding: var(--space-lg);
}

.card-body h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.15rem;
}

.card-body p {
    color: var(--neutral-600);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary-50);
    color: var(--primary-600);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--neutral-100);
    color: var(--neutral-500);
    font-size: 0.85rem;
}

/* ---------- Activity Cards ---------- */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.activity-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-200);
    transition: all var(--transition-base);
    cursor: pointer;
}

.activity-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-300);
}

.activity-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-hero);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 1.8rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.activity-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.activity-card p {
    font-size: 0.875rem;
    color: var(--neutral-600);
}

/* ---------- Business Listing ---------- */
.business-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.business-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-200);
    transition: all var(--transition-base);
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.business-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.business-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.business-info h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.business-info p {
    font-size: 0.875rem;
    color: var(--neutral-600);
}

.business-info .business-contact {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    font-size: 0.825rem;
}

.business-info .business-contact a {
    color: var(--primary-500);
    font-weight: 500;
}

.business-info .business-contact a:hover {
    color: var(--primary-700);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
    line-height: 1.5;
}

.btn-primary {
    background: var(--gradient-hero);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--primary-600);
    border: 2px solid var(--primary-200);
}

.btn-secondary:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.btn-success {
    background: var(--secondary-500);
    color: white;
}

.btn-success:hover {
    background: var(--secondary-600);
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 4px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: var(--space-md) var(--space-2xl);
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
    color: var(--neutral-700);
}

.form-control {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--neutral-800);
    background: white;
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(13, 139, 212, 0.15);
}

.form-control::placeholder {
    color: var(--neutral-400);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 8.825L.375 3.2l.85-.85L6 7.125l4.775-4.775.85.85z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-option label {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.radio-option input[type="radio"]:checked + label {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

.radio-option label:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

/* ---------- Auth Forms ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    padding: var(--space-xl);
}

.auth-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
}

.auth-card h1 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: var(--space-xs);
}

.auth-card .subtitle {
    text-align: center;
    color: var(--neutral-600);
    margin-bottom: var(--space-xl);
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: var(--space-lg);
    color: var(--neutral-600);
    font-size: 0.9rem;
}

.auth-card .auth-footer a {
    color: var(--primary-500);
    font-weight: 600;
}

/* ---------- Flash Messages ---------- */
.flash-message {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.flash-message.info {
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-200);
}

/* ---------- Events / Agenda ---------- */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.event-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-base);
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.event-date-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--gradient-hero);
    border-radius: var(--radius-md);
    color: white;
    margin-bottom: var(--space-md);
    min-width: 60px;
}

.event-date-badge .day {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.event-date-badge .month {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--gradient-dark);
    color: var(--neutral-300);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand .logo-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.footer-col ul li {
    margin-bottom: var(--space-sm);
}

.footer-col ul li a {
    color: var(--neutral-400);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--space-xl);
    text-align: center;
    font-size: 0.85rem;
    color: var(--neutral-500);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        flex-direction: column;
        padding: var(--space-xl);
        gap: var(--space-xs);
        transform: translateX(100%);
        transition: transform var(--transition-base);
        z-index: 999;
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-link {
        padding: var(--space-md);
        font-size: 1.05rem;
        width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        min-height: 360px;
        padding: var(--space-2xl) 0;
    }

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

    .activity-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .business-list {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

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

@media (max-width: 480px) {
    .activity-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: var(--space-lg);
    }
}
