/*
* Salud Curicó - Public Portal Styles
* Version: 1.0.0
* Author: INFOGES CURICÓ
* Date: 2025
*/

:root {
    --primary: #00A651;
    --primary-dark: #008542;
    --primary-light: #4DC980;
    --secondary: #00D07A;
    --accent: #FFCC00;
    --dark: rgb(21, 65, 35);
    --light: #F5FFF7;
    --gray: #6c757d;
    --gray-light: #f8f9fa;
    --gray-dark: #343a40;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.btn {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    text-transform: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 0.2rem 0.5rem rgba(0, 166, 81, 0.3);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0.2rem 0.5rem rgba(0, 166, 81, 0.3);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.15rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 4px;
    background: var(--primary);
    left: 25%;
    bottom: -10px;
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    background-color: white;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Header y navegación */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
}

.navbar-brand img {
    height: 50px;
    margin-right: 10px;
}

.navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    border-radius: 50px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary);
    background-color: rgba(0, 166, 81, 0.05);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    background: linear-gradient(to right, var(--dark), var(--primary));
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-pattern.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #d8ffe5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 700px;
}

.centro-select-wrapper {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    position: relative;
    margin-top: 2rem;
}

.centro-select-title {
    background-color: var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.centro-select-body {
    padding: 1.5rem;
}

.centro-select-form .form-control {
    padding: 1rem 1.5rem;
    border-radius: 50px 0 0 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    height: 60px;
    font-size: 1.1rem;
}

.centro-select-form .btn {
    border-radius: 0 50px 50px 0;
    height: 60px;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.centro-select-form .btn:hover {
    background-color: var(--primary-dark);
}

/* Centro Info Section */
.centro-info {
    padding: 5rem 0;
}

.centro-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    height: 100%;
}

.centro-card-header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    position: relative;
}

.centro-card-header h2 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.centro-card-body {
    padding: 2rem;
}

.centro-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.centro-info-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 166, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.centro-info-content {
    flex: 1;
}

.centro-info-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
    font-weight: 500;
}

.centro-info-content p {
    margin-bottom: 0;
    font-weight: 500;
}

.stats-card {
    text-align: center;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    height: 100%;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

.stats-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 166, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-secondary);
}

.stats-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Chatbot */
.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.chatbot-button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.chatbot-window.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chatbot-header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-title {
    font-weight: 600;
    margin-bottom: 0;
}

.chatbot-close {
    cursor: pointer;
    font-size: 1.2rem;
}

.chatbot-body {
    height: 400px;
    padding: 1.5rem;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 1rem;
}

.chat-bubble {
    padding: 1rem;
    border-radius: var(--border-radius);
    max-width: 80%;
}

.chat-user .chat-bubble {
    background-color: var(--gray-light);
    margin-left: auto;
}

.chat-bot .chat-bubble {
    background-color: rgba(0, 166, 81, 0.1);
}

.chatbot-input {
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.chatbot-input .form-control {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
}

.typing {
    display: flex;
    align-items: center;
    gap: 5px;
}

.typing span {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.5s infinite ease-in-out;
}

.typing span:nth-child(2) {
    animation-delay: 0.3s;
}

.typing span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.voice-button {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.voice-button.listening {
    background-color: var(--primary);
    color: white;
    animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 166, 81, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 166, 81, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 166, 81, 0);
    }
}

.system-message {
    background-color: rgba(0, 0, 0, 0.05);
    font-style: italic;
    text-align: center;
}

.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* News Section */
.news-card {
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
}

.news-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: var(--gray);
    font-size: 3rem;
}

/* Tools Section */
.tool-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    text-align: center;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

.tool-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(0, 166, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    background-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.tool-icon-sm {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 166, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    transition: var(--transition);
}

.tool-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tool-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Services Section */
.service-card {
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(0, 166, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Exams Module */
.activity-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 166, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.related-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.comment-avatar {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 166, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* Profile Module */
.avatar-circle {
    width: 100px;
    height: 100px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
}

.avatar-initials {
    line-height: 1;
}

/* Feedback Section */
.feedback-section {
    padding: 5rem 0;
    background-color: var(--gray-light);
}

.feedback-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.feedback-header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    text-align: center;
}

.feedback-header h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feedback-header p {
    margin-bottom: 0;
    opacity: 0.9;
}

.feedback-body {
    padding: 2rem;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 60px;
}

.footer-text {
    margin-bottom: 2rem;
    max-width: 300px;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 1.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.footer-links a i {
    margin-right: 0.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-links a:hover i {
    transform: scale(1.2);
}

.footer-contact {
    display: flex;
    margin-bottom: 1rem;
}

.footer-contact-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 166, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.footer-contact-content h4 {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.footer-contact-content p {
    margin-bottom: 0;
    color: white;
}

.footer-social {
    display: flex;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 0.75rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary);
    transform: translateY(-5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.6);
}

/* Utilities */
.progress {
    height: 10px;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.progress-bar {
    background-color: var(--primary);
}

.badge-primary {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.badge-success {
    background-color: var(--success);
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.badge-warning {
    background-color: var(--warning);
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.badge-danger {
    background-color: var(--danger);
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-light-primary {
    background-color: rgba(0, 166, 81, 0.1) !important;
}

/* Pagination */
.pagination .page-item .page-link {
    color: var(--primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination .page-item .page-link:hover {
    background-color: rgba(0, 166, 81, 0.1);
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 166, 81, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .stats-number {
        font-size: 2rem;
    }

    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .chatbot-window {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero {
        padding: 6rem 0 4rem;
    }

    .centro-select-form .form-control {
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
    }

    .centro-select-form .btn {
        border-radius: var(--border-radius);
        width: 100%;
    }

    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .stats-card {
        margin-bottom: 1rem;
    }

    .chatbot-window {
        width: 300px;
        right: -20px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .chatbot-window {
        width: 280px;
        right: -30px;
    }
}

/* News Section */
.news-card {
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
}

.news-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: var(--gray);
    font-size: 3rem;
}