/**
 * Public Layout CSS
 * Portal Institucional - Prefeitura da Cidade de Goiás
 * Identidade Visual: Verde Institucional + Terracota (Patrimônio UNESCO)
 */

/* ============================================
   1. VARIÁVEIS CSS
   ============================================ */
:root {
    /* Cores Institucionais - Paleta Oficial */
    --brand-teal: #0a827d; /* Verde institucional principal */
    --brand-teal-dark: #085f5b; /* Hover states */
    --brand-teal-light: #0fa39e; /* Backgrounds */
    --brand-blue: #186185; /* Azul institucional */
    --brand-red: #ac434a; /* Vermelho */
    --brand-yellow: #ffcc29; /* Amarelo */
    --brand-sky: #6aaacb; /* Azul claro */

    /* Cores Complementares - Patrimônio UNESCO */
    --terracota: #a0522d; /* Terracota (arquitetura colonial) */
    --terracota-dark: #8b4513; /* Terracota escuro (hover) */
    --ocre: #d2691e; /* Ocre (tons históricos) */
    --bege-claro: #f5f5dc; /* Bege claro */

    /* Aliases Semânticos para Portal Público */
    --verde-institucional: var(--brand-teal);
    --verde-claro: var(--brand-teal-light);
    --verde-hover: var(--brand-teal-dark);
    --azul-institucional: var(--brand-blue);
    --vermelho-institucional: var(--brand-red);
    --amarelo-institucional: var(--brand-yellow);

    /* Cores Neutras */
    --cinza-institucional: #4a4a4a;
    --cinza-claro: #e5e5e5;
    --cinza-medio: #999999;
    --cinza-bg: #f9f9f9; /* Background cinza claro */

    /* Tipografia */
    --font-sans: "Inter", system-ui, -apple-system, sans-serif;
    --font-serif: "Merriweather", Georgia, serif;

    /* Espaçamentos */
    --container-max: 1280px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
}

/* ============================================
   2. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--cinza-institucional);
    background-color: #ffffff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.2;
    color: var(--verde-institucional);
    margin-bottom: var(--spacing-md);
}

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

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--verde-institucional);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--verde-hover);
    text-decoration: underline;
}

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

/* ============================================
   3. CONTAINER & LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-narrow {
    max-width: 960px;
}

.container-wide {
    max-width: 1440px;
}

/* ============================================
   4. HEADER (ver components/public/header.blade.php)
   ============================================ */
/* Estilos do header foram movidos para o componente header.blade.php para evitar conflitos */
/* Os estilos inline no componente têm precedência e controlam toda a aparência do header */

/* ============================================
   5. BREADCRUMBS
   ============================================ */
.breadcrumbs {
    background-color: var(--bege-claro);
    padding: var(--spacing-sm) 0;
    font-size: 0.9rem;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.breadcrumbs a {
    color: var(--verde-institucional);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: var(--spacing-xs);
    color: var(--cinza-medio);
}

/* ============================================
   6. FOOTER
   ============================================ */
.public-footer {
    background-color: var(--verde-institucional);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.public-footer a {
    color: white;
}

.public-footer a:hover {
    color: var(--bege-claro);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
}

/* ============================================
   7. CARDS & COMPONENTS
   ============================================ */
.card {
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card__content {
    padding: var(--spacing-md);
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.card__meta {
    font-size: 0.875rem;
    color: var(--cinza-medio);
    margin-bottom: var(--spacing-sm);
}

.card__excerpt {
    color: var(--cinza-institucional);
    margin-bottom: var(--spacing-md);
}

.card__link {
    color: var(--verde-institucional);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   8. BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--verde-institucional);
    color: white;
}

.btn-primary:hover {
    background-color: var(--verde-hover);
    text-decoration: none;
}

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

.btn-secondary:hover {
    background-color: var(--terracota-dark);
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--verde-institucional);
    color: var(--verde-institucional);
}

.btn-outline:hover {
    background-color: var(--verde-institucional);
    color: white;
    text-decoration: none;
}

/* ============================================
   9. SECTIONS
   ============================================ */
.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-gray {
    background-color: var(--cinza-bg);
}

.section-terracota {
    background-color: var(--terracota);
    color: white;
}

.section-terracota h2,
.section-terracota h3 {
    color: white;
}

/* ============================================
   10. GRID SYSTEM
   ============================================ */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

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

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

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

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

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

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

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

/* ============================================
   11. UTILITIES
   ============================================ */
.text-center {
    text-align: center;
}

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

.mt-0 {
    margin-top: 0;
}
.mt-1 {
    margin-top: var(--spacing-sm);
}
.mt-2 {
    margin-top: var(--spacing-md);
}
.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-0 {
    margin-bottom: 0;
}
.mb-1 {
    margin-bottom: var(--spacing-sm);
}
.mb-2 {
    margin-bottom: var(--spacing-md);
}
.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.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;
}

@layer utilities {
    /* Animação de bounce mais lenta para o indicador scroll */
    .animate-bounce-slow {
        animation: bounce 2s infinite;
    }

    @keyframes bounce {
        0%,
        100% {
            transform: translateY(0);
            animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
        }
        50% {
            transform: translateY(-25%);
            animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
        }
    }
}

/* Seções do dropdown */
.nav-dropdown-menu .space-y-1 > div:first-child {
    margin-top: 0.25rem;
}

.nav-dropdown-menu .space-y-1 > div:not(:first-child) {
    margin-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.5rem;
}

/* Títulos das seções */
.nav-dropdown-menu .text-xs {
    letter-spacing: 0.025em;
    color: #6b7280;
}

/* Espaçamento entre itens */
.nav-dropdown-link {
    margin-bottom: 0.125rem;
}

.nav-dropdown-link:last-child {
    margin-bottom: 0;
}

/* Estados dos links */
.nav-dropdown-link.is-active {
    background-color: #f0fdf4;
    color: #065f46;
    font-weight: 500;
}

.nav-dropdown-link:hover:not(.is-active) {
    background-color: #f9fafb;
    color: #047857;
}
