/*
Theme Name: SINDIBOC Sindicato dos Servidores Públicos de Bocaiuva MG
Theme URI: http://sindicatobocaiuva.org.br
Description: Tema construido por Siqueira e Souza Company, para o Sindicato dos Servidores Públicos de Bocaiúva MG.
Version: 1.0.0
Author: Vinicius Siqueira
Author URI: https://github.com/google-deepmind
Text Domain: SINDIBOC
*/

/* --- Design System (Apple-like Flat/Material) --- */

:root {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-light: rgba(0, 113, 227, 0.1);
    --border-color: #d2d2d7;
    --success: #34c759;
    --error: #ff3b30;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* --- Resets & Global Styles --- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

/* --- Layout --- */

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

/* --- Header --- */

.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(210, 210, 215, 0.4);
    padding: 12px 0;
    transition: var(--transition-smooth);
}

.header-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: center;
    gap: 20px;
}

@media (max-width: 900px) {
    .header-container {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 16px;
        text-align: center;
    }
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-link:hover {
    text-decoration: none;
    opacity: 0.9;
}

.logo-svg {
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.logo-main {
    font-size: 26px;
    font-weight: 800;
    color: #0c4da2;
    line-height: 1;
    letter-spacing: -0.8px;
}

.logo-sub {
    font-size: 8px;
    font-weight: 700;
    color: #0c4da2;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

/* --- Weather Widget --- */
.weather-box-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.weather-temp-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 18px;
    color: #1d1d1f;
}

.weather-details-row {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.weather-details-row span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Weather icon colors */
.weather-icon.color-sun {
    color: #ff9500 !important;
    filter: drop-shadow(0 2px 4px rgba(255, 149, 0, 0.3));
    animation: weather-pulse 4s infinite ease-in-out;
}
.weather-icon.color-cloud-sun {
    color: #ffcc00 !important;
    filter: drop-shadow(0 2px 4px rgba(255, 204, 0, 0.25));
}
.weather-icon.color-cloud {
    color: #8e8e93 !important;
}
.weather-icon.color-rain {
    color: #007aff !important;
}
.weather-icon.color-storm {
    color: #5856d6 !important;
}
.weather-icon.color-smog {
    color: #aeaeb2 !important;
}

@keyframes weather-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- Header Search Box --- */
.header-search {
    position: relative;
    width: 100%;
    max-width: 260px;
    justify-self: end;
}

@media (max-width: 900px) {
    .header-search {
        justify-self: center;
    }
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    border-radius: 8px;
    outline: none;
    transition: var(--transition-smooth);
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-input:focus {
    border-color: var(--accent);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
}

/* --- Hero Section (Overlapping Image & Card Style) --- */

.hero-section {
    padding: 40px 0 40px 0;
}

.hero-container-layout {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-image-banner {
    width: 100%;
    height: 460px;
    background-image: url('hero-bg.png');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
}

.hero-text-card {
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 48px 56px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.5);
    max-width: 860px;
    margin: -160px auto 0 auto; /* Overlaps the banner image by 160px */
    position: relative; /* Stays on top */
    text-align: center;
    z-index: 2;
}

.hero-tagline {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    display: block;
}

.hero-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.8px;
    color: var(--text-primary);
    margin-bottom: 20px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 12px auto;
    line-height: 1.5;
}

.hero-subtitle strong {
    color: var(--text-primary);
    font-weight: 700;
}

.hero-highlight-text {
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto;
    max-width: 600px;
    line-height: 1.5;
}

/* Responsiveness */
@media (max-width: 900px) {
    .hero-image-banner {
        height: 320px;
        border-radius: var(--border-radius-md);
    }
    .hero-text-card {
        padding: 32px 24px;
        margin-top: -80px;
        width: 95%;
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-subtitle, .hero-highlight-text {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .hero-image-banner {
        height: 240px;
    }
    .hero-text-card {
        padding: 24px 16px;
        margin-top: -60px;
    }
    .hero-title {
        font-size: 22px;
    }
    .hero-subtitle, .hero-highlight-text {
        font-size: 14px;
    }
}

/* --- Grid Benefícios --- */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

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

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

.benefit-card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.benefit-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: inline-block;
}

.benefit-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.benefit-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Form Card & Form Elements --- */

.form-wrapper {
    max-width: 680px;
    margin: 0 auto 100px auto;
}

.form-card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.form-header {
    text-align: center;
    margin-bottom: 36px;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Form Styles */
.wp-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.form-group.full-width {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .form-group.full-width {
        grid-column: span 1;
    }
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: 2px;
}

.form-control {
    font-family: var(--font-family);
    font-size: 16px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    transition: var(--transition-smooth);
    outline: none;
    width: 100%;
}

.form-control:focus {
    border-color: var(--accent);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Conditional Group for Dependents with transition */
.conditional-group {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
                opacity 0.3s ease, 
                transform 0.3s ease,
                margin 0.3s ease;
    margin-bottom: 0;
}

.conditional-group.show {
    max-height: 120px;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 8px;
}

.form-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
}

.form-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
    flex-shrink: 0;
    margin-top: 2px;
}

.form-checkbox:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-checkbox:focus {
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.checkbox-label {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
}

.checkbox-label a {
    font-weight: 500;
}

/* --- Button Apple Style --- */

.btn-primary {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 980px; /* Apple Pill style */
    padding: 14px 32px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- Feedback Messages --- */

.form-feedback {
    padding: 16px;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-weight: 500;
    display: none;
    margin-bottom: 20px;
    animation: fadeIn 0.4s ease forwards;
}

.form-feedback.success {
    background-color: rgba(52, 199, 89, 0.1);
    color: #248a3d;
    border: 1px solid rgba(52, 199, 89, 0.2);
    display: block;
}

.form-feedback.error {
    background-color: rgba(255, 59, 48, 0.1);
    color: #b52218;
    border: 1px solid rgba(255, 59, 48, 0.2);
    display: block;
}

/* --- Footer --- */

.site-footer {
    background-color: #1d1d1f;
    color: #86868b;
    padding: 48px 0;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
}

.footer-info {
    max-width: 600px;
    line-height: 1.6;
}

.footer-credits {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    width: 100%;
}

/* --- Animations --- */

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

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Responsive Adjustments --- */

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    .hero-subtitle {
        font-size: 17px;
    }
    .form-card {
        padding: 32px 20px;
    }
    .site-header {
        padding: 12px 0;
    }
}

/* --- Custom Logo Styling --- */
.site-header .custom-logo-link {
    display: inline-block;
}
.site-header .custom-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* --- Quota Tags side-by-side Layout --- */
.quota-tags-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.quota-tag-inline {
    background-color: var(--accent-light);
    color: var(--accent);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid rgba(0, 113, 227, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
    width: fit-content;
    white-space: nowrap;
}

.quota-tag-inline:hover {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateX(3px);
}

@media (max-width: 600px) {
    .hide-mobile {
        display: none;
    }
    .quota-tags-side {
        margin-top: 8px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* --- Animated Title Highlight --- */
.highlight-animated {
    display: inline-block;
    position: relative;
    background: linear-gradient(90deg, #0071e3, #34c759, #5856d6, #0071e3);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-text 6s ease-in-out infinite;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(0, 113, 227, 0.05);
}

@keyframes shimmer-text {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* --- Modal Overlay & Card (Apple-style Pop-up) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    width: 90%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transform: scale(0.85) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.show .modal-card {
    transform: scale(1) translateY(0);
}

.modal-icon {
    font-size: 60px;
    color: var(--success);
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 4px 10px rgba(52, 199, 89, 0.25));
    animation: scale-up-icon 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s both;
}

@keyframes scale-up-icon {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.modal-message {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 28px;
}

.modal-close-btn {
    margin-top: 0;
    width: 100%;
}
