/* 
 * Câmbio em Foz - CSS Principal 
 * Baseado no Design System do iCâmbio
 */

:root {
    /* Brand Colors */
    --primary: #014651;        /* Teal escuro */
    --primary-light: #025f6e;  /* Teal hover */
    --accent: #c9d52a;         /* Verde Limão / Light */
    --accent-hover: #b3bd24;   /* Verde hover */
    --dark: #161514;           /* Texto Escuro/Preto */
    
    /* UI Colors */
    --bg-page: #f4f6f8;        /* Cinza muito claro */
    --bg-card: #ffffff;
    --border: #e0e4e8;
    --text-muted: #64748b;
    --success: #10b981;
    
    /* Shadows & Radii */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(1, 70, 81, 0.08); /* Sombra com tom da primária */
    --shadow-lg: 0 20px 40px rgba(1, 70, 81, 0.12);
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Font */
    --font: 'Chivo', sans-serif;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

/* Utilities */
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-12 { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }

body {
    font-family: var(--font);
    background-color: var(--bg-page);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.main-header {
    background-color: var(--bg-card);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    font-size: 1.2rem;
}

.logo i { font-size: 1.8rem; color: var(--accent); }
.logo span { font-weight: 900; }
.logo h1 { font-size: 1.5rem; margin: 0; }

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    background-color: #f1f3f5;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a:active {
    background-color: var(--success);
    color: #fff !important;
}

.btn-login {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.btn-login:hover {
    background-color: var(--success) !important;
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, #003038 100%);
    color: #fff;
    min-height: 50vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Hero Blob Design (Aesthetic) */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent);
    filter: blur(150px);
    opacity: 0.15;
    border-radius: 50%;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-content { flex: 1; }
.hero-content h2 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 900;
}
.hero-content .highlight { color: var(--accent); }
.hero-content p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 32px; }

.features-list { display: flex; flex-direction: column; gap: 16px; font-weight: 600;}
.feature-item { display: flex; align-items: center; gap: 12px; }
.feature-item i { color: var(--accent); font-size: 1.2rem; }

/* Simulator Card */
.hero-simulator {
    flex: 0 0 420px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    color: var(--dark);
    border: 1px solid rgba(255,255,255,0.2);
}

.glass-card h3 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary);
    font-size: 1.4rem;
}

/* Form Styles */
.form-group { margin-bottom: 20px; }
.form-group.half { flex: 1; margin-bottom: 0; }
.form-row { display: flex; gap: 16px; margin-bottom: 24px; }

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Toggle Group for Comprar/Vender */
.toggle-group {
    display: flex;
    background: var(--bg-page);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}

.toggle-group input { display: none; }
.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--text-muted);
    background: #e9ecef; /* Cinza para identificar o botão inativo */
    margin: 0;
}

.toggle-group input:checked + .toggle-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* Select & Input Custom */
.select-wrapper { position: relative; }
.select-wrapper select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    padding: 14px 40px 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font);
    font-weight: 600;
    color: var(--dark);
    outline: none;
    transition: border-color 0.3s;
}

.select-wrapper i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-prefix {
    position: relative;
    display: flex;
    align-items: center;
}
.input-prefix span {
    position: absolute;
    left: 16px;
    font-weight: 700;
    color: var(--text-muted);
}
.input-prefix input {
    width: 100%;
    padding: 14px 16px 14px 36px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-family: var(--font);
    font-weight: 700;
    color: var(--dark);
    outline: none;
    transition: border-color 0.3s;
}

.select-wrapper select:focus,
.input-prefix input:focus {
    border-color: var(--primary);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary);
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 213, 42, 0.4);
}

/* Results Section */
.results-section {
    padding: 80px 0;
}
.results-section.hidden { display: none; }

.results-header {
    text-align: center;
    margin-bottom: 40px;
}
.results-header h2 {
    font-size: 2rem;
    color: var(--primary);
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    gap: 16px;
}
.spinner-container.hidden { display: none; }

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Agencies Grid */
.agencies-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agency-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.agency-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(1, 70, 81, 0.2);
}

/* Featured ribbon */
.agency-card.featured::before {
    content: 'PREMIUM';
    position: absolute;
    top: 12px;
    left: -28px;
    background: var(--accent);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 30px;
    transform: rotate(-45deg);
    letter-spacing: 1px;
}

.agency-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.agency-logo-placeholder {
    width: 60px;
    height: 60px;
    background: var(--bg-page);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    border: 2px solid var(--border);
}
.agency-details h4 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 4px;
}
.agency-details p {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.agency-details p i { margin-right: 4px; }

.agency-rate {
    text-align: right;
    padding-right: 24px;
    border-right: 1px solid var(--border);
}
.rate-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.rate-value { font-size: 1.2rem; font-weight: 800; color: var(--dark); }

.agency-total {
    text-align: right;
    width: 160px;
}
.total-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.total-value { font-size: 1.6rem; font-weight: 900; color: var(--primary); }

.btn-whatsapp {
    background-color: var(--success);
    color: #fff;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}
.btn-whatsapp:hover {
    background-color: #014651;
    box-shadow: 0 4px 15px rgba(1, 70, 81, 0.4);
    transform: translateY(-2px);
}
.btn-whatsapp i { font-size: 1.2rem; }

/* Desktop Adjustments */
@media (max-width: 900px) {
    .agency-card {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    .agency-rate { border-right: none; text-align: left; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .agency-total { text-align: left; width: 100%; }
    .btn-whatsapp { justify-content: center; margin-top: 12px; }
    
    .hero-container { flex-direction: column; }
    .hero-simulator { width: 100%; flex: auto; }
}

/* Footer */
.main-footer {
    background-color: var(--bg-card);
    color: var(--dark);
    padding: 60px 0 30px;
}
.footer-container { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    gap: 32px; 
}
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.footer-brand i { color: var(--accent); font-size: 1.8rem; margin-bottom: 10px; }
.footer-brand h2 { font-size: 1.8rem; margin: 12px 0; color: var(--primary); }
.footer-brand span { font-weight: 900; color: var(--primary); }
.footer-brand p { color: var(--text-muted); }
.footer-brand a { color: var(--primary); font-weight: 700; text-decoration: none; }
.footer-info { text-align: center; color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 768px) {
    .footer-container { gap: 24px; }
}

/* --- New Multi-Page Components --- */

/* Page Headers */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #003038 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.page-hero h1 { font-size: 2.5rem; font-weight: 900; margin-bottom: 12px; }
.page-hero p { opacity: 0.8; font-size: 1.1rem; }

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 48px;
    color: var(--primary);
}
.section-title h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; }
.section-title p { color: var(--text-muted); font-size: 1.1rem; }

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Cards Design */
.premium-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}
.premium-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
}
.premium-card h3 { font-size: 1.4rem; margin-bottom: 15px; color: var(--primary); }
.premium-card p { color: var(--text-muted); font-size: 0.95rem; }

/* FAQ Accordion */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}
.accordion-item {
    background: #fff;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    border: 1px solid var(--border);
    overflow: hidden;
}
.accordion-header {
    width: 100%;
    padding: 20px 25px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-align: left;
    transition: background 0.3s;
}
.accordion-header:hover { background: rgba(201, 213, 42, 0.05); }
.accordion-header i { transition: transform 0.3s; color: var(--accent); }
.accordion-header.active i { transform: rotate(180deg); }
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fafbfc;
}
.accordion-content p { padding: 15px 25px 25px; color: var(--text-muted); margin: 0; }

/* Calculator UI */
.calc-wrapper {
    max-width: 600px;
    margin: 40px auto;
}
.calc-result-box {
    background: var(--primary);
    color: #fff;
    padding: 30px;
    border-radius: var(--radius-md);
    margin-top: 30px;
    text-align: center;
}
.calc-result-box h4 { font-size: 1rem; text-transform: uppercase; opacity: 0.8; margin-bottom: 10px; }
.calc-result-box .result-value { font-size: 2.5rem; font-weight: 900; }

/* Top 3 Home Widget */
.top3-section {
    padding: 60px 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.top3-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.top3-item {
    text-align: center;
    padding: 20px;
    border-radius: var(--radius-md);
    background: var(--bg-page);
    border: 1px solid var(--border);
}
.top3-item h4 { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.top3-item .rate { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

/* Responsive Adjustments for Mobile */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Could add a hambuger menu later */
    .hero-content h2 { font-size: 2.2rem; }
}
