/* Variables y animaciones base */
:root {
    --heartbeat-scale: 1.15;
    --heartbeat-duration: 1.5s;
    --hover-scale: 1.05;
    --primary-color: #4CAF50;
    --primary-dark: #3d8b40;
    --primary-light: #51b955;
    --white: #fff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.2);
    --shadow-lg: 0 6px 12px rgba(0,0,0,0.3);
    --card-colors-1: #e8f5e9;  /* - */
    --card-colors-2: #ffd700;  /* Amarillo para Personal */
    --card-colors-3: #d32f2f;  /* Rojo para Manual */
    --card-colors-4: #795548;  /* Marrón para Agenda */
    --card-colors-5: #ff8f00;  /* Anaranjado para Nuestro Condominio */
    --card-colors-6: #2e7d32;  /* Verde para Unidades de Negocio */
}

/* Animaciones */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(var(--heartbeat-scale)); }
    28% { transform: scale(1); }
    42% { transform: scale(var(--heartbeat-scale)); }
    70% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos generales */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--primary-color);
}

.main-logo:hover {
    animation-play-state: paused;
    transform: scale(var(--hover-scale));
}

/* Sección de Tarjetas */
.cards-section {
    background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
    min-height: 100vh;
    padding: 1rem;
}

.card {
    height: 130px;
    background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
    border: none;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Modificar los colores de los iconos */
.cards-section .col-md-6:nth-child(1) .icon-large { color: var(--card-colors-1); }
.cards-section .col-md-6:nth-child(2) .icon-large { color: var(--card-colors-2); }
.cards-section .col-md-6:nth-child(3) .icon-large { color: var(--card-colors-3); }
.cards-section .col-md-6:nth-child(4) .icon-large { color: var(--card-colors-4); }
.cards-section .col-md-6:nth-child(5) .icon-large { color: var(--card-colors-5); }
.cards-section .col-md-6:nth-child(6) .icon-large { color: var(--card-colors-6); }

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    border-radius: 15px;
}

.card-hover {
    transform: translateZ(0);
    backface-visibility: hidden;
}

.card-hover:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 0.75rem;
    position: relative;
    z-index: 1;
}

.icon-large {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--white);
    transition: all 0.3s ease;
}

.card-title {
    margin: 0;
    font-size: 1rem;
    color: var(--white);
    text-align: center;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

/* Efectos de hover mejorados */
.card-hover:hover .icon-large {
    transform: scale(1.1);
}

.card-hover:hover .card-title {
    transform: scale(1.05);
}

/* Efectos táctiles */
.card-hover:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

/* Tarjeta deshabilitada */
.card-disabled {
    opacity: 0.8;
    cursor: not-allowed;
    position: relative;
    background: linear-gradient(145deg, #808080, #6a6a6a);
}

.card-disabled::before {
    content: "Próximamente";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    z-index: 2;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.card-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.card-disabled .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Animación de ripple */
.card-hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.card-hover:active::after {
    animation: ripple 0.4s ease-out;
}

/* Enlaces */
.card-link {
    text-decoration: none;
    color: inherit;
}

/* Modales */
.message-modal .modal-dialog {
    max-width: 90%;
    width: 90%;
    height: 90vh;
    margin: 1.75rem auto;
}

.message-modal .modal-content {
    border: none;
    border-radius: 15px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3.5rem);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-header {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 15px 15px 0 0;
    padding: 1rem 1.5rem;
    border-bottom: none;
}

.modal-header .btn-close {
    color: var(--white);
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Estilos para contenido de mensajes y modales */
.message-content {
    text-align: justify;
    line-height: 1.6;
}

.message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.message-content table td {
    border: 1px solid #ddd;
    padding: 8px;
}

.message-content p {
    margin-bottom: 0.8em; /* Reducido el espaciado entre párrafos */
}

.message-content figure {
    margin: 1em 0;
}

.message-content strong {
    font-weight: bold;
}

.message-content i {
    font-style: italic;
}

.message-content code {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 4px;
}

/* Firma del mensaje */
.message-signature {
    margin-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 1rem;
    font-style: italic;
}

.message-signature p {
    margin-bottom: 0.5rem;
}

.message-signature p:last-child {
    font-style: normal;
    color: var(--primary-color);
}

/* Scroll personalizado */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Media Queries */
@media (min-width: 992px) {
    .message-modal .modal-dialog {
        max-width: 80%;
        width: 80%;
    }
    
    .modal-dialog {
        max-width: 800px;
    }
}

@media (max-width: 1200px) {
    .main-logo {
        max-width: 140%;
    }
}

@media (max-width: 992px) {
    .header-section {
        max-height: 150px;
        padding: 0.5rem;
    }
    
    .header-logo {
        width: 70px;
        height: 70px;
    }
    
    .header-title {
        font-size: 1.25rem;
    }
    
    .message-wrapper {
        max-height: calc(100vh - 150px);
    }
}

@media (max-width: 768px) {
    .message-section {
        padding: 1rem;
        min-height: 50vh;
    }
    
    .message-container {
        margin: 0.5rem;
        max-height: 45vh;
    }
    
    .cards-section {
        padding: 1.5rem;
        min-height: 50vh;
        background: linear-gradient(145deg, #45a049, #367d3a);
    }
    
    .col-md-6.p-2 {
        padding: 0.75rem !important;
        opacity: 0;
        transform: translateY(20px);
        animation: slideIn 0.5s forwards;
    }
    
    .card {
        margin-bottom: 1rem;
        height: 110px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
    }

    .card:active {
        transform: scale(0.98);
    }

    .card-disabled {
        opacity: 0.6;
        background: linear-gradient(145deg, #6b6b6b, #555555);
        border: 2px solid rgba(255, 255, 255, 0.1);
    }

    .card::before {
        background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    }

    .icon-large {
        font-size: 1.6rem;
    }

    .card-title {
        font-size: 0.95rem;
        font-weight: 600;
    }

    /* Delays para animación de tarjetas */
    .col-md-6:nth-child(1) { animation-delay: 0.1s; }
    .col-md-6:nth-child(2) { animation-delay: 0.2s; }
    .col-md-6:nth-child(3) { animation-delay: 0.3s; }
    .col-md-6:nth-child(4) { animation-delay: 0.4s; }
    .col-md-6:nth-child(5) { animation-delay: 0.5s; }
    .col-md-6:nth-child(6) { animation-delay: 0.6s; }

    /* Indicador de desplazamiento */
    .cards-section::after {
        content: '';
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
        animation: pulse 2s infinite;
    }
}

@media (max-width: 480px) {
    .message-section {
        padding: 0.75rem;
    }
    
    .message-content {
        font-size: 1rem;
        padding: 1rem;
    }

    .card {
        height: 100px;
    }

    .icon-large {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 0.9rem;
    }
}

/* Estilos para el directorio de proveedores */
		.provider-section {
			padding: 1rem;
			background-color: #f8f9fa;
			border-radius: 10px;
			margin-bottom: 2rem;
			transition: all 0.3s ease;
			border: 1px solid rgba(0,0,0,0.1);
		}

		.provider-section:hover {
			box-shadow: 0 4px 8px rgba(0,0,0,0.05);
		}

		.provider-title {
			color: #4CAF50;
			font-size: 1.2rem;
			margin-bottom: 1rem;
			padding-bottom: 0.5rem;
			border-bottom: 2px solid #4CAF50;
			display: flex;
			align-items: center;
			font-weight: 600;
		}

		.provider-title i {
			margin-right: 0.5rem;
			font-size: 1.3rem;
		}

		.provider-list {
			display: flex;
			flex-direction: column;
			gap: 1rem;
		}

		.provider-item {
			background-color: white;
			padding: 1rem;
			border-radius: 8px;
			box-shadow: 0 2px 4px rgba(0,0,0,0.1);
			transition: all 0.3s ease;
			border: 1px solid rgba(0,0,0,0.05);
		}

		.provider-item:hover {
			transform: translateY(-2px);
			box-shadow: 0 4px 12px rgba(0,0,0,0.15);
		}

		.provider-item h6 {
			color: #2c3e50;
			margin-bottom: 0.5rem;
			font-weight: 600;
			font-size: 1rem;
			display: flex;
			align-items: center;
		}

		.provider-item h6 i {
			color: #4CAF50;
			margin-right: 0.5rem;
		}

		.provider-item p {
			margin-bottom: 0.3rem;
			color: #666;
			display: flex;
			align-items: center;
			font-size: 0.95rem;
		}

		.provider-item p i {
			color: #4CAF50;
			margin-right: 0.5rem;
			font-size: 0.9rem;
		}

		.provider-item a {
			color: #4CAF50;
			text-decoration: none;
			transition: all 0.3s ease;
			display: inline-flex;
			align-items: center;
		}

		.provider-item a:hover {
			color: #2E7D32;
			text-decoration: none;
			transform: translateX(3px);
		}
		
		/* Estilos para el modal de Nuestro Condominio */
.condominio-content {
    padding: 1rem;
}

.condominio-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.condominio-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.condominio-section h4 {
    color: #4CAF50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.condominio-section h4 i {
    margin-right: 0.5rem;
    font-size: 1.3rem;
}

.condominio-section .lead {
    font-size: 1.1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    background-color: #e9ecef;
}

.feature-item i {
    color: #4CAF50;
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.feature-item span {
    color: #2c3e50;
    font-size: 0.95rem;
}

.condominio-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: justify;
}

.condominio-section strong {
    color: #2c3e50;
}

/* Sección del mensaje */
.message-section {
    background-color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

/* Ajuste al header y título */
.header-section {
    position: relative;
    padding: 0.5rem;
    background: white;
    flex-shrink: 0;
    height: auto;
    max-height: 180px;
    z-index: 1;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.25rem;
}

.header-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.header-divider {
    height: 2px;
    width: 80px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    margin: 0.5rem auto;
    border-radius: 2px;
}

/* Contenedor del mensaje */
.message-wrapper {
    flex: 1;
    overflow: hidden;
    padding: 0 1rem 1rem;
    max-height: calc(100vh - 180px);
}

.message-container {
    height: 100%;
    background: #e8f5e9;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.message-header {
    background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
    padding: 0.75rem 1rem;
    color: white;
    border-radius: 10px 10px 0 0;
    flex-shrink: 0;
}

.message-title {
    font-size: 1rem; /* Reducido de 1.1rem a 1rem */
    margin: 0;
    display: flex;
    align-items: center;
}

.message-content {
    padding: 1.5rem;
    font-size: 0.9rem; /* Reducido de 1rem a 0.9rem */
    line-height: 1.5; /* Reducido de 1.6 a 1.5 para mejor compactación */
    color: #2c3e50;
    overflow-y: auto;
    flex: 1;
    height: 0;
}

/* Personalización del scrollbar */
.message-content::-webkit-scrollbar {
    width: 8px;
    display: block;
}

.message-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.message-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.message-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Media Queries */
@media (max-width: 768px) {
    .message-section {
        height: auto;
        min-height: auto;
    }
    
    .header-section {
        max-height: 120px;
        padding: 0.25rem;
    }
    
    .header-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0.15rem;
    }
    
    .header-title {
        font-size: 1.1rem;
    }
    
    .message-wrapper {
        padding: 0.5rem;
    }
    
    .message-content {
        padding: 1rem;
        font-size: 0.85rem;
        max-height: 50vh;
    }
}

@media (max-width: 576px) {
    .header-section {
        max-height: 100px;
    }
    
    .header-logo {
        width: 50px;
        height: 50px;
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    .message-content {
        max-height: calc(100vh - 120px);
    }
}

/* Ajuste para mejor visualización en dispositivos pequeños */
@media (max-height: 600px) {
    .message-section {
        height: auto;
    }
    
    .message-content {
        max-height: 60vh;
    }
}

/* Footer en sección de tarjetas */
.cards-section {
    position: relative; /* Importante para posicionar el footer */
    padding-bottom: 30px; /* Espacio para el footer */
}

.cards-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 8px 15px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(to right, rgba(46, 125, 50, 0.2), rgba(76, 175, 80, 0.2));
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cards-footer small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Media query para pantallas pequeñas */
@media (max-width: 768px) {
    .cards-footer {
        font-size: 0.65rem;
        padding: 3px 10px;
    }
}