:root {
    --color-primary: #34A853;
    --color-primary-dark: #2E7D32;
    --color-primary-darker: #1B5E20;
    --color-primary-light: #66BB6A;
    --color-primary-lighter: #C8E6C9;
}

/* Override Bootstrap primary color */
.bg-primary {
    background-color: var(--color-primary) !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.btn-primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
}

.btn-outline-primary {
    color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #212121;
}

.bg-primary-dark {
    background: linear-gradient(to right, var(--color-primary-dark), var(--color-primary-darker)) !important;
}

.bg-primary-darker {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark), var(--color-primary-darker)) !important;
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.navbar-brand {
    transition: transform 0.2s;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.nav-link {
    font-weight: 600;
    color: #212121 !important;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-primary) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark), var(--color-primary-darker));
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    font-weight: 600;
}

.hero-form-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.hero-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 168, 83, 0.05), transparent);
    transition: left 0.5s;
}

.hero-form-card:hover::before {
    left: 100%;
}

/* Form Steps */
.form-steps {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.step-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.step-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.step-btn.active {
    background: var(--color-primary);
    color: white;
}

.step-btn:not(.active):not(:disabled) {
    color: #6c757d;
}

.step-btn:not(:disabled):hover:not(.active) {
    background: rgba(52, 168, 83, 0.1);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.step-btn.active .step-number {
    background: white;
    color: var(--color-primary);
}

.step-btn:not(.active) .step-number {
    background: #e9ecef;
    color: #6c757d;
}

/* Form Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-form {
    animation: fadeInUp 0.6s ease-out;
}

.form-field-animated {
    animation: fadeInUp 0.6s ease-out both;
}

/* Form Controls */
.form-control,
.form-select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #dee2e6;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--color-primary-light);
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.1);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(52, 168, 83, 0.25);
    transform: translateY(-2px);
}

.form-control-animated {
    position: relative;
}

.form-select {
    appearance: none;
    background-image: none;
    padding-right: 2.5rem;
}

.form-field-animated .position-relative .form-select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-primary);
    transition: transform 0.3s;
    z-index: 10;
    font-size: 1rem;
}

.form-field-animated .position-relative .form-select:focus ~ .form-select-icon {
    transform: translateY(-50%) rotate(180deg);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pill-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(52, 168, 83, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.pill-btn:hover::before {
    width: 300px;
    height: 300px;
}

.pill-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.2);
}

.pill-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 168, 83, 0.3);
}

.pill-btn.active::before {
    background: rgba(255, 255, 255, 0.2);
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #212121;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #6c757d;
    font-size: 1.125rem;
}

.divider {
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    margin: 1rem auto;
    border-radius: 2px;
}

/* Cards */
.card-hover {
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Contact Cards */
.contact-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

@media (min-width: 992px) {
    .contact-card {
        padding: 2.5rem;
    }
}

.contact-form-wrapper {
    background: transparent;
    border-radius: 1rem;
    padding: 0;
    border: none;
}

@media (min-width: 992px) {
    .contact-form-wrapper {
        padding: 0;
    }
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)) !important;
    border: none !important;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    padding: 0.75rem 1.5rem;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-primary:focus::before {
    width: 400px;
    height: 400px;
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(52, 168, 83, 0.4);
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary)) !important;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-animated {
    animation: fadeInUp 0.6s ease-out both;
}

.btn-animated i {
    transition: transform 0.3s;
}

.btn-animated:hover i {
    transform: translateX(5px);
}

.btn-outline-primary {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
    font-weight: 600;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: white !important;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* Invalid feedback positioning */
.invalid-feedback {
    display: none !important;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback,
.was-validated input[type="hidden"].is-invalid ~ .invalid-feedback,
.form-control.is-invalid.was-validated ~ .invalid-feedback,
.form-select.is-invalid.was-validated ~ .invalid-feedback,
.invalid-feedback[style*="display: block"] {
    display: block !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .form-steps {
        flex-direction: column;
    }
    
    .pill-group {
        flex-direction: column;
    }
    
    .pill-btn {
        width: 100%;
    }
    
    .hero-form-card {
        padding: 1.5rem;
    }
}

/* Dark form context */
.bg-primary-darker .form-steps {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.bg-primary-darker .step-btn:not(.active):not(:disabled) {
    color: rgba(255, 255, 255, 0.6);
}

.bg-primary-darker .step-btn:not(.active):not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
}

.bg-primary-darker .step-btn:not(.active) .step-number {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.bg-primary-darker .form-control,
.bg-primary-darker .form-select {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.bg-primary-darker .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.bg-primary-darker .form-control:focus,
.bg-primary-darker .form-select:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: white !important;
    color: white !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1) !important;
}

.bg-primary-darker .form-control.is-invalid,
.bg-primary-darker .form-select.is-invalid {
    border-color: #ff6b6b !important;
}

.bg-primary-darker .form-label {
    color: white !important;
}

.bg-primary-darker .invalid-feedback {
    color: #ffcccc !important;
}

.bg-primary-darker .pill-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.bg-primary-darker .pill-btn:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
}

.bg-primary-darker .pill-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.bg-primary-darker .form-check-label {
    color: white;
}

.bg-primary-darker .form-check-input {
    border-color: rgba(255, 255, 255, 0.3);
}

.bg-primary-darker .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar adjustments */
.navbar-nav {
    flex-wrap: nowrap;
}

.navbar-nav .nav-link {
    position: relative;
    white-space: nowrap;
}

.navbar .d-flex {
    flex-wrap: nowrap;
}

.navbar-collapse {
    flex-wrap: nowrap;
}

.navbar {
    flex-wrap: nowrap;
}

.navbar-brand {
    flex-shrink: 0;
}

.navbar-nav .nav-item {
    flex-shrink: 0;
}

.btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Top bar improvements */
.hover-underline {
    position: relative;
    transition: all 0.3s;
}

.hover-underline:hover {
    opacity: 0.9;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: white;
    transition: width 0.3s;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Badge dot pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.badge-dot {
    animation: pulse 2s infinite;
}

/* Navbar link icons */
.navbar-nav .nav-link i {
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.navbar-nav .nav-link:hover i {
    transform: scale(1.1);
}

/* Button improvements */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary .badge {
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
    animation: bounce 2s infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* WhatsApp button gradient */
.btn-success {
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

/* Responsive top bar */
@media (max-width: 576px) {
    .bg-primary-dark .d-flex {
        justify-content: center !important;
        text-align: center;
    }
}

/* Badge styles */
.badge {
    font-weight: 600;
}

/* Card improvements */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Professional icons styling */
.card .bi {
    transition: all 0.3s ease;
}

.card-hover:hover .bi {
    transform: scale(1.1);
}

.card .bi.text-primary {
    color: var(--color-primary) !important;
}

.card .bi.text-danger {
    color: #dc3545 !important;
}

.card .bi.text-warning {
    color: #ffc107 !important;
}

/* Institutional Cards */
.institutional-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(52, 168, 83, 0.1);
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.institutional-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.institutional-card:hover::before {
    transform: scaleX(1);
}

.institutional-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(52, 168, 83, 0.15);
    border-color: rgba(52, 168, 83, 0.3);
}

.institutional-card-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary-lighter), rgba(52, 168, 83, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary);
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.institutional-card:hover .institutional-card-icon {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
}

.institutional-card-decoration {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(52, 168, 83, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.institutional-card:hover .institutional-card-decoration {
    transform: scale(1.5);
    background: radial-gradient(circle, rgba(52, 168, 83, 0.1) 0%, transparent 70%);
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Smooth transitions */
button, a, input, select, textarea {
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

/* Prevent layout shift */
img {
    max-width: 100%;
    height: auto;
}

/* Container max width */
.container {
    max-width: 1200px;
}

/* Form spacing */
.form-label {
    margin-bottom: 0.5rem;
}

/* Alert notifications */
.alert-notification {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

