/* ========================================
   Simples Digital - CSS Principal
   Mobile-First Design
   ======================================== */

/* ========== ROOT VARIABLES ========== */
:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #f093fb;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-color: #f8f9fa;
    --dark-color: #1f2937;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ========== GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-4, .display-5 {
    font-weight: 800;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

/* ========== NAVBAR ========== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* ========== BUTTONS ========== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ========== CARDS ========== */
.card {
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,0,0,0.08);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ========== INPUT GROUPS ========== */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
    min-width: 45px;
    justify-content: center;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group .form-control,
.input-group .form-select {
    border-left: 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.05);
}

.input-group:focus-within .form-control,
.input-group:focus-within .form-select {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

/* ========== FORMS ========== */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

.invalid-feedback {
    display: none;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback.d-block {
    display: block !important;
}

/* ========== MODAL ========== */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ========== UTILITIES ========== */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

.shadow {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ========== RESPONSIVE ========== */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .service-icon {
        font-size: 2.5rem !important;
    }
    
    .stat-number {
        font-size: 2.5rem !important;
    }
    
    .hero-section {
        padding-top: 100px !important;
        padding-bottom: 60px !important;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 3rem;
    }
    
    .display-5 {
        font-size: 2.25rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .display-4 {
        font-size: 3.5rem;
    }
    
    .display-5 {
        font-size: 2.5rem;
    }
}

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

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========== SCROLL BEHAVIOR ========== */
html {
    scroll-behavior: smooth;
}

/* ========== LOADING STATE ========== */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* ========== FOOTER STYLES ========== */
.hover-link {
    transition: var(--transition);
    display: inline-block;
}

.hover-link:hover {
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

footer .hover-link:hover {
    color: #a5b4fc !important;
}
