/* ==========================================================================
   Main Stylesheet — fonoaudiologia.online
   Mobile-first responsive design
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--navy);
    background-color: var(--cream); /* NUNCA branco puro */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

a {
    color: var(--blue-mid);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--royal-blue);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6,
.heading {
    font-family: var(--font-heading);
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 { font-size: 2.25rem; font-weight: 800; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.375rem; font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 600; }

p {
    margin-bottom: var(--space-md);
}

.small { font-size: 0.875rem; }
.caption { font-size: 0.75rem; font-weight: 500; }

blockquote,
.quote,
.testimonial-text {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--navy);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-3xl) 0;
}

.section--cream { background-color: var(--cream); }
.section--white { background-color: var(--white); }
.section--navy { background-color: var(--navy); color: var(--white); }
.section--blue-light { background-color: var(--blue-light); }

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* CTA Primário — Verde Ação (Agendar, Comprar, Cadastrar) */
.btn-primary {
    background: var(--green-action);
    color: var(--white);
    border-color: var(--green-action);
}

.btn-primary:hover {
    background: #157347;
    border-color: #157347;
    color: var(--white);
    box-shadow: var(--shadow-md);
}

/* CTA Lead — Vermelho Fono (Download, Quiz, Lead Magnet) */
.btn-lead {
    background: var(--red-fono);
    color: var(--white);
    border-color: var(--red-fono);
}

.btn-lead:hover {
    background: #a71d2a;
    border-color: #a71d2a;
    color: var(--white);
    box-shadow: var(--shadow-md);
}

/* Secundário — Azul Royal */
.btn-secondary {
    background: var(--royal-blue);
    color: var(--white);
    border-color: var(--royal-blue);
}

.btn-secondary:hover {
    background: #15305a;
    border-color: #15305a;
    color: var(--white);
}

/* Outline */
.btn-outline {
    background: transparent;
    color: var(--royal-blue);
    border-color: var(--royal-blue);
}

.btn-outline:hover {
    background: var(--royal-blue);
    color: var(--white);
}

/* Ghost */
.btn-ghost {
    background: var(--cream);
    color: var(--navy);
    border-color: var(--gray-border);
}

.btn-ghost:hover {
    background: var(--white);
    border-color: var(--royal-blue);
    color: var(--royal-blue);
}

/* Button sizes */
.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

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

.card-image {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: 0;
}

/* --------------------------------------------------------------------------
   Badges & Tags
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.badge-crfa {
    background: var(--green-light);
    color: var(--green-action);
}

.badge-specialty {
    background: var(--blue-light);
    color: var(--royal-blue);
}

.badge-destaque {
    background: var(--red-soft);
    color: var(--red-fono);
}

.badge-online {
    background: var(--green-light);
    color: var(--green-action);
}

.badge-presencial {
    background: var(--cream);
    color: var(--gray-text);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(46, 94, 166, 0.15);
}

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

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

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

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--royal-blue);
    text-decoration: none;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
}

.site-logo span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-logo .online {
    color: var(--red-fono);
}

.nav-primary {
    display: none;
}

.nav-primary a {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}

.nav-primary a:hover {
    background: var(--blue-light);
    color: var(--royal-blue);
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--navy);
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    padding: var(--space-lg);
    overflow-y: auto;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: var(--space-md);
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy);
    border-bottom: 1px solid var(--gray-border);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background: var(--navy);
    color: var(--white);
    padding: var(--space-3xl) 0 var(--space-lg);
}

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

.site-footer a {
    color: var(--blue-light);
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(214, 227, 245, 0.15);
    padding-top: var(--space-lg);
    font-size: 0.875rem;
    color: var(--gray-text);
}

.footer-logo .online {
    color: var(--red-fono);
}

/* --------------------------------------------------------------------------
   FAQ Accordion
   -------------------------------------------------------------------------- */

.faq-item {
    border-bottom: 1px solid var(--gray-border);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-md) 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    text-align: left;
}

.faq-answer {
    display: none;
    padding: 0 0 var(--space-md);
    color: var(--gray-text);
    line-height: 1.7;
}

.faq-item.is-open .faq-answer {
    display: block;
}

/* --------------------------------------------------------------------------
   Star Rating
   -------------------------------------------------------------------------- */

.stars {
    display: inline-flex;
    gap: 2px;
    color: #F59E0B;
}

.stars .empty {
    color: var(--gray-border);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-xl) 0;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--gray-border);
    transition: all 0.2s;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--royal-blue);
    color: var(--white);
    border-color: var(--royal-blue);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-navy { color: var(--navy); }
.text-blue { color: var(--royal-blue); }
.text-red { color: var(--red-fono); }
.text-green { color: var(--green-action); }
.text-gray { color: var(--gray-text); }
.text-white { color: var(--white); }

.bg-cream { background-color: var(--cream); }
.bg-white { background-color: var(--white); }
.bg-navy { background-color: var(--navy); }
.bg-blue-light { background-color: var(--blue-light); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --------------------------------------------------------------------------
   Responsive — Tablet (768px)
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

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

    h1 { font-size: 2.5rem; }
}

/* --------------------------------------------------------------------------
   Responsive — Desktop (1024px)
   -------------------------------------------------------------------------- */

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }

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

    .nav-toggle {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    h1 { font-size: 2.25rem; }
}

/* --------------------------------------------------------------------------
   Responsive — Wide (1440px)
   -------------------------------------------------------------------------- */

@media (min-width: 1440px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }

    .container {
        padding: 0 var(--space-xl);
    }
}
