/* ============================================
   SAOLA - Sistema de Licenciamento Ambiental
   Arquivo CSS Centralizado
   ============================================ */

/* ============================================
   1. VARIÁVEIS CSS (Custom Properties)
   ============================================ */
:root {
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --secondary: #1565C0;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --gray: #6c757d;
}

/* ============================================
   2. ESTILOS GLOBAIS
   ============================================ */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: var(--dark);
    overflow-x: hidden;
}

/* ============================================
   3. NAVBAR
   ============================================ */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    transition: color 0.3s;
    padding: 0.5rem 1rem !important;
    border-radius: 50px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
    background-color: rgba(46, 125, 50, 0.05);
}

/* ============================================
   4. BOTÕES
   ============================================ */
.btn {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-custom-primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-custom-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
    color: white;
}

.btn-custom-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-custom-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   5. CARDS
   ============================================ */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Feature Cards (Home) */
.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(46, 125, 50, 0.1);
    color: var(--primary);
}

.feature-card.blue .feature-icon {
    background: rgba(21, 101, 192, 0.1);
    color: var(--secondary);
}

/* ============================================
   6. ALERTS
   ============================================ */
.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ============================================
   7. BADGES
   ============================================ */
.badge {
    padding: 0.5em 0.8em;
    border-radius: 50px;
    font-weight: 500;
}

/* ============================================
   8. HERO SECTION (Home)
   ============================================ */
.hero-section {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #f1f8e9 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 50%;
    height: 100%;
    background: linear-gradient(45deg, rgba(46, 125, 50, 0.05), rgba(21, 101, 192, 0.05));
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--primary-dark), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* ============================================
   9. STATS SECTION (Home)
   ============================================ */
.stats-section {
    background: var(--primary-dark);
    color: white;
    padding: 80px 0;
    position: relative;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ============================================
   10. FOOTER
   ============================================ */
footer {
    background-color: #111;
    color: #888;
    padding: 80px 0 40px;
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: white;
}

/* ============================================
   11. FLOATING WHATSAPP BUTTON
   ============================================ */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    color: white;
}

/* ============================================
   12. DIAGRAMA LICENCIAMENTO (SVG)
   ============================================ */
.licenciamento-diagrama {
    max-width: 520px;
    margin: 0 auto;
}

.licenciamento-svg {
    width: 100%;
    height: auto;
    display: block;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Animações base */
.central,
.bubble {
    transform-box: fill-box;
    transform-origin: center;
}

@keyframes pulse-center {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

@keyframes float-bubble {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* Estilos dos elementos */
.central-circle {
    fill: #1b4332;
    animation: pulse-center 6s ease-in-out infinite;
}

.center-text {
    fill: #ffffff;
    font-size: 20px;
    font-weight: 700;
    text-anchor: middle;
}

.bubble line {
    stroke: #2d6a4f;
    stroke-width: 3;
}

.bubble circle {
    fill: #2d6a4f;
}

.bubble text {
    fill: #ffffff;
    font-size: 11px;
    text-anchor: middle;
}

/* Pequena variação de atraso para dar vida */
.bubble       { animation: float-bubble 5s ease-in-out infinite; }
.bubble-1  { animation-delay: 0s; }
.bubble-2  { animation-delay: 0.3s; }
.bubble-3  { animation-delay: 0.6s; }
.bubble-4  { animation-delay: 0.9s; }
.bubble-5  { animation-delay: 1.2s; }
.bubble-6  { animation-delay: 1.5s; }
.bubble-7  { animation-delay: 1.8s; }
.bubble-8  { animation-delay: 2.1s; }
.bubble-9  { animation-delay: 2.4s; }
.bubble-10 { animation-delay: 2.7s; }
.bubble-11 { animation-delay: 3.0s; }
.bubble-12 { animation-delay: 3.3s; }
.bubble-13 { animation-delay: 3.6s; }

/* ============================================
   13. FORM CONTROLS (Login)
   ============================================ */
input[type="text"],
input[type="password"],
input[type="email"] {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.is-loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23ccc' d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z'/%3E%3Cpath fill='%232E7D32' d='M12 4a8 8 0 0 1 7.8 6.8A1 1 0 1 1 21.8 10a10 10 0 0 0-9.8-8V4z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='1s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

/* ============================================
   14. CAROUSEL
   ============================================ */
.carousel-item img {
    object-fit: cover;
    height: 600px;
    border-radius: 15px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: opacity 0.3s;
}

#saolaCarousel:hover .carousel-control-prev,
#saolaCarousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 20px;
    background-size: 50%;
}

.carousel-indicators button {
    background-color: var(--primary) !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50%;
    margin: 0 5px !important;
    opacity: 0.5;
    transition: all 0.3s;
}

.carousel-indicators .active {
    opacity: 1;
    transform: scale(1.2);
}

/* ============================================
   15. RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-section {
        padding: 120px 0 60px;
    }
    .carousel-item img {
        height: 320px;
    }
}

/* ============================================
   16. WEATHER WIDGET
   ============================================ */
.weather-widget {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 8px 20px 8px 10px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(46, 125, 50, 0.1);
    animation: fadeIn 0.5s ease-out;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: help;
}

.weather-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.weather-icon-wrapper {
    width: 40px;
    height: 40px;
    background: rgba(46, 125, 50, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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