/* Import Montserrat Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* Custom Styles for Self-Assessment Tool - Modern Design */

:root {
    /* Southern Voice Brand Colors */
    --primary-color: #E60000;
    --primary-dark: #CC0000;
    --primary-light: #FF3333;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #E60000;
    --info-color: #E60000;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-accent: #fff5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #AAAAAA;
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    background-attachment: fixed;
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1.5;
    min-height: 100vh;
    font-size: 0.95rem;
}

/* Reduced heading sizes */
h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

h5 {
    font-size: 1rem;
    font-weight: 600;
}

h6 {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Modern Navbar */
.navbar {
    background: #495057 !important;
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
    border-bottom: none;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .dropdown-menu {
    background: white;
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.navbar-dark .navbar-nav .dropdown-item {
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.navbar-brand {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
    text-decoration: none;
    padding: 0;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-brand img {
    transition: opacity 0.2s ease;
}

.navbar-brand:hover img {
    opacity: 0.9;
}

/* Nav links handled by navbar-dark styles above */

/* Modern Cards */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    overflow: hidden;
}

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

.card-header {
    background: #6c757d;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    font-weight: 600;
    font-size: 0.95rem;
}

.card-header h4,
.card-header h5 {
    color: white !important;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

/* Fixed Progress Bar Footer */
.pilar-progress-footer {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    padding: 1rem 0;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
    border-top: 1px solid var(--border-color);
}

.pilar-progress-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

#pilar-footer-spacer {
    transition: height 0.3s ease;
}

.pilar-content-wrapper {
    padding-bottom: 0;
}

/* Modern Progress Bars */
.progress {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background-color: var(--bg-secondary) !important;
    height: 32px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
}

.progress .progress-bar {
    background: #6c757d !important;
    background-color: #6c757d !important;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease !important;
    font-weight: 500;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 0.8rem;
    height: 100% !important;
    line-height: 32px;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Barra verde cuando está al 100% */
.progress .progress-bar[aria-valuenow="100"],
.progress .progress-bar[aria-valuenow="100.0"],
.progress .progress-bar.completed {
    background: #10b981 !important;
    background-color: #10b981 !important;
}

.progress-bar-striped {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    ) !important;
    background-size: 1rem 1rem !important;
    background-color: #6c757d !important;
    transition: background-color 0.5s ease !important;
}

/* Barra verde con stripes cuando está al 100% */
.progress-bar-striped[aria-valuenow="100"],
.progress-bar-striped[aria-valuenow="100.0"],
.progress-bar-striped.completed {
    background-color: #10b981 !important;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    ) !important;
}

.progress-bar-striped.progress-bar-animated {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    ), #6c757d !important;
    background-size: 1rem 1rem, 100% 100% !important;
    background-color: #6c757d !important;
    animation: progress-bar-stripes 1s linear infinite !important;
    transition: background-color 0.5s ease, background 0.5s ease !important;
}

/* Selector más específico para barras animadas completadas */
.progress .progress-bar-striped.progress-bar-animated.completed,
.progress .progress-bar-striped.progress-bar-animated[aria-valuenow="100"],
.progress .progress-bar-striped.progress-bar-animated[aria-valuenow="100.0"] {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    ), #10b981 !important;
    background-size: 1rem 1rem, 100% 100% !important;
    background-color: #10b981 !important;
}

/* Barra verde animada cuando está al 100% */
.progress-bar-striped.progress-bar-animated[aria-valuenow="100"],
.progress-bar-striped.progress-bar-animated[aria-valuenow="100.0"],
.progress-bar-striped.progress-bar-animated.completed {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    ), #10b981 !important;
    background-size: 1rem 1rem, 100% 100% !important;
    background-color: #10b981 !important;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0, 0 0;
    }
    100% {
        background-position: 0 0, 0 0;
    }
}

/* Question Containers */
.question-container {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.question-container:hover {
    background: var(--bg-primary);
    border-color: #6c757d;
    box-shadow: var(--shadow-md);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.answer-input {
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    padding: 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.answer-input:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.1);
    outline: none;
}

.answer-input::placeholder {
    color: var(--text-muted);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.4em 0.65em;
    font-weight: 500;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.6rem 1.25rem;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    border: none;
    text-transform: none;
    letter-spacing: 0.025em;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    background: var(--bg-primary);
}

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

/* Save Indicator */
#save-indicator {
    position: fixed;
    bottom: 100px; /* Encima del footer fijo */
    right: 20px;
    z-index: 1051; /* Encima del footer */
    min-width: 320px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Hover Cards */
.hover-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb-item {
    font-weight: 500;
}

.breadcrumb-item a {
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #495057;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* Alerts */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: var(--primary-dark);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

/* Footer */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 2rem 0;
}

footer p {
    color: var(--text-secondary);
    font-weight: 500;
}

footer img {
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

footer img:hover {
    opacity: 1;
}

/* Text Utilities */
.text-muted {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Container */
.container {
    max-width: 1200px;
}

main.container {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Summary Cards */
.bg-light {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-accent)) !important;
    border-radius: var(--radius-lg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #save-indicator {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .question-container {
        padding: 1rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1.05rem; }
    h5 { font-size: 0.95rem; }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
